public function onFailPaymentTransaction( array $transaction, array $result ) : void

Fires after a failed transaction.


Description

It is possible to use this hook to track all the payment transactions that faced an error.


Parameters

$transaction

(array)  An associative array containing the transaction details.

$result

(array)  An associative array containing the transaction result.

Return Value

None.


Example

/**
 * This hook is triggered after a failed transaction.
 *
 * @param   array  $transaction  The array holding the transaction details.
 * @param   array  $result       The transaction result array.
 *
 * @return  void
 */
public function onFailPaymentTransaction($transaction, $result)
{
    /**
     * @todo do stuff here
     */
}

Changelog

Version Description
1.8.1 Introduced.
Last Update: 2023-12-29 14:15
Helpful?