Browse Source

New payload uses an array for receipt info

proxy_request
Rodrigo Gonzalez 2 years ago
parent
commit
4178d55145
  1. 4
      src/model/NotificationPayload.php

4
src/model/NotificationPayload.php

@ -80,7 +80,9 @@ class NotificationPayload
$instance->latestReceipt = $request->input('unified_receipt.latest_receipt'); $instance->latestReceipt = $request->input('unified_receipt.latest_receipt');
if ($request->has('unified_receipt.latest_receipt_info')) { if ($request->has('unified_receipt.latest_receipt_info')) {
$instance->latestReceiptInfo = Receipt::createFromArray($request->input('unified_receipt.latest_receipt_info')); if (count($request->input('unified_receipt.latest_receipt_info')) > 0) {
$instance->latestReceiptInfo = Receipt::createFromArray($request->input('unified_receipt.latest_receipt_info')[0]);
}
} else { } else {
$instance->latestReceiptInfo = null; $instance->latestReceiptInfo = null;
} }

Loading…
Cancel
Save