Analyzing the nature of the notification
The vads_url_check_src field allows to differentiate the notifications based on their triggering event:
- mandate registration (with or without the subscription to a recurring payment),
- installment payment,
- new notification sent by the merchant via the Merchant Back Office.
It specifies the applied notification rule:
The PAY value is sent in the following cases:
Execution of the notification via the Merchant Back Office (right-click a transaction > Send the Instant Payment Notification).
The BATCH value is sent in case of an update of a transaction status after its synchronization on the acquirer side.
Only if the merchant has configured the rule Instant Payment Notification URL on batch change.
The BATCH_AUTO value is sent in the following cases:
The notification is sent with the authorization request for payments with "Waiting for authorization" status.
The REC value is sent only for recurring payments if the merchant has configured the Instant Payment Notification URL when creating recurring payments rule.
The MERCH_BO value is sent:
Automatic retry of the IPN.
After checking its value, the script can process differently depending on the nature of the notification.
If vads_url_check_src is set to PAY or BATCH_AUTO, the script will update the order status, etc.
In the context of a recurring payment (from a REGISTER_SUBSCRIBE), the payment gateway notifies the creditor (merchant) when creating each transaction.