Creating a Checkout component
You can enable this by calling addCheckout()
:
window.addEventListener('load', function () {
payfurl.init('sandbox', '<public key>')
.addCheckout('iframeContainer', '<amount>', '<3-letters currency code>', '<Checkout Provider Type>', '<Checkout Provider Id>', 'options', 'checkoutOptions' );
});
options
is an optional object that can contain the following properties:
taxAmount
: tax amountshippingAmount
: amount of shippingdiscountAmount
: amount of discountorderItems
: array of products:name
: name of productquantity
: quantity of productsku
: sku of productunitPrice
: unit price of producttotalAmount
: total cost of product
customer
: inforamtion about customerfirstName
: first name of customerlastName
: last name of customeremail
: email of customerphoneNumber
: phone number of customer
billingAddress
: billinng addressfirstName
lastName
email
phoneNumber
streetAddress
streetAddress2
city
country
region
postalCode
state
checkoutOptions
: object that contain checkout metadatametadata
: additional metadata to send with the payment request (optional)