Skip to content

Commit 5739fc3

Browse files
committed
add ability to cancel a payment intent
1 parent 433d0a0 commit 5739fc3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/services/payment-intent.js

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ module.exports = class Service extends Base {
2525
if (capture) {
2626
return this.stripe.paymentIntents.capture(id, stripe);
2727
}
28+
29+
if (cancel) {
30+
return this.stripe.paymentIntents.cancel(id, stripe);
31+
}
32+
2833
return this._update(id, rest, params);
2934
}
3035

0 commit comments

Comments
 (0)