I am working on implementing the new paypal checkout buttons using the javascript sdk to display the paypal buttons into an existing site. The server back end is currently using the NVP/SOAP integration method.
Paypal documentation gives instructions here for upgrading existing NVP/SOAP integrations to use the new paypal checkout buttons.
When attempting to add the sdk by configuring the querystring parameters of the script, for the intent parameter I think I need to pass the value of "sale" rather than "capture" because the NVP/SOAP calls pass "sale" on the payment action parameter and the paypal documentation status to be sure your javascript call is passing the same intent as your back-end call to the API. See here for specifics where paypal talks about this.
My question/problem - when I place "&intent=sale" as a querystring parameter, the javascript sdk will not load. If I place "&intent=capture" it will load. Paypal's documentation says that "sale" is a valid value for the intent parameter (see here, under integrating with older API's. I cannot figure out why "&intent=sale" is causing the javascript sdk not to load.
Anyone have any ideas or experience with this?
The JS SDK does not accept intent:sale as a parameter, despite what that document says.
intent:sale is only valid for old v1/payments API calls, which you should not be using for any new integration. The current API is v2/checkout/orders , use that and what it supports.
If for some reason you have an old v1/payments API backend with old intent values, fine, keep using that dinosaur, but the JS SDK will not accept that intent as a query string parameter. Despite what the document suggests.