Function Hook_payment_gateway_paypal->handle_transaction

Definitions

sources/hooks/systems/payment_gateway/paypal.php

  • Process a transaction after receiving its full key/value details from PayPal.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$data array No No required parameter N/A N/A List of key=>value pairs from PayPal
$silent_fail boolean No No False N/A N/A Whether to return null on error rather than exiting

Returns

  • A long tuple of collected data. Emulates some of the key variables of the PayPal IPN/PDT response (null: no transaction; only returned if $silent_fail is true)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Process a transaction after receiving its full key/value details from PayPal.
 *
 * @param  array $data List of key=>value pairs from PayPal
 * @param  boolean $silent_fail Whether to return null on error rather than exiting
 * @return ?array A long tuple of collected data. Emulates some of the key variables of the PayPal IPN/PDT response (null: no transaction; only returned if $silent_fail is true)
 */

protected function handle_transaction(array $data, bool $silent_fail = false) : ?array