Code Duplication    Length = 8-10 lines in 2 locations

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

@@ 686-695 (lines=10) @@
683
			// Process valid response.
684
			$this->process_response( $charge, $order );
685
686
		} else {
687
			$error_message = $intent->last_payment_error ? $intent->last_payment_error->message : "";
688
689
			/* translators: 1) The error message that was received from Stripe. */
690
			$order->update_status( 'failed', sprintf( __( 'Stripe SCA authentication failed. Reason: %s', 'woocommerce-gateway-stripe' ), $error_message ) );
691
692
			do_action( 'wc_gateway_stripe_process_webhook_payment_error', $order, $notification );
693
694
			$this->send_failed_order_email( $order_id );
695
		}
696
697
		$this->unlock_order_payment( $order );
698
	}
@@ 725-732 (lines=8) @@
722
			} else {
723
				$order->payment_complete();
724
			}
725
		} else {
726
			$error_message = $intent->last_setup_error ? $intent->last_setup_error->message : "";
727
728
			/* translators: 1) The error message that was received from Stripe. */
729
			$order->update_status( 'failed', sprintf( __( 'Stripe SCA authentication failed. Reason: %s', 'woocommerce-gateway-stripe' ), $error_message ) );
730
731
			$this->send_failed_order_email( $order_id );
732
		}
733
734
		$this->unlock_order_payment( $order );
735
	}