Apple Pay elements
Learn how to use Apple Pay elements.
Creating an Apple Pay element
var paymentRequestData = digitalriver.paymentRequest({
country: "US",
currency: "USD",
total: {
label: "Order Total",
amount: 100
},
displayItems: lineItems,
shippingOptions: shippingOptions,
style: {
buttonType: "plain",
buttonColor: "dark",
buttonLanguage: "en"
}
});
var applepay = digitalriver.createElement('applepay', paymentRequestData);Apple Pay element styles and customization
Button type
Button color
Apple Pay element functions
applepay.canMakePayment();
applepay.mount();
applepay.show();
applepay.unmount();
applepay.destroy();
applepay.update();
Apple Pay element events — applepay.on('event', handler);
Event
Triggered When
Source
Ready
Click
Cancel
Shipping option change
Key
Type
Description
Shipping address change
Key
Type
Description
Last updated

