Remove card functionality
This commit is contained in:
parent
b4804b4c97
commit
7908154372
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue