Browse Source

paypro: example - allow user to set options when using example as a module.

patch-2
Christopher Jeffrey 11 years ago
parent
commit
da36abcc1e
  1. 12
      examples/PayPro/server.js

12
examples/PayPro/server.js

@ -36,10 +36,6 @@ var TransactionBuilder = bitcore.TransactionBuilder;
* Variables * Variables
*/ */
var isNode = !argv.b && !argv.browser;
var app = express();
var x509 = { var x509 = {
priv: fs.readFileSync(__dirname + '/../../test/data/x509.key'), priv: fs.readFileSync(__dirname + '/../../test/data/x509.key'),
pub: fs.readFileSync(__dirname + '/../../test/data/x509.pub'), pub: fs.readFileSync(__dirname + '/../../test/data/x509.pub'),
@ -52,6 +48,14 @@ var server = https.createServer({
cert: fs.readFileSync(__dirname + '/../../test/data/x509.crt') cert: fs.readFileSync(__dirname + '/../../test/data/x509.crt')
}); });
server.setOptions = function(options) {
argv = options;
};
var isNode = !argv.b && !argv.browser;
var app = express();
/** /**
* Ignore Cache Headers * Ignore Cache Headers
* Allow CORS * Allow CORS

Loading…
Cancel
Save