diff --git a/browser/build.js b/browser/build.js index 6d6de0a..7e67ec6 100644 --- a/browser/build.js +++ b/browser/build.js @@ -142,7 +142,17 @@ var createTestData = function() { return tb.bundle(); }; - +var createTrusted = function(callback) { + var cp = require('child_process'); + var ps = cp.spawn('/bin/bash', ['./browser/generate-trusted.sh'], { + customFds: [0, 1, 2], + cwd: __dirname + '/..' + }); + return ps.on('exit', function(code) { + if (code !== 0) return callback(new Error('Exit code: ' + code)); + return callback(); + }); +}; if (require.main === module) { var list = function(val) { diff --git a/lib/browser/PayPro.js b/lib/browser/PayPro.js index 52e98fb..03fb644 100644 --- a/lib/browser/PayPro.js +++ b/lib/browser/PayPro.js @@ -4,6 +4,7 @@ var Key = require('./Key'); var KJUR = require('./x509'); var assert = require('assert'); var PayPro = require('../PayPro'); +var Trusted = require('./Trusted'); PayPro.sign = function(key) { if (this.messageType !== 'PaymentRequest')