sample-code-php
sample-code-php copied to clipboard
Class 'net\authorize\util\Mapper' not found
Hi,
I'm trying to make a test with the sdk-php-2.0.0-ALPHA version.
In sample code PaymentTransactions/credit-bank-account.php
I just use this code and got the error that i wrote in the title.
This is the related line in the code:
$mapper = \net\authorize\util\Mapper::Instance();
Any help?
Hi @ne0c0de
How are you using the SDK? Are you using composer?
Once you updated the sdk to "authorizenet/authorizenet": "2.0.0-ALPHA", did you run composer update
?
I used the release zip file with manual include autoloader.php
but after that i tried to install it via composer and it works.
But i expected that the zip downloaded release should also work. (Btw i tried stable zip release and it also gave another error)
Ok the autoload.php is not updated, hence you were getting this issue.
Thanks for reporting it, we will update the autoload.php
In the stable version autoload.php won't work out of the box as it requires composer to get the dependencies, this will be fixed in 2.0.0 as we have removed those third party dependencies.