@@ 681-690 (lines=10) @@ | ||
678 | // Process valid response. |
|
679 | $this->process_response( $charge, $order ); |
|
680 | ||
681 | } else { |
|
682 | $error_message = $intent->last_payment_error ? $intent->last_payment_error->message : ""; |
|
683 | ||
684 | /* translators: 1) The error message that was received from Stripe. */ |
|
685 | $order->update_status( 'failed', sprintf( __( 'Stripe SCA authentication failed. Reason: %s', 'woocommerce-gateway-stripe' ), $error_message ) ); |
|
686 | ||
687 | do_action( 'wc_gateway_stripe_process_webhook_payment_error', $order, $notification ); |
|
688 | ||
689 | $this->send_failed_order_email( $order_id ); |
|
690 | } |
|
691 | ||
692 | $this->unlock_order_payment( $order ); |
|
693 | } |
|
@@ 720-727 (lines=8) @@ | ||
717 | } else { |
|
718 | $order->payment_complete(); |
|
719 | } |
|
720 | } else { |
|
721 | $error_message = $intent->last_setup_error ? $intent->last_setup_error->message : ""; |
|
722 | ||
723 | /* translators: 1) The error message that was received from Stripe. */ |
|
724 | $order->update_status( 'failed', sprintf( __( 'Stripe SCA authentication failed. Reason: %s', 'woocommerce-gateway-stripe' ), $error_message ) ); |
|
725 | ||
726 | $this->send_failed_order_email( $order_id ); |
|
727 | } |
|
728 | ||
729 | $this->unlock_order_payment( $order ); |
|
730 | } |