neodeos
v2.0.0
Published
The Client SDK is used to securely collect payment details in the browser. It seamlessly integrates into your existing payment page.
Readme
NeoDeos 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 NeoDeos. This iframe collects the payment details, which are then submitted to NeoDeos 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.
Installation
Use npm to install the NeoDeos Client SDK:
npm install @neodeos/client-sdkImport the SDK into your application:
import neodeos from '@neodeos/client-sdk';Usage
To initialize the SDK, use the following code:
import neodeos from '@neodeos/client';
const pf = neodeos.init(
"sandbox", // environment name
"<public-key>", // your public key
true // enable debug mode
);To create a drop-in UI:
pf.addPaymentUI('<id-of-div-container>', 20, 'AUD');For more thorough documentation, visit the NeoDeos Client SDK docs.
