coinsmerch

1.0.0 • Public • Published

coinsmerch-nodejs

Node module for accepting Bitcoins with Coins Merch.

Usage

  1. Install coinsmerch-nodejs:

    $> npm install coinsmerch
  2. Make a call to begin a purchase:

    var coinsmerch = require('coinsmerch');
     
    coinsmerch.beginPurchase(COINSMERCH_API_KEY, COINSMERCH_API_SECRET, 2, 'BTC', function (error, data) {
        //handle response
    });
  3. Verify that the purchase callback came from Coins Merch:

    var coinsmerch = require('coinsmerch');
     
    if(!coinsmerch.verifyPurchaseCallback(hmac, req.rawBody, COINSMERCH_API_SECRET)) {
        res.send(400);
    }

Example

Checkout an example in Node.js at https://github.com/jhurt/coinsmerch-nodejs-example

Readme

Keywords

none

Package Sidebar

Install

npm i coinsmerch

Weekly Downloads

2

Version

1.0.0

License

none

Last publish

Collaborators

  • jhurt