pcibooking-ewallet
v1.0.7
Published
PCI Booking library for eWallet payments (GooglePay, ApplePay, PayPal, Banks...)
Maintainers
Readme
Installation
npm i @pcibooking/ewalletQuick Start
Initialize the Engine
const engine = new eWallet.Engine(sessionToken, requiredAncillaryInfo, language);| Parameter | Description |
|-----------|-------------|
| sessionToken | Required. Token obtained from the undefined service |
| requiredAncillaryInfo | Optional. Billing/shipping address requirements (applicable on most eWallets) |
| language | Optional. Language code for UI localization. Supported languages: en, he |
Detect Available eWallets
const available = engine.checkAvailability();Returns the list of eWallets available on the specific device and browser.
Start a Payment Session
engine.payBy(eWalletList, callback, buttonProperties);Starts the payment process using the specified list of eWallet providers.
| Parameter | Description |
|-----------|-------------|
| eWalletList | Required. List of requested eWallet providers and their respective button properties |
| callback | Required. Callback handler called when the payment operation completes |
| buttonProperties | Optional. Button styling properties |
Obtaining Results
Use the following methods to get data on the current session:
| Method | Description |
|--------|-------------|
| getSessionType() | "CHARGE" or "TOKENIZE" |
| parseResultToken() | [EWalletResultData, boolean] |
| getBillingInfo() | FullAddress | MinAddress | undefined |
| getShippingInfo() | FullAddress | MinAddress | undefined |
Documentation
In order to use the library, you will need to have an account with PCI Booking. Use https://pcibooking.net/ to get an account. Follow the API documentation at https://developers.pcibooking.net/ in order to obtain a session token.
Support
For assistance, visit our contact form or email [email protected].
Changelog
See CHANGELOG.md for version history.
