sample-code-php icon indicating copy to clipboard operation
sample-code-php copied to clipboard

Class 'net\authorize\util\Mapper' not found

Open ne0c0de opened this issue 5 years ago • 3 comments

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?

ne0c0de avatar Oct 08 '18 18:10 ne0c0de

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 ?

kikmak42 avatar Oct 09 '18 07:10 kikmak42

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)

ne0c0de avatar Oct 09 '18 07:10 ne0c0de

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.

kikmak42 avatar Oct 09 '18 08:10 kikmak42