diff --git a/phpstan.neon b/phpstan.neon
index 279478d..dff4b90 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -2,10 +2,10 @@
parameters:
tmpDir: /tmp/phpstan-codeblocks-amazon-incentives
- level: max
+ level: 8
paths:
- %currentWorkingDirectory%
- excludes_analyse:
+ excludePaths:
# ignore composer
- vendor
# ignore errores with
diff --git a/test/aws_gift_card_tests.php b/test/aws_gift_card_tests.php
index 260c3d0..eb02998 100644
--- a/test/aws_gift_card_tests.php
+++ b/test/aws_gift_card_tests.php
@@ -181,6 +181,28 @@ if ($run_gift_tests === true) {
}
print "
";
sleep($debug_wait);
+ // request same card again and get error
+ try {
+ $aws_test = AmazonIncentives::make()->buyGiftCard((float)$value, $creation_request_id);
+ $request_status = $aws_test->getStatus();
+ // same?
+ $claim_code = $aws_test->getClaimCode();
+ $expiration_date = $aws_test->getExpirationDate();
+ print "AWS: buyGiftCard: CANCLED SAME CODE AGAIN: " . $request_status . ": "
+ . "creationRequestId: " . $creation_request_id . ", gcId: " . $gift_card_id . ", "
+ . "EXPIRE DATE: " . dateTr($expiration_date) . ", "
+ . "CLAIM CODE: " . $claim_code . "";
+ if ($debug_print === true) {
+ print "
" . print_r($aws_test, true) . ""; + } + fwrite($fp, writeLog((array)$aws_test)); + } catch (\Exception $e) { + $error = AmazonIncentives::decodeExceptionMessage($e->getMessage()); + printException('buyGiftCard', $e->getCode(), $error, $debug_print); + fwrite($fp, writeLog($error)); + } + print "