From e1478fefbfe810dba63e5cfb70afee37209b179f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 4 Aug 2014 12:17:40 -0700 Subject: [PATCH] paypro: display ack memo on notification. --- js/controllers/send.js | 3 +++ js/models/core/Wallet.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/js/controllers/send.js b/js/controllers/send.js index 5af53273a..86e8831f6 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -70,6 +70,7 @@ angular.module('copayApp.controllers').controller('SendController', message += '\nThis payment protocol transaction' + ' has been verified through ' + merchantData.pr.ca + '.'; } + message += '\nMessage from server: ' + merchantData.ack.memo; message += '\nFor merchant: ' + merchantData.pr.pd.payment_url; } notification.success('Success!', message); @@ -83,6 +84,7 @@ angular.module('copayApp.controllers').controller('SendController', message += '\nThis payment protocol transaction' + ' has been verified through ' + merchantData.pr.ca + '.'; } + message += '\nMessage from server: ' + merchantData.ack.memo; message += '\nFor merchant: ' + merchantData.pr.pd.payment_url; } notification.success('Transaction broadcast', message); @@ -342,6 +344,7 @@ angular.module('copayApp.controllers').controller('SendController', message += '\nThis payment protocol transaction' + ' has been verified through ' + merchantData.pr.ca + '.'; } + message += '\nMessage from server: ' + merchantData.ack.memo; message += '\nFor merchant: ' + merchantData.pr.pd.payment_url; notification.success('Transaction sent', message); } diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 79801267c..462dbd014 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -1082,6 +1082,10 @@ Wallet.prototype.receivePaymentRequestACK = function(tx, txp, ack, cb) { tx = ptx; } + txp.merchant.ack = { + memo: memo + }; + var txid = tx.getHash().toString('hex'); return cb(txid, txp.merchant); };