public function onReceivePaymentNotification(object $order) : void

Fires before starting the validation of a payment transaction.


Description

This hook is triggering after reaching the notify_url pinged by the payment driver to complete the validation. In case you don't enter here, there's something wrong with your payment/server configuration.

Plugins can use this hook to apply some modifications to the order/reservation object. It is helpful to track and store the logs of the payment wherever you want.

This hook DOES NOT trigger in case the order doesn't exist.


Parameters

$order

(VAPOrderWrapper)  An object holding the details of the reservation/order.

Return Value

None.


Example

/**
 * This hook is triggered every time a payment tries
 * to validate a transaction made.
 *
 * @param   mixed  $order   The object holding the details of the order.
 *
 * @return  void
 */
public function onReceivePaymentNotification($order)
{
    /**
     * @todo do stuff here
     */
}

Changelog

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