Code Duplication    Length = 8-10 lines in 2 locations

includes/class-wc-stripe-webhook-handler.php 2 locations

@@ 672-681 (lines=10) @@
669
			// Process valid response.
670
			$this->process_response( $charge, $order );
671
672
		} else {
673
			$error_message = $intent->last_payment_error ? $intent->last_payment_error->message : "";
674
675
			/* translators: 1) The error message that was received from Stripe. */
676
			$order->update_status( 'failed', sprintf( __( 'Stripe SCA authentication failed. Reason: %s', 'woocommerce-gateway-stripe' ), $error_message ) );
677
678
			do_action( 'wc_gateway_stripe_process_webhook_payment_error', $order, $notification );
679
680
			$this->send_failed_order_email( $order_id );
681
		}
682
683
		$this->unlock_order_payment( $order );
684
	}
@@ 711-718 (lines=8) @@
708
			} else {
709
				$order->payment_complete();
710
			}
711
		} else {
712
			$error_message = $intent->last_setup_error ? $intent->last_setup_error->message : "";
713
714
			/* translators: 1) The error message that was received from Stripe. */
715
			$order->update_status( 'failed', sprintf( __( 'Stripe SCA authentication failed. Reason: %s', 'woocommerce-gateway-stripe' ), $error_message ) );
716
717
			$this->send_failed_order_email( $order_id );
718
		}
719
720
		$this->unlock_order_payment( $order );
721
	}