cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Missing serializer builder

Hi, I'm trying to run some sample code which is allegedly self-contained, but the browser states I am missing a 'serializer builder' when I try to run it. Any suggestions?

 

Message (I took out the domain):

 

Warning: include(................/PHP/sample-code-php-master/PaymentTransactions/vendor/vendor/jms/serializer/src/JMS/Serializer/SerializerBuilder.php): failed to open stream: No such file or directory in ......................../PHP/sample-code-php-master/PaymentTransactions/vendor/autoload.php on line 16

Warning: include(): Failed opening '............................/PHP/sample-code-php-master/PaymentTransactions/vendor/vendor/jms/serializer/src/JMS/Serializer/SerializerBuilder.php' for inclusion (include_path='.:/opt/php54/lib/php') in ......................../PHP/sample-code-php-master/PaymentTransactions/vendor/autoload.php on line 16

Fatal error: Class 'JMS\Serializer\SerializerBuilder' not found in .................../PHP/sample-code-php-master/PaymentTransactions/vendor/lib/net/authorize/api/controller/base/ApiOperationBase.php on line 74

darkseven9
Member
20 REPLIES 20

 

Hi darkseven9,

 

Our SDK is designed to be loaded using composer which automatically also downloads other dependencies such as the serializer. Please make sure you are using composer or those dependencies will be failing.

 

Thanks,

Joy

Joy
Administrator Administrator
Administrator

I have the same issue and I cannot use Composer.  In the documentation, Composer is recommended and the alternate method -- "Alternatively, we provide a custom SPL autoloader:"

 

Is this the only dependency there is?  Where should it be uploaded to and how to get your SDK to find it?

 

Thanks

 

Hi r2t2,

 

You can use it without composer, but you will need to also download the dependencies manually. These dependencies are noted in the composer.json file. They are not included in our own zip licensing.

 

Thanks,

Joy

Joy
Administrator Administrator
Administrator

Are you guys trying to make this hard?  I see absolutly no information in the API download that explains this nor how to set everything up on a web server.  I've done PHP development for over 12 years and have never used or heard of composer and that fact that you require this seems to overly complicate trying to use your API.  I'm really disappointed in Authorize.net. 

Furthermore, adding the recommended require code to the composer.json file leads to this error...

 

Problem 1
    - The requested package authorizenet/authorizenet No version set (parsed as 1.0.0) could not be found.

 

Here is what is included:

 

"require": {
        "php": "~5.3",
        "ext-curl": "*",
        "ext-json": "*",
        "ext-simplexml": "*",
        "ext-xmlwriter": "*",
        "authorizenet/authorizenet": "~1.8",
        "jms/serializer": "xsd2php-dev as 0.18.0"
    },

 

If the ""authorizenet/authorizenet": "~1.8"," line is removed, then the dependency update finishes as desired...

 

"php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)           
Writing lock file
Generating autoload files"

 

So, I downloaded the SDK, then ran composer, uploaded the 6,000 files, and can't even get the so-called "Hello World" file to fire correctly...

 

Seriously? That is your answer? Essentially, "Use Composer or go to hell"?

 

I've been coding in PHP since 2000 and never heard of Composer before today.

 

OK I'll bite. Where is this composer.JSON  file of which you speak?

 

And one more question. Why would you make your API dependant on somone else's code? Are you all crazy?

 

The api itself don't need that, it just the SDKs. You could do you code following the

"try it" tap on each functions

http://developer.authorize.net/api/reference/index.html

I've had the same experience -- I'm an experienced PHP developer and I never heard of 'Composer' before today. It would be very easy to just provide an archive with a working SDK in it. Unarchive it, plug in your sandbox API and transaction key, and off you go. This? This is ridiculous.

I'm having the same issues as everyone else... has anyone found a composer file that actually downloads all of the dependancies and is able to run a "Hello World" type example. Every variation of the file I find online for different "fixes" leaves me with error messages for missing classes and dependancies... 

 

Authorize.net, it was a pain to have to figure out why the "alternative method autoloader" wasn't working, it was a pain setup a dev server on my machine just to use composer because shared hosting providers wont allow you to use it, it was a pain to have to troubleshoot this issue over the last week scouring the web for info. I've already started research now on other gateways after having been a long time user of your services for other applications. I'd prefer not to switch but the clock is ticking.

 

~ D. 

dmcc
Member