PayPalConfig
PayPalConfig is the input to the setupPayPal method for rendering the PayPal Button.
Attribute | Type | Description | Required/Optional |
---|---|---|---|
currency | String | AUD, USD, … | required |
payment | PayPalPaymentObject | Required object for creating a PayPal Order (authorize or capture) or a PayPal Billing Agreement (subscription for recurring payments) { paymentIntent: {...} // (optional), paymentMethod: {...} // (required) } | required |
containerId | String | The ID of the HTML tag which loads the PayPal Button | required |
style | Determines the layout/style of the PayPal Button Refer to PayPal Button Style |
var fz = new FatZebra({
username: MERCHANT_USERNAME,
})
const paymentObject = {
paymentIntent: {...},
paymentMethod: {...}
}
fz.setupPayPal({
currency: "AUD",
payment: paymentObject,
containerId: "paypal-button-container",
style: {
layout: "vertical",
color: "blue",
shape: "rect",
label: "paypal"
}
})
Updated 10 months ago