Support » Plugin: WooCommerce » Orders stuck on hold

  • Resolved ethan700

    (@ethan700)


    Using Paypal by Braintree. Credit card authorizes and then settles, but the order in Woocommerce stays on hold and never updates to processing. Have checked to make sure cURL, SoapClient etc. is enabled and host says that they whitelisted paypal and braintree IP addresses. At a loss as to why Woocommerce orders are not updating.

    http://www.thedaddynamic.com/shop

    ### WordPress Environment ###
    
    Home URL: http://www.thedaddynamic.com
    Site URL: http://www.thedaddynamic.com
    WC Version: 2.5.5
    Log Directory Writable: ✔
    WP Version: 4.4.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.18 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4
    PHP Version: 5.4.45
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 10.0.20
    Max Upload Size: 2 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 2.5.5
    :
    woocommerce_sessions: ✔
    woocommerce_api_keys: ✔
    woocommerce_attribute_taxonomies: ✔
    woocommerce_termmeta: ✔
    woocommerce_downloadable_product_permissions: ✔
    woocommerce_order_items: ✔
    woocommerce_order_itemmeta: ✔
    woocommerce_tax_rates: ✔
    woocommerce_tax_rate_locations: ✔
    
    ### Active Plugins (21) ###
    
    Custom Content Width: by George Stephanis – 1.0.1
    Duplicator: by LifeInTheGrid – 1.1.6
    Easy Social Share Buttons for WordPress: by CreoApps – 3.4.1
    EWWW Image Optimizer: by Shane Bishop – 2.8.0
    Favicon by RealFaviconGenerator: by Philippe Bernard – 1.3.4
    Google Analytics Dashboard for WP: by Alin Marcu – 4.9.3.1
    Google Analytics: by Kevin Sylvestre – 1.0.6
    Jetpack by WordPress.com: by Automattic – 4.0.2
    jonradio Multiple Themes: by David Gewirtz – 7.1
    Login Security Solution: by Daniel Convissor – 0.55.0
    MailChimp for WordPress Pro: by ibericode – 2.7.26
    Popups - WordPress Popup: by Damian Logghe – 1.4.6.1
    Printful Integration for WooCommerce: by Printful – 1.1.2
    Redirection: by John Godley – 2.4.4
    W3 Total Cache: by Frederick Townes – 0.9.4.1
    WooCommerce PayPal Powered by Braintree Gateway: by WooThemes – 1.2.0
    WooCommerce: by WooThemes – 2.5.5
    WordPress Related Posts: by Zemanta Ltd. – 3.6
    Yoast SEO: by Team Yoast – 3.2.4
    WP Category Permalink: by Jordy Meow – 2.2.8
    WP User Avatar: by flippercode – 2.0.7
    
    ### Settings ###
    
    Force SSL: ✔
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ✔
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #1020 - /shop/
    Cart: #1021 - /cart/
    Checkout: #1022 - /checkout/
    My Account: #1023 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: Tracks
    Version: 1.50
    Author URL: https://www.competethemes.com
    Child Theme: ✕ – If you're modifying WooCommerce on a parent theme you didn't build personally
    then we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: Not Declared
    
    ### Templates ###
    
    Overrides: –

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

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

    (@mikejolley)

    Look at the order notes; does it give a reason for the on-hold?

    Hi Mike,

    The order notes say:

    PayPal Braintree charge authorized (Charge ID: 3ab37df). Process order to take payment, or cancel to remove the pre-authorization. Order status changed from Pending Payment to On Hold.

    By the way, I have “Capture charge immediately” checked in the settings, but the order system is acting like the charge will be captured later (I’m guessing since the order notes say “process order to take payment). In Braintree, the charge is submitted for settlement immediately and then settled.

    Plugin Author Mike Jolley

    (@mikejolley)

    Can you re-save the braintree settings, and let me know if that helps. Otherwise screenshot your settings and I’ll notify the dev team.

    I re-saved. I also unchecked “Capture charge immediately” and saved. Then checked it again and saved. Charges are being captured immediately, but the order status is not updating properly.

    Screenshot: http://www.thedaddynamic.com/wp-content/uploads/2016/05/braintree.png

    Plugin Author Mike Jolley

    (@mikejolley)

    Looking at the code, the on-hold status is set if this is not true:

    if ( 'settling' === $result->transaction->status ) {

    Are you able to see the status by logging into braintree?

    Yes, in Braintree, the status goes to “submitted for settlement.” After a number of hours, it changes to “settling” and then to “settled.” During each of these, the WooComm order status never updates.

    Plugin Author Mike Jolley

    (@mikejolley)

    Right, this seems to be a one off check at time of sale. I’m not sure if it’s supposed to update itself later nor if Braintree even has a callback. Will check.

    I’ve been on the phone with Braintree support a few times. They said that once it is “submitted for settlement” the payment is guaranteed and the order should update to “processing.” It is also normal for it to remain in the “submitted for settlement” state for up to 24 hours. Obviously, waiting that long for a status change on Braintree’s end is not ideal, so it seems like the code should be:

    if ( 'submitted for settlement' === $result->transaction->status ) {

    Hi there,

    I’m Akeda, contributor for PayPal Powered by Braintree plugin. I just tested with similar setup and couldn’t reproduce the issue. WC 2.5.5 and PayPal Powered by Braintree 1.2.0. In my test, I use simple product with “Capture charge immediately” is checked. Here’s the log I got when I did checkout:

    [05-May-2016 15:44:14 UTC] process_payment - Info: Beginning processing payment for order 4137 for the amount of 38
    [05-May-2016 15:44:14 UTC] process_payment - Info: Merchant ID = j3vdrjgnm2bty7rj
    [05-May-2016 15:44:16 UTC] process_payment - Info: Successfully processed payment, transaction id = jh24sx
    [05-May-2016 15:44:16 UTC] process_payment - Info: Completed processing of payment for order 4137

    Here’s the screenshot of order:

    Screen Shot

    Here’s the transaction history in Braintree:

    Screen Shot

    If you’ve debug enabled, could you check the log file from WooCommerce > System Status > Logs ? Also, to avoid false alarm and narrow down the culprit could you have other plugins disabled?

    Akeda, then it looks like my problem is that Braintree is taking hours to get to the “settled” state instead of instantly like you have.

    In my logs, I see the first two lines you’re showing, but not the last two.

    I did try purchases with all plugins off with no change.

    When I call Braintree support, they say it’s “normal” for transactions to take hours to be settled, but you obviously don’t have that issue.

    What can I do?

    Hi,

    I’m using sandbox account when testing this. Looks like you’re not getting ‘settling’ status immediately. Are you comfortable to add one line of change to log what’s the response you got from Braintree?

    It’s on file /classes/class-wc-gateway-paypal-braintree.php line #866 right after else. Just add simple log to know the status:

    ...
    } else {
    	// Add this log.
    	$this->log( __FUNCTION__, print_r( $result->transaction, true ) );
    
    	update_post_meta( $order->id, '_pp_braintree_charge_captured', 'no' );
    	...
    }

    According to this page https://developers.braintreepayments.com/reference/request/transaction/submit-for-settlement/php

    If you do not use the options.submitForSettlement option with Braintree_Transaction::sale(), then you will have to explicitly submit the transaction for settlement.

    We set submitForSettlement when “Capture charge immediately” is checked, otherwise we assume it’s delayed capture method. During the tests it always return “settling” in status field.

    Akeda, I just spoke to Braintree again. They said it’s possible that some credit card banks go straight to “settling” but that others will go to “submitted for settlement.” They also said that my account was operating normally and that there were no holds on it.

    Can you send me the correct code and file/line location to change the code to have this line:

    if ( 'settling' === $result->transaction->status ) {

    change to either ‘settling’ OR ‘submitted for settlement’ ?

    I would recommend that be a permanent update to the code for the next plugin update.

    I’m not sure what the exact status is, it might need to be: submitted_for_settlement

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Orders stuck on hold’ is closed to new replies.