Remove card functionality

This commit is contained in:
Drew Warren 2017-05-29 14:04:16 -06:00
parent b4804b4c97
commit 7908154372
1 changed files with 13 additions and 0 deletions

View File

@ -30,6 +30,19 @@ OAUTH3.api['account.addCard'] = function (providerUri, opts) {
}); });
}; };
OAUTH3.api['account.removeCard'] = function (providerUri, opts) {
var session = opts.session;
return OAUTH3.request({
method: 'DELETE'
, url: OAUTH3.url.normalize(providerUri)
+ '/api/com.daplie.payments/accounts/' + session.token.sub + '/cards/' + opts.last4 + '/' + opts.brand
, session: session
}).then(function (res) {
return res;
});
};
OAUTH3.api['account.listAddresses'] = function (providerUri, opts) { OAUTH3.api['account.listAddresses'] = function (providerUri, opts) {
var session = opts.session; var session = opts.session;