PaymentIntentService::cancel( string $id, null|array $params = null, null|array|StripeUtilRequestOptions $opts = null )
A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method
, requires_capture
, requires_confirmation
, or requires_action
.
Description Description
Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with
status=’requires_capture’
, the remaining
amount_capturable
will automatically be refunded.
Parameters Parameters
- $id
-
(Required)
- $params
-
(Optional)
Default value: null
- $opts
-
(Optional)
Default value: null
Return Return
(StripePaymentIntent)
Source Source
File: includes/gateways/stripe/vendor/stripe/stripe-php/lib/Service/PaymentIntentService.php