fixed bitpay payment bug as according to bitpay
This commit is contained in:
parent
4f1a780cda
commit
bd382a847a
5 changed files with 14 additions and 10 deletions
|
|
@ -223,7 +223,8 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
|
|||
var dataSrc = {
|
||||
amount: parsedAmount.amount,
|
||||
currency: parsedAmount.currency,
|
||||
uuid: wallet.id
|
||||
uuid: wallet.id,
|
||||
buyerSelectedTransactionCurrency: coin.toUpperCase()
|
||||
};
|
||||
ongoingProcess.set('loadingTxInfo', true);
|
||||
createInvoice(dataSrc, function(err, invoice, accessKey) {
|
||||
|
|
|
|||
|
|
@ -221,7 +221,8 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
|||
var dataSrc = {
|
||||
amount: parsedAmount.amount,
|
||||
currency: parsedAmount.currency,
|
||||
uuid: wallet.id
|
||||
uuid: wallet.id,
|
||||
buyerSelectedTransactionCurrency: coin.toUpperCase()
|
||||
};
|
||||
ongoingProcess.set('loadingTxInfo', true);
|
||||
createInvoice(dataSrc, function(err, invoice, accessKey) {
|
||||
|
|
|
|||
|
|
@ -189,7 +189,8 @@ angular.module('copayApp.controllers').controller('topUpController', function($s
|
|||
$scope.amountUnitStr = parsedAmount.amountUnitStr;
|
||||
var dataSrc = {
|
||||
amount: parsedAmount.amount,
|
||||
currency: parsedAmount.currency
|
||||
currency: parsedAmount.currency,
|
||||
buyerSelectedTransactionCurrency: coin.toUpperCase()
|
||||
};
|
||||
ongoingProcess.set('loadingTxInfo', true);
|
||||
createInvoice(dataSrc, function(err, invoice) {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
if ((/^bitcoin(cash)?:\?r=[\w+]/).exec(data)) {
|
||||
var c = data.indexOf('bitcoincash') >= 0 ? 'bch' : 'btc';
|
||||
data = decodeURIComponent(data.replace(/bitcoin(cash)?:\?r=/, ''));
|
||||
payproService.getPayProDetails(data, function(err, details) {
|
||||
payproService.getPayProDetails(data, coin, function(err, details) {
|
||||
if (err) {
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
} else handlePayPro(details, coin);
|
||||
|
|
@ -132,7 +132,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
var amount = parsed.amount ? parsed.amount : '';
|
||||
|
||||
if (parsed.r) {
|
||||
payproService.getPayProDetails(parsed.r, function(err, details) {
|
||||
payproService.getPayProDetails(parsed.r, coin, function(err, details) {
|
||||
if (err) {
|
||||
if (addr && amount) goSend(addr, amount, message, coin, shapeshiftData);
|
||||
else popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
|
|
@ -154,7 +154,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
|
||||
// paypro not yet supported on cash
|
||||
if (parsed.r) {
|
||||
payproService.getPayProDetails(parsed.r, function(err, details) {
|
||||
payproService.getPayProDetails(parsed.r, coin, function(err, details) {
|
||||
if (err) {
|
||||
if (addr && amount)
|
||||
goSend(addr, amount, message, coin, shapeshiftData);
|
||||
|
|
@ -197,7 +197,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
|
||||
// paypro not yet supported on cash
|
||||
if (parsed.r) {
|
||||
payproService.getPayProDetails(parsed.r, function(err, details) {
|
||||
payproService.getPayProDetails(parsed.r, coin, function(err, details) {
|
||||
if (err) {
|
||||
if (addr && amount)
|
||||
goSend(addr, amount, message, coin, shapeshiftData);
|
||||
|
|
@ -215,7 +215,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
// Plain URL
|
||||
} else if (/^https?:\/\//.test(data)) {
|
||||
|
||||
payproService.getPayProDetails(data, function(err, details) {
|
||||
payproService.getPayProDetails(data, coin, function(err, details) {
|
||||
if (err) {
|
||||
root.showMenu({
|
||||
data: data,
|
||||
|
|
|
|||
|
|
@ -5,11 +5,12 @@ angular.module('copayApp.services').factory('payproService',
|
|||
|
||||
var ret = {};
|
||||
|
||||
ret.getPayProDetails = function(uri, cb, disableLoader) {
|
||||
ret.getPayProDetails = function(uri, coin, cb, disableLoader) {
|
||||
if (!cb) cb = function() {};
|
||||
|
||||
var wallet = profileService.getWallets({
|
||||
onlyComplete: true
|
||||
onlyComplete: true,
|
||||
coin: coin
|
||||
})[0];
|
||||
|
||||
if (!wallet) return cb();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue