@payfurl/client
v4.8.6
Published
The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.
Readme
PayFURL Client SDK
The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.
When initialized, the SDK securely loads an iframe hosted by payFURL. This iframe collects the payment details, which are then submitted to payFURL and converted to a payment token. The payment token is added as a hidden input to the form. For PayPal or Buy Now Pay Later payments, the payment details are converted to a transactionId, which is also added as a hidden input to the form. Payment detail collection is triggered when the form is submitted.
Integrate with your app
If you want to use the published PayFURL Client SDK in your application, install it from npm:
npm install @payfurl/clientImport the SDK into your application:
import payfurl from '@payfurl/client';Usage
To initialize the SDK, use the following code:
import payfurl from '@payfurl/client';
const pf = payfurl.init(
"sandbox", // environment name
"<public-key>", // your public key
true // enable debug mode
);To create a drop-in UI:
pf.addDropIn('<id-of-div-container>', 20, 'AUD');Local development
If you are working in this repository, install the project dependencies with:
npm installLocal testing
To serve the SDK locally for testing, run:
npm run serverThis starts a local HTTP server on port 3001.
To open the SDK main page in your browser, go to http://localhost:3001/sdk.html.
More info
For more thorough documentation, visit the PayFURL Client SDK docs.
