From cfd16287de739f93339937c03a57ddbeab473b9d Mon Sep 17 00:00:00 2001 From: Rodrigo Gonzalez Date: Fri, 4 Sep 2020 17:39:25 -0300 Subject: [PATCH] Added debug info to find the reason for the missing receipts --- src/WebhooksController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/WebhooksController.php b/src/WebhooksController.php index f6be999..0b3aa20 100644 --- a/src/WebhooksController.php +++ b/src/WebhooksController.php @@ -7,6 +7,7 @@ use Appvise\AppStoreNotifications\Model\NotificationType; use Appvise\AppStoreNotifications\Model\AppleNotification; use Appvise\AppStoreNotifications\Exceptions\WebhookFailed; use Appvise\AppStoreNotifications\Model\NotificationPayload; +use Illuminate\Support\Facades\Log; class WebhooksController { @@ -15,7 +16,12 @@ class WebhooksController $jobConfigKey = NotificationType::{$request->input('notification_type')}(); $this->determineValidRequest($request->input('password')); - AppleNotification::storeNotification($jobConfigKey, $request->input()); + $notificationId = AppleNotification::storeNotification($jobConfigKey, $request->input()); + + // FIXME: rjgonzale, why is the latest receipt null? this is for debugging + if (!$request->has('latest_receipt_info')) { + Log::error("Notification with id " . $notificationId . " does not have latest_receipt_info"); + } $payload = NotificationPayload::createFromRequest($request);