• Resolved bakertronics

    (@bakertronics)


    Hi, do we require any settings within PayPal for his plugin to work better?

    For example, does IPN need to be turned on and configured?

    Some orders are showing the error of “could not capture payment” on the checkout, but the money is being taken by PayPal.

    Can you let me know why this could be?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Andreas W.

    (@aweissinpsyde)

    Hello @bakertronics

    normally not. Just connect it to your PayPal Business account and all should work fine.

    What are your setting in the plugin under PayPal Checkout Settings > Intent? Can you please enable logging too?

    Also, please try it using the Theme Storefront and disable temporarily all other plugins. Maybe your Theme or another plugin cause that issue.

    Have a nice day
    Regards
    Andreas

    Thread Starter bakertronics

    (@bakertronics)

    Hi, your plugin logs are shocking so we hacked the plugin to get better logs.

    We found that when “could not capture payment” error happened on the checkout there was also this error “[0] => cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received”

    Your plugin does not specify a timeout, so it uses WordPress default of 5 seconds.

    So if Paypal takes longer than 5 seconds to reply “Hey, the payment was captured” the order fails to go to processing.

    We added this filter to our themes functions:

    add_filter('http_request_timeout', function($timeout, $url) {
    	return 60;
    }, 999, 2);

    This will give PayPal 60 seconds to get the message back.

    We had 23 orders with issues yesterday because of this, which causes mayhem in our distribution centre.

    We will monitor our custom logs today and report back if this fixes it.

    Plugin Support Andreas W.

    (@aweissinpsyde)

    Hello @bakertronics

    I just pinged our developers to get more information about it.

    Thank you
    Regards
    Andreas

    Plugin Support Andreas W.

    (@aweissinpsyde)

    Hello @bakertronics

    I just got already feedback from our developers and they said it’s known in sandbox mode but not in live mode. Also, they will contact PayPal so PayPal can look at it too so that issue can be solved asap.

    Any update on this? I am having the same issue. Does the filter posted resolve this?

    Thread Starter bakertronics

    (@bakertronics)

    They claimed that only happened in sandbox not live mode.
    But it definitely effected us in live mode, that snippet sorted everything for us.

    Put it in your functions.php file. Hopefully they release an update soon with a fix as this absolutely decimated our clients sales.

    God I hope this works haha. Missing out on orders feels bad right now with a new company.

    Plugin Support Andreas W.

    (@aweissinpsyde)

    We will do our best to get that issues fixed asap but its currently on the PayPal site

    Chiming in here as we’re facing the same issue – orders getting stuck on Pending Payment then eventually getting Cancelled despite the customer already making payment.

    Extremely disappointing release by Inpsyde as proper webhook handling is fundamental and in 2021 a basic requirement! Doesn’t strike much confidence when this was looked over.

    The snippet provided by @bakertronics works but it sets the timeout for all remote requests to 60.

    Since all of WooCommerce PayPal Payments remote requests are handled by WooCommerce\PayPalCommerce\ApiClient\Endpoint\RequestTrait, A better snippet would be to hook into the ppcp_request_args filter in the request method:

    add_filter( 'ppcp_request_args', function( $args, $url ) {
        $args['timeout'] = 60;
        return $args;
    }, PHP_INT_MAX, 2 );

    I’ve only just implemented this on my environment along with enabling logging. I will update here once I can confirm my snippet works the same!

    jon

    (@jonwarner)

    I think we’re getting the same issue. Submitting a credit card payment through the checkout page results in a successful payment but the checkout page does not redirect to the order received page, being stuck on a an infinite loading wheel of death. Manually refreshing the page clears the cart as expected following a successful payment.

    Refunding a payment via backend > Woocommerce > Orders > Refund x.xx via Paypal Card Processing also results in a long ajax loading wheel but does eventually complete – this is with the 60 second http request timeout hack from @bakertronics.

    We have all IPN ip addresses whitelisted on our server. There just seems to be a terrible communication issue here with Paypal.

    jon

    (@jonwarner)

    Having disabled direct credit card payments for now, I am disappointed to see the issue occurs with the black Debit or Credit Card button for Paypal Checkout too. This really needs to be addressed asap – cancelled orders are piling up.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘IPN/PayPal Settings’ is closed to new replies.