public function onInitPaymentTransaction(array &$transaction, mixed &$params) : void

Fires while instantiating the payment gateway for the validation of the transaction.


Description

Use this hook to manipulate the transaction details and the configuration of the payment.

This hook DOES NOT trigger in case the payment assigned to the order doesn't exist anymore.


Parameters

&$transaction

(array)  An associative array containing the transaction details.

&$params

(string|array)  Either an array or a JSON string holding the configuration of the payment.

Return Value

None.


Example

/**
 * This hook is triggered before creating the payment instance.
 *
 * @param   array  &$transaction  The array holding the transaction details.
 * @param   mixed  &$params       Either a JSON string or a configuration array.
 *
 * @return  void
 */
public function onInitPaymentTransaction(&$transaction, &$params)
{
    /**
     * @todo do stuff here
     */
}

Changelog

VersionDescription
1.6 Introduced.
Last Update: 2021-10-08 14:36
Helpful?
This site uses cookies. By continuing to browse you accept their use. Further information