vxpay-js v2.14.3
Visit-X payment SDK
VXPay-js is an SDK for integrating the Visit-X payment/funnel for 3rd party code.
More information on the vxpay-js: 1. Public API description 1. Hooks definitions & explanation 1. Frame messages reference 1. Samples 1. Post message reference
Please see vxpay-js-react-example for React integration example.
Communication flows
Things to note:
- All communication between the VXPayJS (lib) and VXPay happens via
window.postMessage
. Nevertheless, this should not be influencing the consumer application anyhow, as it is completely hidden from the end-developer. - Normal communication between the SPA (e.g. your code), library and VXPay should looks approximately like described on the chart below (
IsLoggedInAction
is just an example):
Possible deviations:
- When configured to be opening in a tab, all the actions (e.g.
VXPay.isLoggedIn()
,VXPay.getActiveAbos()
, etc.) will be routed to an iFrame to avoid opening tabs when no user interaction is happening.
Development
You can use the following scripts to help you on daily run:
Command | Explanation |
---|---|
npm run vxpay-prepare | Prepare the npm package valid for local installs (normal npm tgz) |
npm run vxpayclear | Remove the files used in package preparation |
npm run vxpay-charts | Build svg charts based on text described flows (mermaid-js) |
npm run build | Prepare the production version of the lib |
npm run lint | Check eslint results |
npm run cover | Run tests and write coverage files. Can be observed in build/coverage/index.html |
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago