Warning epaydk payment error

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36590
    n4dq4d
    Participant

      Hi olly,

      Lately i have had a lot of payments that get a warning message. Those orders are not being printed via the google plugin.

      Here is a link to the debug log:
      http://qadar.dk/debug.txt

      In the next post i will add the email warning

      #36591
      n4dq4d
      Participant
        This reply has been marked as private.
        #36592
        Olly
        Admin & Mod
          This reply has been marked as private.
          #36593
          n4dq4d
          Participant
            This reply has been marked as private.
            #36595
            Olly
            Admin & Mod
              This reply has been marked as private.
              #36597
              Olly
              Admin & Mod
                This reply has been marked as private.
                #36601
                n4dq4d
                Participant
                  This reply has been marked as private.
                  #36602
                  Olly
                  Admin & Mod

                    ahh, now that makes sense , because it means that the notification message (at ipn.php) gets sent multiple times back to the server as otherwise you would not ever receive the normal order confirmation email
                    (this seems to happen only sometimes from what i can see and for reasons only ebay would be able to track down. might be waiting for a timely server response or any other reason, i don’t know)

                    in a nutshell, the order execution goes like this (there are a few other steps , but to keep it simple)

                    notification received at ipn, look for an order that has status “inprogress” or “unconfirmed” for that id.
                    if found, execute order, sending emails etc. once that’s all happened set status to “completed” – done

                    if the same ipn gets sent again, it will be looking for that “inprogress” status , however, it does not exist anymore as it is now “completed” (as we do not want to execute that order multiple times of course)

                    that’s as an explanation and it’s the only way i can see this happening

                    as there is a possibility somewhat, that other gateways might do the same, i will add something to the plugin (that’s the main wppizza plugin) to account for this. As I am in the middle of tearing a number of things apart an update is quite a few days away yet, so in the meantime, you could edit a corefile as follows (assuming you are familiar with simple php editing)

                    in wp-content/plugins/wppizza/classes/class.wppizza.order_execute.php you will find at approx line 1166

                    
                    /* error details */
                    $result['error'][] = array(
                    'critical'=> $critical, /* force sending of email to admin */
                    'error_id'=> 30007,
                    'error_message' => __('order not found using order id','wppizza-admin'),
                    'wp_error' => ''
                    );
                    /* logging, and sending */
                    $this->gateway_logging($result['error'], $gateway_reply, $order_id, $this->wppizza_gateway_ident, 'get-prepared-error');
                    /*
                    ipn, just return false !
                    */
                    return false;
                    

                    edit this to be the following

                    
                    /* 
                    if we receive ipn notifications multiple times for the same order, the status will already have changed to completed, 
                    so before throwing errors, check if that is the case and if so , simply ignore
                    */
                    $order = WPPIZZA()->db->fetch_order_details(false, $order_id, false, array('COMPLETED'), $wp_user_id);
                    if(!empty($order)){return;}
                    /* error details */
                    $result['error'][] = array(
                    'critical'=> $critical, /* force sending of email to admin */
                    'error_id'=> 30007,
                    'error_message' => __('order not found using order id','wppizza-admin'),
                    'wp_error' => ''
                    );
                    /* logging, and sending */
                    $this->gateway_logging($result['error'], $gateway_reply, $order_id, $this->wppizza_gateway_ident, 'get-prepared-error');
                    /*
                    ipn, just return false !
                    */
                    return false;
                    

                    save (and make a test order i would suggest)

                    i’ll add something like that to the next update

                    if you still have issues once this is added, please let me know.
                    while making sure that this works, maybe you could also perhaps enable
                    “Log successful orders” /wp-admin/edit.php?post_type=wppizza&page=settings for a few days
                    as it might give us a better idea/clue in case the above does not rectify the issue

                    (if it all works , after letting things run for a while, you can turn this off again)

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • The topic ‘Warning epaydk payment error’ is closed to new replies.