cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction API Error

Downloaded and linked the SDK library to the example on the dev site - produces:

 Uncaught Error: Class 'JMS\\Serializer\\Annotation\\Type' not found in /var/www/authnet_sdk/lib/net/authorize/util/SensitiveDataConfigType.php:6\nStack trace:\n#0 /var/www/authnet_sdk/autoload.php(16): include()\n#1 [internal function]: {closure}('net\\\\authorize\\\\u...')\n#2 [internal function]: spl_autoload_call('net\\\\authorize\\\\u...')\n#3 /var/www/authnet_sdk/lib/net/authorize/util/ANetSensitiveFields.php(15): class_exists('net\\\\authorize\\\\u...')\n#4 /var/www/authnet_sdk/lib/net/authorize/util/ANetSensitiveFields.php(82): net\\authorize\\util\\ANetSensitiveFields::fetchFromConfigFiles()\n#5 /var/www/authnet_sdk/lib/net/authorize/util/Log.php(365): net\\authorize\\util\\ANetSensitiveFields::getSensitiveXmlTags()\n#6 /var/www/authnet_sdk/lib/net/authorize/util/LogFactory.php(9): net\\authorize\\util\\Log->__construct()\n#7 /var/www/authnet_sdk/lib/net/authorize/api/controller/base/ApiOperationBase.php(51): net\\authorize\\util\\LogFactory::getLog('net\\\\authorize\\\\a...')\n#8 /var/www/authnet_sdk/lib/net/authorize/api/controller/GetSett in /var/www/authnet_sdk/lib/net/authorize/util/SensitiveDataConfigType.php on line 6

pcnweb
Member
5 REPLIES 5

Complete error:

[Thu Dec 08 15:09:39.398970 2016] [:error] [pid 13822] [client x:56824] PHP Warning: include(/var/www/authnet_sdk/vendor/jms/serializer/src/JMS/Serializer/Annotation/Type.php): failed to open stream: No such file or directory in /var/www/authnet_sdk/autoload.php on line 16

 

[Thu Dec 08 15:09:39.399400 2016] [:error] [pid 13822] [client x:56824] PHP Warning: include(): Failed opening '/var/www/authnet_sdk/vendor/jms/serializer/src/JMS/Serializer/Annotation/Type.php' for inclusion (include_path='.:/usr/share/php') in /var/www/authnet_sdk/autoload.php on line 16

 

[Thu Dec 08 15:09:39.399673 2016] [:error] [pid 13822] [client x:56824] PHP Fatal error: Uncaught Error: Class 'JMS\\Serializer\\Annotation\\Type' not found in /var/www/authnet_sdk/lib/net/authorize/util/SensitiveDataConfigType.php:6\nStack trace:\n#0 /var/www/authnet_sdk/autoload.php(16): include()\n#1 [internal function]: {closure}('net\\\\authorize\\\\u...')\n#2 [internal function]: spl_autoload_call('net\\\\authorize\\\\u...')\n#3 /var/www/authnet_sdk/lib/net/authorize/util/ANetSensitiveFields.php(15): class_exists('net\\\\authorize\\\\u...')\n#4 /var/www/authnet_sdk/lib/net/authorize/util/ANetSensitiveFields.php(82): net\\authorize\\util\\ANetSensitiveFields::fetchFromConfigFiles()\n#5 /var/www/authnet_sdk/lib/net/authorize/util/Log.php(365): net\\authorize\\util\\ANetSensitiveFields::getSensitiveXmlTags()\n#6 /var/www/authnet_sdk/lib/net/authorize/util/LogFactory.php(9): net\\authorize\\util\\Log->__construct()\n#7 /var/www/authnet_sdk/lib/net/authorize/api/controller/base/ApiOperationBase.php(51): net\\authorize\\util\\LogFactory::getLog('net\\\\authorize\\\\a...')\n#8 /var/www/authnet_sdk/lib/net/authorize/api/controller/GetTran in /var/www/authnet_sdk/lib/net/authorize/util/SensitiveDataConfigType.php on line 6

pcnweb
Member

ok, previous errors are because you can't actually use this an an SDK, because it includes an enormous number of dependencies not included in the SDK download - so I installed Composer, then require authorizenet/authorizenet and require jms/serializer, apparently that doesn't load all you need, because:

 

[Thu Dec 08 17:31:14.882312 2016] [:error] [pid 13457] [client 71.173.136.121:54846] PHP Fatal error: Uncaught Error: Class 'Symfony\\Component\\Yaml\\Yaml' not found in /home/pcn/vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/YamlDriver.php:35\nStack trace:\n#0 /home/pcn/vendor/jms/metadata/src/Metadata/Driver/AbstractFileDriver.php(28): JMS\\Serializer\\Metadata\\Driver\\YamlDriver->loadMetadataFromFile(Object(ReflectionClass), '/home/pcn/vendo...')\n#1 /home/pcn/vendor/jms/metadata/src/Metadata/Driver/DriverChain.php(38): Metadata\\Driver\\AbstractFileDriver->loadMetadataForClass(Object(ReflectionClass))\n#2 /home/pcn/vendor/jms/metadata/src/Metadata/MetadataFactory.php(103): Metadata\\Driver\\DriverChain->loadMetadataForClass(Object(ReflectionClass))\n#3 /home/pcn/vendor/jms/serializer/src/JMS/Serializer/GraphNavigator.php(189): Metadata\\MetadataFactory->getMetadataForClass('net\\\\authorize\\\\a...')\n#4 /home/pcn/vendor/jms/serializer/src/JMS/Serializer/Serializer.php(182): JMS\\Serializer\\GraphNavigator->accept(Object(net\\authorize\\api\\contract\\v1\\GetTransactionListRequest), Array, Object(JMS\\Serializer\\Serializat in /home/pcn/vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/YamlDriver.php on line 35

 

 

I tried require symfony/yaml - same error. 

 

What does this need to actually work?

I tried this again by editing the composer.json directly, instead of requiring the latest packages via command line. This page:

http://developer.authorize.net/hello_world/

 

is wrong, the URL value for the git repo must be encapsulated in quotes, or it won't pass jslint validation.

 

My test works, but the message for my fake batch number:

SUCCESS: Get Transaction List for BatchID : 4606008 No Transaction to dispaly in this Batch.

Note "display" misspelled.

Hi @pcnweb,

 

Well noted on both of these. I'll submit them for fixes right away. The "Hello World" composer.json needs to be updated anyway to reference the brand new 1.9.2 version of the SDK, aka "the version with greatly reduced dependencies".

 

If anyone's reading this in the meantime, this is the only composer.json you should need to get the latest version of the SDK:

 

{
  "require": {
  "php": ">=5.5",
  "ext-curl": "*",
  "authorizenet/authorizenet": "1.9.2"
  }
}

Hi @pcnweb,

 

Just to verify, which method were you calling to get the "dispaly" error message?