Analyzing the nature of notification
The vads_url_check_src field allows to differentiate the notifications according to their triggering event (creation of a transaction, new notification sent by the merchant from the Back Office, etc.):
- creating a transaction,
- a new notification sent by the merchant from the Back Office.
The PAY value will be sent in the following cases:
|BO||Execution of the notification from the Back Office (right-click on a transaction > Execute the IPN URL).|
The BATCH_AUTO value will be sent in the following cases:
The notification will be sent with the authorization request for payments with "Awaiting authorization" status.
The REC value is sent only for subscription payments if the merchant has configured the rule for Instant Payment Notification URL when creating recurring payments.
|MERCH_BO||The MERCH_BO value will be sent in the following cases:
|RETRY||Automatic retry of the IPN.|
After checking its value, the script will be able to 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.
If vads_url_check_src is set to REC, the script will retrieve the subscription reference and will increment the number of the expired installment payments in case the payment has been accepted, etc.