@cashfreepayments/cashfree-js
v1.0.7
Published
cashfree.js loader
Readme
Cashfree.js ES Module
Installation
Use npm to install the Cashfree.js module:
npm install @cashfreepayments/cashfree-jsUsage
load
This function returns a Promise that resolves with a newly created Cashfree object once Cashfree.js has loaded.
If you call load in a server environment it will resolve to null.
import {load} from '@cashfreepayments/cashfree-js';
const cashfree = await load({
mode: "sandbox" //or production
});For more information on how to use Cashfree.js, please refer to the Cashfree.js API reference or learn to accept a payment with Cashfree.
If you have deployed a Content Security Policy, make sure to [include Cashfree.js in your directives].
connect-src,https://api.cashfree.comframe-src,https://sdk.cashfree.com,https://api.cashfree.com,https://sandbox.cashfree.comhttps://payments.cashfree.com,https://payments-test.cashfree.comscript-src,https://sdk.cashfree.com
