globalpayments / php-sdk

GNU General Public License v2.0
49 stars 66 forks source link

Fix 3DSv2 exception on PHP7.1+ #31

Closed joeyrush closed 4 months ago

joeyrush commented 5 years ago

The $gateway argument in the ServiceContainer needs to be nullable because when we use it in the Secure3DBuilder, we don't pass in a gateway (https://github.com/globalpayments/php-sdk/blob/master/src/Builders/Secure3dBuilder.php#L1122) which causes a fatal error in PHP 7.1 and above (see the first sub-heading from this page https://www.php.net/manual/en/migration71.incompatible.php)

Also, I've updated the RestGateway exception to include the error_detail key from the API response in the exception message because there was no way to know why an error was occurring without digging into the raw request

CristinaNechitaGP commented 4 months ago

The SDK was updated! https://github.com/globalpayments/php-sdk/blob/master/composer.json#L14