PayPal Cart - Java SDK

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: 39
Joined: Wed Apr 12, 2017 8:22 pm

PayPal Cart - Java SDK

Post by TomB »

Using WWB Version 21.0.4 - April 10, 2026

Transitioning a site currently using legacy PayPal buttons. If I set the buttons and cart to "Legacy Payment Button" the shopping cart's popup works as expected showing items placed in the cart and the total. When pressing the "PayPal" button on the pop-up the items are passed to PayPal and everything works as it should. The problem is when I change the cart to use the "PayPal Javascript SDK" and change the buttons to use the "Javascript SDK" all the "Add to Cart" buttons act as a "Buy Now" button and go directly to PayPal, not placing items in the cart. According to the Help file, I was led to believe the "Add to Cart" would work with SDK if used with the the Shopping Cart.
However, PayPal's JavaScript SDK does not provide 'Add to cart' and 'View Cart' functionality. it only supports 'Buy Now'. Alternatively, you can use the PayPal Shopping Cart object which has also been updated to support the JavaScript SDK. Also, the subscription button needs to be setup in the PayPal account.

When using the 'JavaScript SDK', you will need to use the 'Client ID' instead of the PayPal email address. This can be set globally in Tools -> Options -> eCommerce
The Client ID is set up on PayPal for both the Sandbox and Live. I've tried using both ID's with the same results.
What am I missing?
User avatar
Pablo
 
Posts: 24544
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Cart - Java SDK

Post by Pablo »

When using the PayPal Shopping Cart, then this object will be the checkout point.
The PayPal buttons are only use as 'triggers'. They need to be configured as classic PayPal button otherwise they will go directly to the PayPal website.
TomB
 
 
Posts: 39
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Cart - Java SDK

Post by TomB »

Thank you for clearing that up. Using the legacy buttons with Java SDK on the cart works as expected. Am I correct in assumming that the deprecated button <form action="https://www.paypal.com/cgi-bin/webscr"> and <input> elements are ignored while using the cart Javascript SDK?
User avatar
Pablo
 
Posts: 24544
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Cart - Java SDK

Post by Pablo »

Correct. However, the shopping (cart which is a third party script) monitors for this legacy PayPal button clicks, so that is why it works this way.
TomB
 
 
Posts: 39
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Cart - Java SDK

Post by TomB »

So is it safe to assume the cart will continue to work after January 2027 when PayPal WPS is completly shut down, as long as the cart is using the Javascript SDK?
User avatar
Pablo
 
Posts: 24544
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: PayPal Cart - Java SDK

Post by Pablo »

Yes, the buttons are only used locally.
By the time the legacy buttons are no longer supported there will probably be a cleaner solution.
But for now, it's important to be backward compatible, while also supporting the new api.
TomB
 
 
Posts: 39
Joined: Wed Apr 12, 2017 8:22 pm

Re: PayPal Cart - Java SDK

Post by TomB »

Great! Thx
Post Reply