Missing Classes in Authorize.net PHP SDK -
i'm trying generate custom report authorize.net using api cannot sdk load without errors.
i created post on developer board here sending email request support team. issue supposed have been fixed temporary patch here. errors persist.
does have ideas how work around issue?
my code:
<?php error_reporting(-1); ini_set('display_errors', 'on'); date_default_timezone_set('utc'); /* autoload through composer */ //require 'vendor/autoload.php'; /* autoload through git clone */ //require 'git/sdk-php/autoload.php'; /* autoload through .zip download */ require 'download/sdk-php-master/autoload.php'; use net\authorize\api\contract\v1 anetapi; use net\authorize\api\controller anetcontroller; function getsettledbatchlist($startdate, $enddate) { $api_id = "my_api_id"; $account_key = "my_account_key"; $start_dt = new datetime($startdate); $end_dt = new datetime($enddate); $merchauth = new anetapi\merchantauthenticationtype(); $merchauth->setname($api_id); $merchauth->settransactionkey($account_key); $request = new anetapi\getsettledbatchlistrequest(); $request->setmerchantauthentication($merchauth); $request->setincludestatistics(true); $request->setfirstsettlementdate($start_dt); $request->setlastsettlementdate($end_dt); $controller = new anetcontroller\getsettledbatchlistcontroller($request); $response = $controller->executewithapiresponse( \net\authorize\api\constants\anetenvironment::sandbox); if(($response != null) && ($response->getmessages()->getresultcode() == "ok")){ /* nothing */ }else{ $errormessages = $response->getmessages()->getmessage(); echo "response : " . $errormessages[0]->getcode() . " " .$errormessages[0]->gettext() . "\n"; } return $response; } $api_response = getsettledbatchlist('2016-05-01t00:00:00z', '2016-05-10t00:00:00z'); var_dump($api_response); ?>
the errors:
/* loaded git clone https://github.com/authorizenet/sdk-php.git */ warning: include(sdk-php/vendor/jms/serializer/src/jms/serializer/annotation/type.php): failed open stream: no such file or directory in sdk-php/autoload.php on line 16 warning: include(): failed opening '/sdk-php/vendor/jms/serializer/src/jms/serializer/annotation/type.php' inclusion (include_path='.:') in sdk-php/autoload.php on line 16 fatal error: class 'jms\serializer\annotation\type' not found in /sdk-php/lib/net/authorize/util/sensitivedataconfigtype.php on line 6 /* loaded downloading .zip github page */ warning: include(/sdk-php-master/vendor/jms/serializer/src/jms/serializer/annotation/type.php): failed open stream: no such file or directory in /sdk-php-master/autoload.php on line 16 warning: include(): failed opening '/sdk-php-master/vendor/jms/serializer/src/jms/serializer/annotation/type.php' inclusion (include_path='.:') in /sdk-php-master/autoload.php on line 16 fatal error: class 'jms\serializer\annotation\type' not found in /sdk-php-master/lib/net/authorize/util/sensitivedataconfigtype.php on line 6 /* loaded composer using recommended composer.json */ fatal error: class 'goetas\xsd\xsdtophp\jms\handler\basetypeshandler' not found in /vendor/authorizenet/authorizenet/lib/net/authorize/api/controller/base/apioperationbase.php on line 82
i'm open ideas @ point. thanks!
simple mistake. patch composer.json file updated required-dev version of goetas. did not realize needed update composer.json before running composer update.
Comments
Post a Comment