Add a script that points to paypalobjects.com/api/checkout.js .
|
Add a script that points to paypalobjects.com/sdk/js .
See Set up standard payments.
|
Add a client-side call to paypal.Button.render({}, '#el'); .
|
Add a client-side call to paypal.Buttons({}).render('#el'); .
See Set up standard payments.
|
Add the payment() callback.
|
Add the createOrder() callback.
See Set up standard payments.
|
Add the actions.payment.create() call.
|
Add a server-side call to /v2/checkout/orders .
See Set up standard payments.
|
Add the onAuthorize() callback.
|
Add the onApprove() callback.
See Set up standard payments.
|
Add the actions.payment.execute() call.
|
Add a server-side call to /v2/checkout/orders/:id/capture .
See Set up standard payments.
|
Set style.size to small , medium , large , and responsive .
|
Set the container element to your preferred size.
See Customize the payment buttons.
|
Pass the client option in the paypal.Button.render() call.
|
Pass client-id=xyz to the /sdk/js script tag.
See Set up standard payments.
|
Pass the commit: true or commit: false option in the paypal.Button.render() call.
|
Pass commit=true or commit=false to the /sdk/js script tag.
See Commit.
|
Pass the env option in the paypal.Button.render() call.
|
Pass client-id=xyz to the /sdk/js script tag and auto-detect the environment.
See Client ID.
|
Pass the locale option in the paypal.Button.render() call.
|
Pass locale=xx_XX to the /sdk/js script tag.
See Locale.
|
Pass the style.fundingicons option in the paypal.Button.render() call.
|
The card buttons display automatically in the default integration.
See Set up standard payments.
|
Pass the funding.allowed option in the paypal.Button.render() call.
|
PayPal automatically decides on the optimal buttons to show to your buyers.
See Set up standard payments.
|
Pass the funding.disallowed option in the paypal.Button.render() call.
|
Pass disable-funding or disable-card to the /sdk/js script tag.
See Disable Funding and Disable card.
|
Use paypal.request , paypal.request.get , paypal.request.post .
|
Use the built-in browser fetch function, with a polyfill or your AJAX library of choice.
See Fetch.
|
Use paypal.Promise .
|
Use the built-in browser Promise , with a polyfill or your promise library of choice.
See Promise.
|
When you set up transaction, pass return and cancel URLs.
Call actions.redirect() in onAuthorize and onCancel .
|
When you set up transaction, do not pass return and cancel URLs.
Call window.location.href = 'done_page.html' in onApprove .
Call window.location.href = 'cancel_page.html' in onCancel .
See Redirect.
|