moneris-checkout
v0.1.5
Published
Moneris checkout
Downloads
227
Readme
Overview
Npm module for Moneris Checkout.
For developer document, please see official doc
How to Use
npm i -S moneris-checkout
import MonerisCheckout from "moneris-checkout";
import { EnvironmentType } from "moneris-checkout/types/global";
const moneris = new MonerisCheckout(
"moneris", // Store ID
"hurgle", // API token
"chkt5BF66neris", // Checkout ID
EnvironmentType.TEST // "qa" for test, "prod" for production
);
// Send a preload request
const preload = await moneris.preload(6.19);
// Receive ticket ID
const ticket = preload.response.ticket;
// After the client completes payment, send a receipt request with ticket
const receipt = await moneris.receipt(ticket);