bmv-node-sdk
v1.2.0
Published
SDK for use with Coupons - ASP
Downloads
3
Readme
Coupons Node SDK
Welcome to Coupons Node SDK, this package serves as a wrapper to use Coupons Evaluation API
Installation
$ npm install bms-node-sdk -s
What you'll need
- Server URL
- Coupon's API Key
Usage example
const Evaluator = require("bmv-node-sdk")
const handler = new Evaluator(server_url,api_key)
var res = await handler.sendCoupon("Promotion Code", "Coupon Code", {total:50})
console,log(res)
var res = await handler.sendDiscount("Promotion Code", "Transaction id", {total:50, param1 : value1)
console,log(res)
You can use any param that your promotion has as the third argument of both functions , but it has to include obligatory field total for it to work. Coupon Code and Transaction ID are not required to be sent in third argument and are set automatically by the helper depending on the value passed as the second argument.