amazon cancel gift card feature

This commit is contained in:
Gabriel Bazán 2016-08-03 10:05:20 -03:00 committed by Gustavo Maximiliano Cortez
commit de6107206e
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 32 additions and 0 deletions

View file

@ -114,6 +114,23 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
});
};
root.cancelGiftCard = function(data, cb) {
var dataSrc = {
"clientId": data.uuid,
"invoiceId": data.invoiceId,
"accessKey": data.accessKey
};
$http(_postBitPay('/amazon-gift/cancel', dataSrc)).then(function(data) {
$log.info('Amazon.com Gift Card Cancel: SUCCESS');
return cb(null, data.data);
}, function(data) {
$log.error('Amazon.com Gift Card Cancel: ' + data.data.message);
return cb(data.data);
});
};
return root;
});