From e06fda5128d0f0670e9350434eb746a7c3ae13f8 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 28 Jul 2014 18:45:18 -0700 Subject: [PATCH] paypro: fix more payment protocol errors. --- js/models/core/Wallet.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 4fa3203c0..f5b33ca77 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -911,7 +911,8 @@ Wallet.prototype.sendPaymentTx = function(ntxid, options, cb) { var refund_outputs = []; - options.refund_to = options.refund_to || self.getPubKeys()[0]; + options.refund_to = options.refund_to + || self.publicKeyRing.getPubKeys(0, false, this.getMyCopayerId())[0]; if (options.refund_to) { var total = 0; @@ -942,7 +943,7 @@ Wallet.prototype.sendPaymentTx = function(ntxid, options, cb) { // We send this to the serve after receiving a PaymentRequest var pay = new PayPro(); pay = pay.makePayment(); - var merchant_data = txp.merchant.pd.merchant_data; + var merchant_data = txp.merchant.pr.pd.merchant_data; if (typeof merchant_data === 'string') { merchant_data = new Buffer(merchant_data, 'hex'); }