| @@ 433-437 (lines=5) @@ | ||
| 430 | $order = wc_get_order( $order_id ); |
|
| 431 | $source = $this->get_source( get_current_user_id(), $force_customer ); |
|
| 432 | ||
| 433 | if ( empty( $source->source ) && empty( $source->customer ) ) { |
|
| 434 | $error_msg = __( 'Please enter your card details to make a payment.', 'woocommerce-gateway-stripe' ); |
|
| 435 | $error_msg .= ' ' . __( 'Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.', 'woocommerce-gateway-stripe' ); |
|
| 436 | throw new Exception( $error_msg ); |
|
| 437 | } |
|
| 438 | ||
| 439 | // Store source to order meta |
|
| 440 | $this->save_source( $order, $source ); |
|
| @@ 622-626 (lines=5) @@ | ||
| 619 | $order = wc_get_order( $order_id ); |
|
| 620 | $source = $this->get_source( get_current_user_id(), $force_customer ); |
|
| 621 | ||
| 622 | if ( empty( $source->source ) && empty( $source->customer ) ) { |
|
| 623 | $error_msg = __( 'Please enter your card details to make a payment.', 'woocommerce-gateway-stripe' ); |
|
| 624 | $error_msg .= ' ' . __( 'Developers: Please make sure that you are including jQuery and there are no JavaScript errors on the page.', 'woocommerce-gateway-stripe' ); |
|
| 625 | throw new Exception( $error_msg ); |
|
| 626 | } |
|
| 627 | ||
| 628 | // Store source to order meta. |
|
| 629 | $this->save_source( $order, $source ); |
|