Code Duplication    Length = 4-4 lines in 2 locations

includes/class-wc-gateway-stripe.php 1 location

@@ 495-498 (lines=4) @@
492
			$source_object   = $prepared_source->source_object;
493
494
			// Check if we don't allow prepaid credit cards.
495
			if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $source_object ) ) {
496
				$localized_message = __( 'Sorry, we\'re not accepting prepaid cards at this time. Your credit card has not been charge. Please try with alternative payment method.', 'woocommerce-gateway-stripe' );
497
				throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message );
498
			}
499
500
			if ( empty( $prepared_source->source ) ) {
501
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );

includes/compat/class-wc-stripe-compat.php 1 location

@@ 94-97 (lines=4) @@
91
			$source_object   = $prepared_source->source_object;
92
93
			// Check if we don't allow prepaid credit cards.
94
			if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $source_object ) ) {
95
				$localized_message = __( 'Sorry, we\'re not accepting prepaid cards at this time. Your credit card has not been charge. Please try with alternative payment method.', 'woocommerce-gateway-stripe' );
96
				throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message );
97
			}
98
99
			if ( empty( $prepared_source->source ) ) {
100
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );