handle the "invalid" status
This commit is contained in:
parent
5f197b5f4e
commit
dd1209a92c
4 changed files with 37 additions and 12 deletions
|
|
@ -72,8 +72,10 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
|||
if (opts && opts.remove) {
|
||||
delete(inv[gc.invoiceId]);
|
||||
}
|
||||
|
||||
inv = JSON.stringify(inv);
|
||||
|
||||
|
||||
storageService.setAmazonGiftCards(network, inv, function(err) {
|
||||
|
||||
homeIntegrationsService.register(homeItem);
|
||||
|
|
@ -125,8 +127,10 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
|||
"invoiceId": data.invoiceId,
|
||||
"accessKey": data.accessKey
|
||||
};
|
||||
console.log('[amazonService.js.129:dataSrc:]',dataSrc); //TODO
|
||||
|
||||
$http(_postBitPay('/amazon-gift/redeem', dataSrc)).then(function(data) {
|
||||
console.log('[amazonService.js.130:data:]',data); //TODO
|
||||
var status = data.data.status == 'new' ? 'PENDING' : (data.data.status == 'paid') ? 'PENDING' : data.data.status;
|
||||
data.data.status = status;
|
||||
$log.info('Amazon.com Gift Card Create/Update: ' + status);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue