Skip to content

Commit

Permalink
add ability to cancel a payment intent
Browse files Browse the repository at this point in the history
  • Loading branch information
OMFG5716 committed Apr 17, 2022
1 parent 433d0a0 commit 5739fc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/services/payment-intent.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ module.exports = class Service extends Base {
if (capture) {
return this.stripe.paymentIntents.capture(id, stripe);
}

if (cancel) {
return this.stripe.paymentIntents.cancel(id, stripe);
}

return this._update(id, rest, params);
}

Expand Down

0 comments on commit 5739fc3

Please sign in to comment.