-
Notifications
You must be signed in to change notification settings - Fork 5
05 Samples
Igor Timoshenkov edited this page Mar 5, 2018
·
1 revision
Before the integration, please refer to installation instructions to download the library.
After the installation, just include the code in your app's code as usual:
// load the lib
import { VXPay, VXPayConfig } from 'vxpay';
// apply config options
const config = new VXPayConfig();
// init the payment wrapper
const vxpay = new VXPay(config);
// open the login screen
vxpay.openLogin();
- Include the script with the load handler
<script type="text/javascript" src="vxpay.min.js" async onload="__init()"></script>
- In the
__init()
function, you'll have access to exported objects:
// build the config to init the payment frame
const config = new VX.VXPayConfig();
config.logging = true;
config.language = VX.VXPayLanguage.EN;
/** see below for the full list of config options */
// pass the config to the payment frame
vxpay = new VX.VXPay(config);
Please refer to example folder for fully featured example.