English (United Kingdom)
Knowledge Base  >  Vik Appointments  >  Hooks  >  Payment  >  Successful Transaction

do_action( 'vikappointments_success_payment_transaction', mixed $dummy, array $transaction, array $result )

Fires after a successful transaction.


Description

It is possible to use this hook to track all the successful payment transactions.


Parameters

$dummy

(mixed)  Internal environment argument. Always ignore it.

$transaction

(array)  An associative array containing the transaction details.

$result

(array)  An associative array containing the transaction result.


Example

/**
 * This hook is triggered after a successful transaction.
 *
 * @param  mixed  $dummy        Internal environment argument.
 * @param  array  $transaction  The array holding the transaction details.
 * @param  array  $result       The transaction result array.
 */
add_action('vikappointments_success_payment_transaction', function($dummy, $transaction, $result)
{
    /**
     * @todo do stuff here
     */
}, 10, 3);

Changelog

Version Description
1.0 Introduced.
Last Update: 2021-07-29
Helpful?