| @@ 139-142 (lines=4) @@ | ||
| 136 | $source_object = $prepared_source->source_object; |
|
| 137 | ||
| 138 | // Check if we don't allow prepaid credit cards. |
|
| 139 | if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $source_object ) ) { |
|
| 140 | $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' ); |
|
| 141 | throw new WC_Stripe_Exception( print_r( $source_object, true ), $localized_message ); |
|
| 142 | } |
|
| 143 | ||
| 144 | if ( empty( $prepared_source->source ) ) { |
|
| 145 | $localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' ); |
|
| @@ 698-701 (lines=4) @@ | ||
| 695 | $prepared_source = $this->prepare_source( get_current_user_id(), $force_save_source ); |
|
| 696 | ||
| 697 | // Check if we don't allow prepaid credit cards. |
|
| 698 | if ( ! apply_filters( 'wc_stripe_allow_prepaid_card', true ) && $this->is_prepaid_card( $prepared_source->source_object ) ) { |
|
| 699 | $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' ); |
|
| 700 | throw new WC_Stripe_Exception( print_r( $prepared_source->source_object, true ), $localized_message ); |
|
| 701 | } |
|
| 702 | ||
| 703 | if ( empty( $prepared_source->source ) ) { |
|
| 704 | $localized_message = __( 'Payment processing failed. Please retry.', 'woocommerce-gateway-stripe' ); |
|