Skip to content

Commit

Permalink
It's the last_payment_error intent
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Oct 31, 2023
1 parent e7f77da commit fe8f166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wc-gateway-stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ public function prepare_intent_for_order_pay_page( $order = null ) {
if ( 'requires_payment_method' === $intent->status && isset( $intent->last_payment_error )
&& 'authentication_required' === $intent->last_payment_error->code ) {
$level3_data = $this->get_level3_data_from_order( $order );
$payment_method = WC_Stripe_Helper::get_payment_method_from_intent( $intent );
$payment_method = WC_Stripe_Helper::get_payment_method_from_intent( $intent->last_payment_error );
$intent = WC_Stripe_API::request_with_level3_data(
[
'payment_method' => is_string( $payment_method ) ? $payment_method : $payment_method->id,
Expand Down

0 comments on commit fe8f166

Please sign in to comment.