Browse Source

Check that latest receipt is defined

proxy_request
Rodrigo Gonzalez 4 years ago
parent
commit
d5f561048d
  1. 4
      src/model/NotificationPayload.php

4
src/model/NotificationPayload.php

@ -39,7 +39,11 @@ class NotificationPayload
$instance->cancellationDateMs = $request->input('cancellation_date_ms'); $instance->cancellationDateMs = $request->input('cancellation_date_ms');
$instance->webOrderLineItemId = $request->input('web_order_line_item_id'); $instance->webOrderLineItemId = $request->input('web_order_line_item_id');
$instance->latestReceipt = $request->input('latest_receipt'); $instance->latestReceipt = $request->input('latest_receipt');
if ($request->has('latest_receipt_info')) {
$instance->latestReceiptInfo = Receipt::createFromArray($request->input('latest_receipt_info')); $instance->latestReceiptInfo = Receipt::createFromArray($request->input('latest_receipt_info'));
} else {
$instance->latestReceiptInfo = null;
}
$instance->latestExpiredReceipt = $request->input('latest_expired_receipt'); $instance->latestExpiredReceipt = $request->input('latest_expired_receipt');
if ($request->has('latest_expired_receipt_info')) { if ($request->has('latest_expired_receipt_info')) {
$instance->latestExpiredReceiptInfo = Receipt::createFromArray($request->input('latest_expired_receipt_info')); $instance->latestExpiredReceiptInfo = Receipt::createFromArray($request->input('latest_expired_receipt_info'));

Loading…
Cancel
Save