• Resolved hir88en

    (@hir88en)


    When you go to payment list page inside admin panel. You will see payment id is limited to 6 digits.

    So what will happen if payment id already reached #999999, what happens next?
    Why is this limited?

    Oh and out of topic question, Is there any builtin function to check wheter payment_id exist. I want to make automated payment check when my system received payment info from bank. So it needs to check wheter the submitted order_number from user is exist or not in our database.

    And how to get payment value from known payment id?

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1. this is not really a limit but rather a format, that is the payment ID needs to show 6 digits, and if the value is smaller than 99999 prefix it with zero(s).

    Once you will have 999999 IDs the next one will be 1000000, then 1000001, and so on.

    2. we do not have a special function for that, but since the payments are saved as custom post types, knowing the ID you can check if it exists like this

    
    $ID = 1000;
    $payment = get_post( $ID );
    if( ! is_object( $payment ) ) {
      wp_die( "Payment does not exist." );
    }
    if( $payment->post_type != "adverts-payment" ) {
      wp_die( "Invalid post type." );
    }
    // To pay total
    $pay_total = get_post_meta( $payment->ID, '_adverts_payment_total', true );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Payment ID limit’ is closed to new replies.