PayPalConfig

PayPalConfig is the input to the setupPayPal method for rendering the PayPal Button.

AttributeTypeDescriptionRequired/Optional
currencyStringAUD, USD, …required
paymentPayPalPaymentObjectRequired object for creating a PayPal Order (authorize or capture) or a PayPal Billing Agreement (subscription for recurring payments)

{
paymentIntent: {...} // (optional),
paymentMethod: {...} // (required)
}
required
containerIdStringThe ID of the HTML tag which loads the PayPal Buttonrequired
styleDetermines 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"
  }
})