add "declare(strict_types=1);" to all pages
Add a json handler class to handle that json_decode always returns array<mixed> and throws error otherwise
On failure these will throw the normal JSON encoded error was FAILURE with code "J-" and the number is the json error
If 0 then the return was null or some other problem that did not return an array
amount is float and not string and checks are done that the returned value is a float
various updates for phpdoc array delcarations
- curl header is array<int, string>
- the log array is proper declared as array with string key and a list of mixed arrays
All gift card id checks are against string and not numeric.
Add missing checks for card status, card amount value, card amount
currency in any buy card checks.
Add epiration date regex check for buy card
Add request cancled card check.
All gift card id checks are against string and not numeric.
Add missing checks for card status, card amount value, card amount
currency in any buy card checks.
Add epiration date regex check for buy card
Add request cancled card check.
Test file does not run any tests automatically but they need to be
triggered with the _GET parameters.
A full phpunit test has been added for the full functionality
The method "decodeExceptionMessage" previous located in the
AmazonIncentives\AmazonIncentives main class has been moved to the
AmazonIncentives\Exceptions\AmazonErrors where it logically belongs.
A deprecation phpdoc message has been added for the current version.
Update error messages in curl error part and remove double spaces.
the method "decodeExceptionMessage" has moved from
AmazonIncentives\AmazonIncentives to
AmazonIncentives\Exceptions\AmazonErrors
The old method is currently tagged deprecated internal via @deprecated
PHPdoc entry
Instead of direct calling Client class and AWS class add a wrapper
method to call those so we can quicker replace under elements and
also do proper testing
Turn on mock tests on AWS side in normal test file
instead of direct calling Client class and AWS class add a wrapper
method to call those so we can quicker replace under elements and also
do proper testing
Update .gitattributes with more files to ignore
Add .gitignore for php unit test cache
Install dotenv file parser for unit testing
Update current test pages with dotenv file parser (replaces function
call)
Documentation PHPdoc update for checkMe method call