| @@ 93-101 (lines=9) @@ | ||
| 90 | */ |
|
| 91 | protected function process_subscription( $order, $cart_token = '' ) { |
|
| 92 | try { |
|
| 93 | if ( empty( $cart_token ) ) { |
|
| 94 | $error_msg = __( 'Please make sure your card details have been entered correctly and that your browser supports JavaScript.', 'woocommerce' ); |
|
| 95 | ||
| 96 | if ( 'yes' == $this->sandbox ) { |
|
| 97 | $error_msg .= ' ' . __( 'Developers: Please make sure that you\'re including jQuery and there are no JavaScript errors on the page.', 'woocommerce' ); |
|
| 98 | } |
|
| 99 | ||
| 100 | throw new Simplify_ApiException( $error_msg ); |
|
| 101 | } |
|
| 102 | ||
| 103 | // Create customer |
|
| 104 | $customer = Simplify_Customer::createCustomer( array( |
|
| @@ 187-195 (lines=9) @@ | ||
| 184 | throw new Simplify_ApiException( $error_msg ); |
|
| 185 | } |
|
| 186 | ||
| 187 | if ( empty( $cart_token ) ) { |
|
| 188 | $error_msg = __( 'Please make sure your card details have been entered correctly and that your browser supports JavaScript.', 'woocommerce' ); |
|
| 189 | ||
| 190 | if ( 'yes' == $this->sandbox ) { |
|
| 191 | $error_msg .= ' ' . __( 'Developers: Please make sure that you\'re including jQuery and there are no JavaScript errors on the page.', 'woocommerce' ); |
|
| 192 | } |
|
| 193 | ||
| 194 | throw new Simplify_ApiException( $error_msg ); |
|
| 195 | } |
|
| 196 | ||
| 197 | // Create customer |
|
| 198 | $customer = Simplify_Customer::createCustomer( array( |
|
| @@ 315-323 (lines=9) @@ | ||
| 312 | protected function process_standard_payments( $order, $cart_token = '' ) { |
|
| 313 | try { |
|
| 314 | ||
| 315 | if ( empty( $cart_token ) ) { |
|
| 316 | $error_msg = __( 'Please make sure your card details have been entered correctly and that your browser supports JavaScript.', 'woocommerce' ); |
|
| 317 | ||
| 318 | if ( 'yes' == $this->sandbox ) { |
|
| 319 | $error_msg .= ' ' . __( 'Developers: Please make sure that you\'re including jQuery and there are no JavaScript errors on the page.', 'woocommerce' ); |
|
| 320 | } |
|
| 321 | ||
| 322 | throw new Simplify_ApiException( $error_msg ); |
|
| 323 | } |
|
| 324 | ||
| 325 | $payment = Simplify_Payment::createPayment( array( |
|
| 326 | 'amount' => $order->order_total * 100, // In cents. |
|