cancel
Showing results for 
Search instead for 
Did you mean: 

AIM sample not working?

I have verified all of the configuration requirements are present for the server, and that the SDK seems to be installed accordingly. I used the SPL autoloader according to: http://developer.authorize.net/hello_world/

 

My sandbox account is in Live mode. I am NOT using HTTPS for sandbox mode.

 

I have only updated the autoloader location from the sdk (which I verified returns the class data), name, transactionkey.

 

Dumping the request object:

$request->setTransactionRequest( $transactionRequestType);

shows that the data is configured by the SDK to send. 

 

Once the script fires the following:

 

$controller = new AnetController\CreateTransactionController($request); 
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);

it throws a 500 error and does not complete the php script to determine if the response was null or not.

 

I am using the charge-credit-card.php sample file and have tested this on two seprate hosting providers with the same results.

 

This is one of the last peices to getting our site online, so any advice would be greatley appreciateed ASAP!

 

Thank you for the help!

WDAuth21
Member
4 REPLIES 4

Hello @WDAuth21

 

You may need to change your server configuration so you can see the actual php error and not just the 500 message.

 

Richard

RichardH
Administrator Administrator
Administrator

I found a simple note on the GitHub readme for the SDK which says this is a command line program?

I am having to research how to even access this at all at this point. I have never used such.

 

When I run the script in the web browser directly, it throws the 500 error. I am at a loss on how this will even work when I run it from my site. Any resources you can provide in explaining how this works woul dbe greatly helpful.

 

Also, any ideas on what settings need to change on my server?

 

Thanks for the response!

[Tue Jan 26 10:55:18 2016] [error] [client 69.15.179.114] PHP Fatal error:  Class 'JMS\\Serializer\\Annotation\\Type' not found in /home/wdmediac/public_html/dev/authnet/sdk/lib/net/authorize/util/SensitiveDataConfigType.php on line 6
[Tue Jan 26 10:55:18 2016] [error] [client 69.15.179.114] PHP Warning:  include(): Failed opening '/home/wdmediac/public_html/dev/authnet/sdk/vendor/jms/serializer/src/JMS/Serializer/Annotation/Type.php' for inclusion (include_path='.:/opt/ntphp/php55/lib/php') in /home/wdmediac/public_html/dev/authnet/sdk/autoload.php on line 15
[Tue Jan 26 10:55:18 2016] [error] [client 69.15.179.114] PHP Warning:  include(/home/wdmediac/public_html/dev/authnet/sdk/vendor/jms/serializer/src/JMS/Serializer/Annotation/Type.php): failed to open stream: No such file or directory in /home/wdmediac/public_html/dev/authnet/sdk/autoload.php on line 15
[Tue Jan 26 10:55:18 2016] [error] [client 69.15.179.114] PHP Warning:  include(/home/wdmediac/public_html/dev/authnet/sdk/vendor/jms/serializer/src/JMS/Serializer/Annotation/Type.php): failed to open stream: No such file or directory in /home/wdmediac/public_html/dev/authnet/sdk/autoload.php on line 15

Found the error log - seems that I need to change directory paths in more than just the sample file seeing 'vender' still appearing

Problem solved by getting a new server with SSH and installing Composer.

 

I would suggest letting people know that your SDK for the SPL Autoloader does not have all of the dependencies included in the package, and to offer a bit more information on using composer. Would have saved me a few days of work!

 

Thank you!