Page 1 of 1

PayPal Shopping Cart - Purchase Completion Issue

Posted: Sat Jun 27, 2026 5:47 pm
by TomB
Set Up:

Cart: JavaScript SDK
Buttons: Legacy Buttons (Add to Cart, not Buy Now)
Email: Merchants registered PayPal email address
PayPal ID: Using Sandbox ID but have also tested using Live Client ID
Sandbox: When using Sandbox have made sure checkbox for sandbox is checked / unchecked for live testing.
Version of minicart.js: Most current (21.1.0 - June 26, 2026) Older versions display the same issue.

The Issue:

Items selected are placed in the cart. Upon checking out the items are passed to the PayPal Java SDK popup. Customer selects pay by credit/debit card. Fills in all required fields. Clicks button slider to "Not Create Account". Clicks pay button, PayPal processes the order (spinning graphic) and returns customer to the success page on website. So far everything looks good. (Get the same results even if the customer logs into their PayPal account).

The problem is no emails are sent from PayPal to the customer or merchant acknowledging the purchase. The funds are never taken from customers credit card / PayPal account or posted to the merchants ledger.

Steps Taken:
PayPal Developer

Made sure PayPal Features have Subscriptions, Payment links and buttons, Payouts, JavaScript SDK v6 and Mobile SDKs all checked.

Checked for Notifications (email) Nothing there

Checked API calls under Event Logs - There are several with Date and time, HTTP status, Debug ID, Request Path, Error message
HTTP status shows a 201 OK and Request path shows POST /v2/checkout/orders

Checked to make sure the sites host server is not blocking port 443 (PayPals callback port)

Made a simple single item page with only the cart and 1 button set (same credentials) same results as the full page

Put the single item page on a different server - same results

Conclusion:

It's almost as if the scripts onApprove function is not firing the "intent" "Capture" to complete funding.

Any insights would be greatly appreciated.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Sun Jun 28, 2026 6:11 am
by Pablo
First please note that all PayPal functionality is implemented on the PayPal server, so as soon as the customer checks out, WWB no longer has control over the process.
The orders and emails are processed by PayPal.
So, maybe something is not correctly setup in the PayPal account?

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Sun Jun 28, 2026 6:13 pm
by TomB
Understood. I posted primarily, wondering if anyone using the WWB minicart.js script, might have experienced simialar behaviour and perhaps found a work-a-round or could suggest settings that I could try implementing or checking in PayPal.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Sun Jun 28, 2026 7:59 pm
by Pablo
If the order successfully reaches the PayPal checkout, then I think the shopping cart itself is ok.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Mon Jun 29, 2026 9:59 pm
by TomB
The order reaches PayPal, shows up in the sandbox API event calls. However, it doesn't complete the process of sending customer and merchant confirmation emails or moving funds and posting to the merchant ledger. I think it has something to do with the script clearing the cart before the onApprove capture can take place or it doesn't have an onApprove function and clears the cart after it writes the order. Sandbox API events only show that an order was written (POST /v2/checkout/orders) where if it were actually completed it would show (POST /v2/checkout/orders/0W650059P4915723B/capture).

Anyone who has recently set this cart up and has it working; your insights would be much appreciated.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Tue Jun 30, 2026 12:10 am
by BaconFries
On a personal note I haven't setup the cart but it seems like there is no capture happening from what I understand. Have you viewed the error logs In Developer Dashboard → Logs → Orders API You will see: create_order NO capture_order if so then this proves there is an issue. It also explains why the sandbox behavior is the same as if it was live ie as you'd expect it to if placing it normally. Perhaps the script (not saying it does) is missing the "capture" hence it not completing as it should.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Tue Jun 30, 2026 6:33 am
by Pablo
the 'onApprove' event is only used for redirecting after the user has finished the order.
There is no other logic in this event.

Note that this has not been recently changed, it always has been working like this.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Tue Jun 30, 2026 3:01 pm
by TomB
BaconFries wrote: Tue Jun 30, 2026 12:10 am On a personal note I haven't setup the cart but it seems like there is no capture happening from what I understand. Have you viewed the error logs In Developer Dashboard → Logs → Orders API You will see: create_order NO capture_order if so then this proves there is an issue. It also explains why the sandbox behavior is the same as if it was live ie as you'd expect it to if placing it normally. Perhaps the script (not saying it does) is missing the "capture" hence it not completing as it should.
Error logs don't show an error. Perhaps, because the script actually creates_order BUT apparently _destroys / clears the cart before capture_order.
Sandbox API calls show the order was created but not captured.

Image

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Tue Jun 30, 2026 3:19 pm
by TomB
Pablo wrote: Tue Jun 30, 2026 6:33 am the 'onApprove' event is only used for redirecting after the user has finished the order.
There is no other logic in this event.

Note that this has not been recently changed, it always has been working like this.
It is very easy to reproduce what is happening.

1. Clean new page
2. Add "minicart" - Configure to use the JavaScript SDK - success.html, cancel.html
3. Add "Add to Cart Button" - Configure to use "Legacy Buttons"
4. Use your Sandbox credentials - Sandbox Client ID
5. Run through the check-out process using generated credit card.

I believe the onApprove event is either missing a CAPTURE or is redirecting prior to the CAPTURE firing.

I've only set up a couple of PayPal carts and those were all Legacy hosted buttons. I could be missing something.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Tue Jun 30, 2026 4:46 pm
by Pablo
It has been working like this for a few years now and I have not had any other reports about it not working. But APis like this often change so it may be possible the rules have changed.
I will try to look into this later this week.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Tue Jun 30, 2026 4:50 pm
by TomB
Thanks Pablo. Much appreciated.

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Wed Jul 01, 2026 8:03 am
by Pablo
In the latest build (7/1/2026) I have added a capture to onApprove.
Can you please check if this solves the issue for you?

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Wed Jul 01, 2026 6:44 pm
by TomB
YES! you da man! Thank you. Works as it should now. I really appreciate you looking into this and coming up the fix in such short order. Where's your "Buy me coffee" link?

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Wed Jul 01, 2026 6:57 pm
by Pablo
Thank you for your detailed feedback! That was really useful.

https://buymeacoffee.com/wysiwygwb
or
https://forum.wysiwygwebbuilder.com/viewforum.php?f=132

Re: PayPal Shopping Cart - Purchase Completion Issue

Posted: Thu Jul 02, 2026 11:47 am
by Pablo
@TomB
Thank you so much for the coffees! I can certainly put them to good use 😉