| @@ -212,12 +212,12 @@ | ||
| 212 | 212 | } else { |
| 213 | 213 | $paypal_payment_url = $this->create_payment_url( $order ); |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - $result['result'] = 'success'; | |
| 217 | - $result['redirect'] = $paypal_payment_url; | |
| 218 | - | |
| 219 | - return $result; | |
| 216 | + return [ | |
| 217 | + 'result' => 'success', | |
| 218 | + 'redirect' => $paypal_payment_url, | |
| 219 | + ]; | |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
| 223 | 223 | * Prepare args to send to PayPal |
| @@ -1345,9 +1345,9 @@ | ||
| 1345 | 1345 | ) |
| 1346 | 1346 | ); |
| 1347 | 1347 | |
| 1348 | 1348 | if ( is_wp_error( $response ) ) { |
| 1349 | - throw new Exception( $response->get_error_message(), $response->get_error_code() ); | |
| 1349 | + throw new Exception( $response->get_error_message() ); | |
| 1350 | 1350 | } |
| 1351 | 1351 | |
| 1352 | 1352 | $body = wp_remote_retrieve_body( $response ); |
| 1353 | 1353 | $response_data = LP_Helper::json_decode( $body, true ); |
| @@ -1711,9 +1711,9 @@ | ||
| 1711 | 1711 | ) |
| 1712 | 1712 | ); |
| 1713 | 1713 | |
| 1714 | 1714 | if ( is_wp_error( $response ) ) { |
| 1715 | - throw new Exception( $response->get_error_message(), $response->get_error_code() ); | |
| 1715 | + throw new Exception( $response->get_error_message() ); | |
| 1716 | 1716 | } |
| 1717 | 1717 | |
| 1718 | 1718 | $verify_result = LP_Helper::json_decode( wp_remote_retrieve_body( $response ), true ); |
| 1719 | 1719 | $is_verified = ! empty( $verify_result['verification_status'] ) |