From dacd98b5103def271fe18f0b6df4aaaed172484c Mon Sep 17 00:00:00 2001 From: Rodrigo Gonzalez Date: Sat, 18 Mar 2023 16:48:29 -0300 Subject: [PATCH] Now unified receipt is an des ordered array so take the latest receipt only --- src/model/NotificationPayload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/NotificationPayload.php b/src/model/NotificationPayload.php index d570745..e3eea84 100644 --- a/src/model/NotificationPayload.php +++ b/src/model/NotificationPayload.php @@ -86,7 +86,7 @@ class NotificationPayload } $instance->latestExpiredReceipt = $request->input('unified_receipt.latest_expired_receipt'); if ($request->has('unified_receipt.latest_expired_receipt_info')) { - $instance->latestExpiredReceiptInfo = Receipt::createFromArray($request->input('unified_receipt.latest_expired_receipt_info')); + $instance->latestExpiredReceiptInfo = Receipt::createFromArray($request->input('unified_receipt.latest_expired_receipt_info')[0]); } else { $instance->latestExpiredReceiptInfo = null; }