Support » Plugin: WooCommerce » Payment processing issue after update to 2.6

  • Resolved JackTheKnife

    (@scyzor)


    After updating to version 2.6 order status is shown as “Pending Payment” when a credit card was charged and there was successful purchase. Before at that point I had status as “Processing”. Change log doesn’t show that there was any changes to the payment processing.

    Any clue what is going on?

    Thanks

    https://wordpress.org/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Mike Jolley

    (@mikejolley)

    What gateway?

    Plugin Author Mike Jolley

    (@mikejolley)

    Maybe you are hitting https://github.com/mdkwock/woocommerce-fosdick-fulfilment/blob/master/woocommerce-fosdick-fulfilment.php#L220

    You need to update the code to use more up to date functions such as wc_add_notice.

    We only support WooCommerce core on this forum. We’re not allowed to support premium plugins and themes on this forum as per the forum guidelines.

    https://codex.wordpress.org/Forum_Welcome#The_Bad_Stuff

    As I wrote above – my code was up to date with version 2.5.5 and I’m asking what was changed regarding payment processing or product status as after update to version 2.6 WooCommerce (not payment plugin which works fine – credit card was charged and returned as valid transaction) is set up status order as “Pending Payment”

    My code for that part looks like that:

    $response = $this->postRequest($this->postURL, $query);
                if(stripos($response, "false")!==false||stripos($response, "invalid")!==false){
                    //if there is a false or invalid message
    
    		  //Fosdick return errors
    		  if( stripos($response, "MxSubtotal") === false ) {
    		      wc_add_notice(__('Payment error #:', 'woothemes') . $response,'error');
                    return;
    		  }	
    
                }else{
                //all good 2.2.0
                    $order->payment_complete();
                }
    
                // Return thankyou redirect 2.1.0
                return array(
                    'result' => 'success',
                    'redirect' => $this->get_return_url( $order )
                );
            }

    And when I test it I can reach result as ‘success’ but WooCommerce is setting order status as “Pending Payment” so it is WooCommerce issue rather than payment gateway plugin or there are no info regarding changes related to payment gateways handling response by WooCommerce itself.

    Thanks

    Even in your documentation you have exactly the same code to process successful payment https://docs.woothemes.com/document/payment-gateway-api/ but 2.6 handle that as is still processing.

    Plugin Author Mike Jolley

    (@mikejolley)

    Nothing has changed in that regard; you can look at BACS etc for reference.

    So enable logging/error logs and look, and of course check BACS method. Pretty sure you’ll find its service related.

    There is nothing related payment gateway in the WP debug.log and WC-log is coming as blank file.

    Also you are saying that I should to use WC_Gateway_BACS on top of WC_Payment_Gateway which I have used? Why?

    Thanks

    Plugin Author Mike Jolley

    (@mikejolley)

    No, I’m suggesting you enable BACS and do a test payment.

    Still the same – successful payment but WooCommerce is showing as “Pending Payment”

    Is there any way to change that status on $order->payment_complete();?

    Plugin Author Mike Jolley

    (@mikejolley)

    You’d best look for plugin conflicts in that case.

    The complete code is here and you’ll see plugins can change things like statuses https://github.com/woothemes/woocommerce/blob/847dea6a2d1e5407fef95a99b621c0bea66b0076/includes/abstracts/abstract-wc-order.php#L2472

    If there will be a plugin conflict it should not to work with 2.5.5

    Plugin Author Mike Jolley

    (@mikejolley)

    Why? How do you know a plugin you’re running alongside your gateway is not compatible with 2.6?

    You mean other plugins not related to WooCommerce but rather WP itself can cause that problem?

    Plugin Author Mike Jolley

    (@mikejolley)

    Honestly, there is no way for me to tell you yes or no – thats why you need to rule them out. Same with the theme.

    All I can say is, BACS is working perfectly fine on my own installs and this is the only bug report I’ve seen.

    How can I turn on logging for WC as this log file is coming blank?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Payment processing issue after update to 2.6’ is closed to new replies.