PayPal Shopping Cart - Purchase Completion Issue

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

PayPal Shopping Cart - Purchase Completion Issue

Post 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.
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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?
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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.
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post by Pablo »

If the order successfully reaches the PayPal checkout, then I think the shopping cart itself is ok.
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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.
User avatar
BaconFries
 
 
Posts: 6318
Joined: Thu Aug 16, 2007 7:32 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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.
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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.
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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.
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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.
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post by TomB »

Thanks Pablo. Much appreciated.
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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?
TomB
 
 
Posts: 47
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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?
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post 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
User avatar
Pablo
 
Posts: 24742
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Shopping Cart - Purchase Completion Issue

Post by Pablo »

@TomB
Thank you so much for the coffees! I can certainly put them to good use 😉
Post Reply