0.1.0 • Published 4 years ago
react-vipps-payments v0.1.0
Usage
Initiate the client
const client = new VippsClient({
id: VIPPS_CLIENT_ID",
secret: "VIPPS_CLIENT_SECRET",
subscriptionId: "VIPPS_SUB_KEY",
testDrive: isProd ? false : true
});
Initiate a payment
await client.initiatePayment({order:VippsCheckoutModel});
Capture a payment
await client.capture({ orderId: VippsOrderId, body: VippsCaptureBodyModel });
Refund a payment
await client.refund({ orderId: VippsOrderId, body: VippsRefundBodyModel });
Get order payment details
await client.getOrderDetails({ orderId: VippsOrderId});
Get an access token
await client.getAccessToken();
0.1.0
4 years ago