@darkpos/payment
v1.0.5
Published
Payment client
Downloads
278
Readme
@dark/payment
Install service
$ yarn add @darkpos/payment
1. Create an instance of payment client
import PaymentClient from '@darkpos/payment';
const paymentClient = new PaymentClient();
paymentClient.init(<Provider Config>)
.then((data) => {
console.log(data);
}).catch(err => console.log(err));
2. Call createSingleUseToken or createCustomerToken
paymentClient.createSingleUseToken(<source>).then(data => console.log(data)).catch(err => console.log(err));
paymentClient.createCustomerToken(
<customerToken>,
<source>
).then(data => console.log(data)).catch(err => console.log(err));