PaymentIntentService::confirm( string $id, null|array $params = null, null|array|StripeUtilRequestOptions $opts = null )
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment.
Description Description
If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the
requires_action
status and
suggest additional actions via
next_action
. If payment fails, the
PaymentIntent will transition to the
requires_payment_method
status. If payment succeeds, the PaymentIntent will transition to the
succeeded
status (or
requires_capture
, if
capture_method
is set to
manual
).
If the
confirmation_method
is
automatic
, payment may
be attempted using our client SDKs and
the PaymentIntent’s client_secret. After
next_action
s are handled by the client, no additional confirmation
is required to complete the payment.
If the
confirmation_method
is
manual
, all payment
attempts must be initiated using a secret key. If any actions are required for
the payment, the PaymentIntent will return to the
requires_confirmation
state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. Read the expanded documentation to learn more about manual confirmation.
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