cyberpay
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

CyberPay

Success

Nodejs API wrapper for CyberPay.

Table of content

Installation

npm install cyberpay

Usage

const CyberPay = require('cyberpay');

const cyberpay = new CyberPay({
    integrationKey: process.env.INTEGRATION_KEY,
});

try {
    const res = await cyberpay.payment.verify(transactionReference);
    // Verify payment
    if (res.status === 200) {
        // Successful
    }
} catch (err) {
    if (!err.response) {
        // No response from the server
        // Bad network
    } else {
        //  Response was returned from the server
        // ...
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i cyberpay

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

26.1 kB

Total Files

28

Last publish

Collaborators

  • vectormike