You are here

public function PayPalPaymentECPaymentMethodController::saveAuthentication in PayPal for Payment 7

Saves authentication information.

Parameters

PayPalPaymentECAuthentication $authentication:

Return value

integer MergeQuery::STATUS_INSERT or MergeQuery::STATUS_NEW.

1 call to PayPalPaymentECPaymentMethodController::saveAuthentication()
PayPalPaymentECPaymentMethodController::execute in paypal_payment_ec/includes/PayPalPaymentECPaymentMethodController.inc
Execute a payment.

File

paypal_payment_ec/includes/PayPalPaymentECPaymentMethodController.inc, line 263

Class

PayPalPaymentECPaymentMethodController
A PayPal Express Checkout payment method.

Code

public function saveAuthentication(PayPalPaymentECAuthentication $authentication) {
  $merge_status = db_merge('paypal_payment_ec_payment')
    ->key(array(
    'pid' => $authentication->pid,
  ))
    ->fields(array(
    'created' => $authentication->created,
    'payerID' => $authentication->payerID,
    'pid' => $authentication->pid,
    'token' => $authentication->token,
  ))
    ->execute();
  return $merge_status;
}