Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
update coinpayments client handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanlott committed Nov 9, 2017
1 parent 0fd93d5 commit b895fa0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/server/vendor/coinpayments.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ const options = {
autoIpn: process.env.NODE_ENV === 'production' ? false : true
}

const client = new Coinpayments(options);
let client;

if (options.key && options.secret) {
client = new Coinpayments(options);
} else {
console.error('Invalid Coinpayments Key or Secret');
client = undefined;
}

module.exports = client;

0 comments on commit b895fa0

Please sign in to comment.