PayPal elements
Learn how to use the PayPal elements.
Last updated
Learn how to use the PayPal elements.
Last updated
With DigitalRiver.js, you can create a PayPal element that will wrap up the PayPal Checkout.js library and automatically handle payment authorization. The element follows the same creation and event structure as other DigitalRiver.js elements.
To create a PayPal element for a checkout or account management flow, use the createElement
function exposed through the DigitalRiver Object. This object follows the same pattern and allows for the same and as other elements.
style
Optional
sourceData
Required
label
Optional
The label that appears on the PayPal button. The default is blank
.
color
Optional
The color of the PayPal button. The default is gold
.
shape
Optional
The shape of the PayPal button. The default is pill
.
layout
Optional
The layout of the PayPal button. The default is horizontal
.
fundingicons
Optional
Indicates whether the funding icons appear on the button. The default is false
.
tagline
Optional
Indicates whether the tagline appears on the PayPal button. The default is none
.
Use this function to place the created PayPal element on your page.
Use this function to remove the PayPal element from your page. You can re-add the element to your page by calling mount()
.
Use this function to remove the PayPal element from your page and remove its functionality. You cannot re-add the element to your page via mount()
.
Call this function to update the PayPal element's data.
Call this function to listen to events that can be used to build and enhance your purchase flows.
The created element is loaded and ready to accept an update request.
A shopper clicked the element's button.
The customer has canceled the experience.
The customer has authorized the payment and a source, and Drop-In returned associated data.
The Ready event triggers when the PayPal Element has loaded and is available to take an update()
call.
The Click event triggers when the customer clicks a PayPal Element.
The Cancel event triggers when customers close the PayPal Element Payment Request interface.
Pay in 4 is a credit card installment product automatically provided by PayPal when a customer signs in to PayPal Express or PayPal Checkout. This option appears by default when a customer purchases a physical product with an order value between $30 and $600. When they complete their purchase, they make a down payment. They pay the rest in three installment payments–one every two weeks. This option is only available in the US.
When a customer selects this payment method, a "soft hit" appears in their credit report.
A .
A . See the PayPal documentation for more information.
The Source event triggers when the Customer completes their interaction with the Payment Request interface, and they create a Payment Source. The emitted object will be a .