Usage
Initialize the SDK
await AlphaXPayment.init({
clientId: '<your_client_id_here>',
environment: 'production', // available: production, demo
onInitialized() {
// on initialized, do your stuff
},
onPaymentSucceeded(res) {
// when we submit the payment and it's all good, this function will be triggered
// you will have the order information in "res"
console.log('Payment succeeded', res);
},
onPaymentFailed(error) {
// When it fails to charge the user, you can use the "error" to show up to your
// customer
console.error('Payment failed', error);
},
});Create Payment Element
Submit Payment
Last updated