Your cart is empty!
Init Transaction
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
Version | Description |
---|---|
1.8.1 | Introduced. |
Last Update: 2023-12-29 14:15
Helpful?