Browse Source

Fixed null value in request

proxy_request
Daan Geurts 5 years ago
parent
commit
2ff7a78a7b
  1. 6
      .travis.yml
  2. 4
      src/model/NotificationPayload.php

6
.travis.yml

@ -13,8 +13,6 @@ matrix:
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPENUM='1.*' PHPUNIT='7.*' COMPOSER_FLAGS='--prefer-stable' env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPENUM='1.*' PHPUNIT='7.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.3 - php: 7.3
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' PHPENUM='1.*' PHPUNIT='7.*' COMPOSER_FLAGS='--prefer-lowest' 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 - php: 7.2
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPENUM='1.*' PHPUNIT='8.*' COMPOSER_FLAGS='--prefer-stable' env: LARAVEL='5.8.*' TESTBENCH='3.8.*' PHPENUM='1.*' PHPUNIT='8.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.3 - php: 7.3
@ -22,10 +20,10 @@ matrix:
before_install: before_install:
- travis_retry composer self-update - 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: install:
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest - travis_retry composer update --prefer-dist --no-interaction --no-suggest
script: script:
- vendor/bin/phpunit - vendor/bin/phpunit

4
src/model/NotificationPayload.php

@ -41,7 +41,11 @@ class NotificationPayload
$instance->latestReceipt = $request->input('latest_receipt'); $instance->latestReceipt = $request->input('latest_receipt');
$instance->latestReceiptInfo = Receipt::createFromArray($request->input('latest_receipt_info')); $instance->latestReceiptInfo = Receipt::createFromArray($request->input('latest_receipt_info'));
$instance->latestExpiredReceipt = $request->input('latest_expired_receipt'); $instance->latestExpiredReceipt = $request->input('latest_expired_receipt');
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'));
} else {
$instance->latestExpiredReceiptInfo = null;
}
$instance->autoRenewStatus = $request->input('auto_renew_status'); $instance->autoRenewStatus = $request->input('auto_renew_status');
$instance->autoRenewProductId = $request->input('auto_renew_product_id'); $instance->autoRenewProductId = $request->input('auto_renew_product_id');
$instance->autoRenewStatusChangeDate = $request->input('auto_renew_status_change_date'); $instance->autoRenewStatusChangeDate = $request->input('auto_renew_status_change_date');

Loading…
Cancel
Save