From 613a64efc93ff446028b0d463fd4ff4ec4bf05c3 Mon Sep 17 00:00:00 2001 From: Md Biplob Hossain Date: Thu, 24 Dec 2020 20:19:29 +0900 Subject: [PATCH] Add the EventType field to IpnHandler when it is available --- AmazonPay/IpnHandler.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AmazonPay/IpnHandler.php b/AmazonPay/IpnHandler.php index 3b4df8a..801bc87 100644 --- a/AmazonPay/IpnHandler.php +++ b/AmazonPay/IpnHandler.php @@ -457,7 +457,10 @@ private function getRemainingIpnFields() 'NotificationType' =>$ipnMessage['NotificationType'], 'SellerId' =>$ipnMessage['SellerId'], 'ReleaseEnvironment' =>$ipnMessage['ReleaseEnvironment'] ); - + // Add the EventType field when it's available. e.g- BillingAgreementNotification + if (isset($ipnMessage['EventType'])) { + $remainingFields['EventType'] = $ipnMessage['EventType']; + } return $remainingFields; }