You are here

protected function Payflow::prepareRemoteId in Commerce PayPal 8

Gets a composite Remote ID from two Payflow payment transaction fields.

Parameters

array $data: A data array including 'pnref' and 'authcode' keys.

Return value

bool|string FALSE if required keys are missing, or a string "<pnref>|<authcode>".

File

src/Plugin/Commerce/PaymentGateway/Payflow.php, line 244

Class

Payflow
Provides the PayPal Payflow payment gateway.

Namespace

Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway

Code

protected function prepareRemoteId(array $data) {
  if (!array_key_exists('pnref', $data) || !array_key_exists('authcode', $data)) {
    return FALSE;
  }
  return $data['pnref'] . '|' . $data['authcode'];
}