| @@ 236-249 (lines=14) @@ | ||
| 233 | . '/checkoutnow?useraction=commit&cmd=_express-checkout&token=' |
|
| 234 | . $response_args['TOKEN'] |
|
| 235 | ); |
|
| 236 | } else { |
|
| 237 | if (isset($response_args['L_ERRORCODE'])) { |
|
| 238 | $payment->set_gateway_response($response_args['L_ERRORCODE'] . '; ' . $response_args['L_SHORTMESSAGE']); |
|
| 239 | } else { |
|
| 240 | $payment->set_gateway_response( |
|
| 241 | esc_html__( |
|
| 242 | 'Error occurred while trying to setup the Express Checkout.', |
|
| 243 | 'event_espresso' |
|
| 244 | ) |
|
| 245 | ); |
|
| 246 | } |
|
| 247 | $payment->set_details($response_args); |
|
| 248 | $payment->set_status($this->_pay_model->failed_status()); |
|
| 249 | } |
|
| 250 | return $payment; |
|
| 251 | } |
|
| 252 | ||
| @@ 346-363 (lines=18) @@ | ||
| 343 | ? $docheckout_response_args['PAYMENTINFO_0_ACK'] |
|
| 344 | : ''); |
|
| 345 | $payment->set_status($this->_pay_model->approved_status()); |
|
| 346 | } else { |
|
| 347 | if (isset($docheckout_response_args['L_ERRORCODE'])) { |
|
| 348 | $payment->set_gateway_response( |
|
| 349 | $docheckout_response_args['L_ERRORCODE'] |
|
| 350 | . '; ' |
|
| 351 | . $docheckout_response_args['L_SHORTMESSAGE'] |
|
| 352 | ); |
|
| 353 | } else { |
|
| 354 | $payment->set_gateway_response( |
|
| 355 | esc_html__( |
|
| 356 | 'Error occurred while trying to Capture the funds.', |
|
| 357 | 'event_espresso' |
|
| 358 | ) |
|
| 359 | ); |
|
| 360 | } |
|
| 361 | $payment->set_details($docheckout_response_args); |
|
| 362 | $payment->set_status($this->_pay_model->declined_status()); |
|
| 363 | } |
|
| 364 | } else { |
|
| 365 | if (isset($cdata_response_args['L_ERRORCODE'])) { |
|
| 366 | $payment->set_gateway_response( |
|
| @@ 364-381 (lines=18) @@ | ||
| 361 | $payment->set_details($docheckout_response_args); |
|
| 362 | $payment->set_status($this->_pay_model->declined_status()); |
|
| 363 | } |
|
| 364 | } else { |
|
| 365 | if (isset($cdata_response_args['L_ERRORCODE'])) { |
|
| 366 | $payment->set_gateway_response( |
|
| 367 | $cdata_response_args['L_ERRORCODE'] |
|
| 368 | . '; ' |
|
| 369 | . $cdata_response_args['L_SHORTMESSAGE'] |
|
| 370 | ); |
|
| 371 | } else { |
|
| 372 | $payment->set_gateway_response( |
|
| 373 | esc_html__( |
|
| 374 | 'Error occurred while trying to get payment Details from PayPal.', |
|
| 375 | 'event_espresso' |
|
| 376 | ) |
|
| 377 | ); |
|
| 378 | } |
|
| 379 | $payment->set_details($cdata_response_args); |
|
| 380 | $payment->set_status($this->_pay_model->failed_status()); |
|
| 381 | } |
|
| 382 | } else { |
|
| 383 | $payment->set_gateway_response( |
|
| 384 | esc_html__( |
|