cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

Upgrading PHP SDK to PHP 8.1

I'm part of a development team that manages a website using the Authorize.net PHP SDK. I hope this is the right place to ask questions about this. 
 
The website is currently using v.2.0.2 of the Official PHP SDK for Authorize.Net. Our website uses PHP 7.4 but as this is now end-of-life, we're looking to upgrade to PHP 8.1. We ran some tests using 8.1, but the API threw fatal errors including:
 
Error [number 1] During inheritance of JsonSerializable: Uncaught ; File: folder_name/vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/MerchantAuthenticationType.php; Line: 11
 
Error [number 8192] Return type of net\authorize\api\contract\v1\MerchantAuthenticationType::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice; File: folder_name/vendor/authorizenet/authorizenet/lib/net/authorize/api/contract/v1/MerchantAuthenticationType.php; Line: 261
I looked on the Github pages at https://github.com/AuthorizeNet/sdk-php/ for an updated version of the code for PHP 8.1 but it looks like 2.0.2 is the latest version. I also saw quite a few people complaining that the code didn't work on PHP 8.1. 
 
I'd really appreciate guidance on where to go from here - are there plans to release a fix for PHP 8.1, or is there an easy way I can fix this myself? 
iteracy
Member
Who Me Too'd this topic