UNPKG

pay-with-bnpl-sdk

Version:

You can use this package to integrate BNPL.

68 lines (62 loc) 1.28 kB
import * as zoid from "zoid/dist/zoid.frameworks"; // Button child component const bnplButton = zoid.create({ tag: "button-bnpl-v1.0.8", url: "https://sdk-button-bnpl.forborga.com/button", autoResize: { width: false, height: false, }, dimensions: { width: "100%", height: "100%", }, }); export const sdk = zoid.create({ // The html tag used to render the component tag: "sdk-bnpl-v1.0.8", url: "https://sdk-button-bnpl.forborga.com/", autoResize: { width: false, height: false, }, dimensions: { width: "100%", height: "100%", }, // Child components of parent SDK children: () => { return { bnplButton: bnplButton, }; }, // Method called for the child exports: ({ getExports }) => { return { btnRedirect: () => getExports().then((exports) => exports.btnRedirect()), }; }, // The size of the component props: { domain: { type: "string", required: false, }, merchantAppKey: { type: "string", required: false, }, merchantOrderID: { type: "string", required: false, }, grandTotal: { type: "string", required: false, }, currency: { type: "string", required: false, }, }, });