1.0.0 • Published 12 years ago

coinsmerch v1.0.0

Weekly downloads
5
License
-
Repository
github
Last release
12 years ago

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

1.0.0

12 years ago