Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 686-689 (lines=4) @@
683
			$source_object   = $prepared_source->source_object;
684
685
			// Check if we don't allow prepaid credit cards.
686
			if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $source_object ) ) {
687
				$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' );
688
				throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message );
689
			}
690
691
			if ( empty( $prepared_source->source ) ) {
692
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );

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

@@ 90-93 (lines=4) @@
87
			$source_object   = $prepared_source->source_object;
88
89
			// Check if we don't allow prepaid credit cards.
90
			if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $source_object ) ) {
91
				$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' );
92
				throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message );
93
			}
94
95
			if ( empty( $prepared_source->source ) ) {
96
				$localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' );