|
@@ 260-268 (lines=9) @@
|
| 257 |
|
|
| 258 |
|
$gateway_url = $this->_debug_mode ? 'https://www.sandbox.paypal.com' : 'https://www.paypal.com'; |
| 259 |
|
$payment->set_redirect_url( $gateway_url . '/checkoutnow?useraction=commit&cmd=_express-checkout&token=' . $response_args['TOKEN'] ); |
| 260 |
|
} else { |
| 261 |
|
if ( isset($response_args['L_ERRORCODE']) ) { |
| 262 |
|
$payment->set_gateway_response( $response_args['L_ERRORCODE'] . '; ' . $response_args['L_SHORTMESSAGE'] ); |
| 263 |
|
} else { |
| 264 |
|
$payment->set_gateway_response( __( 'Error occurred while trying to setup the Express Checkout.', 'event_espresso' ) ); |
| 265 |
|
} |
| 266 |
|
$payment->set_details( $response_args ); |
| 267 |
|
$payment->set_status( $this->_pay_model->failed_status() ); |
| 268 |
|
} |
| 269 |
|
|
| 270 |
|
return $payment; |
| 271 |
|
} |
|
@@ 333-341 (lines=9) @@
|
| 330 |
|
$payment->set_details( $cdata_response_args ); |
| 331 |
|
$payment->set_gateway_response( isset( $docheckout_response_args['PAYMENTINFO_0_ACK'] ) ? $docheckout_response_args['PAYMENTINFO_0_ACK'] : '' ); |
| 332 |
|
$payment->set_status( $this->_pay_model->approved_status() ); |
| 333 |
|
} else { |
| 334 |
|
if ( isset($docheckout_response_args['L_ERRORCODE']) ) { |
| 335 |
|
$payment->set_gateway_response( $docheckout_response_args['L_ERRORCODE'] . '; ' . $docheckout_response_args['L_SHORTMESSAGE'] ); |
| 336 |
|
} else { |
| 337 |
|
$payment->set_gateway_response( __( 'Error occurred while trying to Capture the funds.', 'event_espresso' ) ); |
| 338 |
|
} |
| 339 |
|
$payment->set_details( $docheckout_response_args ); |
| 340 |
|
$payment->set_status( $this->_pay_model->declined_status() ); |
| 341 |
|
} |
| 342 |
|
} else { |
| 343 |
|
if ( isset($cdata_response_args['L_ERRORCODE']) ) { |
| 344 |
|
$payment->set_gateway_response( $cdata_response_args['L_ERRORCODE'] . '; ' . $cdata_response_args['L_SHORTMESSAGE'] ); |
|
@@ 342-350 (lines=9) @@
|
| 339 |
|
$payment->set_details( $docheckout_response_args ); |
| 340 |
|
$payment->set_status( $this->_pay_model->declined_status() ); |
| 341 |
|
} |
| 342 |
|
} else { |
| 343 |
|
if ( isset($cdata_response_args['L_ERRORCODE']) ) { |
| 344 |
|
$payment->set_gateway_response( $cdata_response_args['L_ERRORCODE'] . '; ' . $cdata_response_args['L_SHORTMESSAGE'] ); |
| 345 |
|
} else { |
| 346 |
|
$payment->set_gateway_response( __( 'Error occurred while trying to get payment Details from PayPal.', 'event_espresso' ) ); |
| 347 |
|
} |
| 348 |
|
$payment->set_details( $cdata_response_args ); |
| 349 |
|
$payment->set_status( $this->_pay_model->failed_status() ); |
| 350 |
|
} |
| 351 |
|
} else { |
| 352 |
|
$payment->set_gateway_response( __( 'Error occurred while trying to process the payment.', 'event_espresso' ) ); |
| 353 |
|
$payment->set_status( $this->_pay_model->failed_status() ); |