diff --git a/.travis.yml b/.travis.yml index c4c6b0a..69188e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,6 @@ matrix: env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPENUM='1.*' PHPUNIT='7.*' COMPOSER_FLAGS='--prefer-stable' - php: 7.3 env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPENUM='1.*' PHPUNIT='7.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.1 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPENUM='1.*' PHPUNIT='8.*' COMPOSER_FLAGS='--prefer-stable' - php: 7.2 env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPENUM='1.*' PHPUNIT='8.*' COMPOSER_FLAGS='--prefer-stable' - php: 7.3 @@ -22,10 +20,10 @@ matrix: before_install: - travis_retry composer self-update - - travis_retry composer require --no-update --no-interaction "illuminate/support:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" "bensampo/laravel-enum:${PHPENUM}" "phpunit/phpunit:${PHPUNIT}" + - travis_retry composer require --no-update --no-interaction install: - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest + - travis_retry composer update --prefer-dist --no-interaction --no-suggest script: - vendor/bin/phpunit diff --git a/src/model/NotificationPayload.php b/src/model/NotificationPayload.php index e5faebd..f1456fd 100644 --- a/src/model/NotificationPayload.php +++ b/src/model/NotificationPayload.php @@ -41,7 +41,11 @@ class NotificationPayload $instance->latestReceipt = $request->input('latest_receipt'); $instance->latestReceiptInfo = Receipt::createFromArray($request->input('latest_receipt_info')); $instance->latestExpiredReceipt = $request->input('latest_expired_receipt'); - $instance->latestExpiredReceiptInfo = Receipt::createFromArray($request->input('latest_expired_receipt_info')); + if ($request->has('latest_expired_receipt_info')) { + $instance->latestExpiredReceiptInfo = Receipt::createFromArray($request->input('latest_expired_receipt_info')); + } else { + $instance->latestExpiredReceiptInfo = null; + } $instance->autoRenewStatus = $request->input('auto_renew_status'); $instance->autoRenewProductId = $request->input('auto_renew_product_id'); $instance->autoRenewStatusChangeDate = $request->input('auto_renew_status_change_date');