1.0.0 • Published 12 years ago
coinsmerch v1.0.0
coinsmerch-nodejs
Node module for accepting Bitcoins with Coins Merch.
Usage
Install coinsmerch-nodejs:
$> npm install coinsmerch
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 });
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