You are here

public function PayPalPaymentECPaymentMethodController::getExpressCheckoutDetails in PayPal for Payment 7

Gets checkout information.

Parameters

Payment $payment:

PayPalPaymentECAuthentication $authentication:

Return value

bool Whether the request was successful.

See also

self::setExpressCheckout()

File

paypal_payment_ec/includes/PayPalPaymentECPaymentMethodController.inc, line 194

Class

PayPalPaymentECPaymentMethodController
A PayPal Express Checkout payment method.

Code

public function getExpressCheckoutDetails(Payment $payment, PayPalPaymentECAuthentication $authentication) {
  $nvp_request = array(
    'METHOD' => 'GetExpressCheckoutDetails',
    'TOKEN' => $authentication->token,
  );
  $nvp_response = $this
    ->NVPAPIRequest($nvp_request, $payment);
  if (isset($nvp_response['PAYERID'])) {
    $authentication->payerID = $nvp_response['PAYERID'];
    return TRUE;
  }
  else {
    return FALSE;
  }
}