daviddawn Posted July 4, 2014 Share Posted July 4, 2014 HI all, After attempting to test authorize.net to run some test transactions i couldn't find the necessary file to include, after browsing all files and folders in the downloaded sdk directory i soon found they had changed the files, i have since changed the path to the correct file however im receiving errors, i would appreciate it if someone could check this over to confirm if its still possible to run everything smoothly, i thought it was also important to bring this to larry's attention to make the required changes corresponding to the authorize.net setup in the book for future prints. thanks in advance. Link to comment Share on other sites More sharing options...
Larry Posted July 11, 2014 Share Posted July 11, 2014 I'll take a look to see if something's changed. Is that what you wanted checked over? If the Authorize.net setup changed? Link to comment Share on other sites More sharing options...
daviddawn Posted July 14, 2014 Author Share Posted July 14, 2014 Hi Larry, yes it is, i did have a look but it donesn't seem to be very straight forward. Link to comment Share on other sites More sharing options...
jayLim Posted July 21, 2014 Share Posted July 21, 2014 Hi! The unzip file has a name of sdk-php-master, and AuthorizeNet.php file is missing. Link to comment Share on other sites More sharing options...
daviddawn Posted July 28, 2014 Author Share Posted July 28, 2014 HI Jay, I decided just to skip it until i reach the point of implementing the stripe payment processing application instead. thanks Link to comment Share on other sites More sharing options...
daddytiger Posted September 5, 2014 Share Posted September 5, 2014 I had the Authorize.net working beautifully, but it does seem to have stopped working. Getting a Response code |3|, Response Reason Code |49| error: |The transaction amount submitted was greater than the maximum amount allowed. Downloaded the new SDK but it looks confusing... Any magic fixes? Link to comment Share on other sites More sharing options...
Larry Posted September 5, 2014 Share Posted September 5, 2014 Authorize.net would be best able to answer this, but I'd be inclined to change the amount being submitted. Link to comment Share on other sites More sharing options...
johannsnr Posted May 18, 2015 Share Posted May 18, 2015 Hi Everyone I am struggling with the same issue. The AuthorizeNet.php file is missing in the download. There is however a file under the LIB folder AthorizeNetAIM.php. Unfortunately using this file creates another error which relates to a class AuthorizeNetRequest which it cannot find (line 42 in the script) AuthorizeNet website does not really offer much in terms of a solution either. Anybody got any idea how to fix this? regards johannsnr Link to comment Share on other sites More sharing options...
johannsnr Posted May 18, 2015 Share Posted May 18, 2015 Hi Everyone, After struggling for some fare amount of time with this I have found that the AuthorizeNet.php should be replaced with autoload.php found in the anet_php_sdk folder. In billing.php on line 158 where it is asking for ./AuthorizeNet.php it should point to ./autoload.php. Once I did that I had to change my php configuration to allow for the function curl_init() to be active. Remove the ; in front of extension = php_curl.dll (line 883 on my installation of php.ini). After that the system asked for class zend mime part. in email_receipt.php. I commented out lines 64 to 98 to test if it will work. It did but without sending the mail obviously. Larry please correct me if there is a mistake in my method here. This worked for me so far except the section about class zend mime which I have no clue about how to fix. With the changes and testing the site it at is giving me the ORDER COMPLETE page. regards johannsnr Link to comment Share on other sites More sharing options...
Larry Posted May 21, 2015 Share Posted May 21, 2015 The most important thing is that it works. So that's good. As for cURL, you did that right (and restart the server after making that change). For Authorize.net, either they changed their setup or you downloaded a different library than the one I used for the book. In any case, you can check Authorize.net's site to confirm that the order went through. As for Zend MIME, you'll need to install that library to get it to work. Link to comment Share on other sites More sharing options...
daddytiger Posted October 7, 2016 Share Posted October 7, 2016 Hi Larry et al,I finally got this all working again as nicely as it used to, with much stumbling around. Your results may vary: Authorize.net changed their setup drastically. What worked for me (sure there's other solutions around): Download their latest SDK. (v1.9 as of today) Will NOT work out of the box, need to run Composer to download dependencies. Contrary to their documentation their "convenient" autoloader is not an option, many dependencies, such as serializer, etc will error fatally. In the experimentation and/or after download, the directory structure will be different (e.g., a new subdirectory also called vendor. Especially to the above Zend email problem in email_receipt.php included in final.php: Recall line 64-65 or so: // Uses Composer to autoload the Zend Framework files: require('includes/vendor/autoload.php'); Will now be out of sync? Had to copy the 32 character string part in something like ComposerAutoloaderInit16b7c79bcea786795d7edd9ece25a4bd, from vendor/composer/autoload_real.php to match the line 7 in includes/vendor/autoload.php ( required above from email_receipt.php) ComposerAutoloaderInit16b7c79bcea786795d7edd9ece25a4bd::getLoader(); Basically, I had to also download AND run composer on their sample-code-php-master and use that to follow and replace Larry's excellent comments line by line in billing.php. Also to store full response in database, have to use $full_response = addslashes(serialize($response)); Following their sample code authorize-credit-card.php (prolly want to rename it as an *.inc and remove it's function call), the database call now looked something like: // Record the transaction: $r = mysqli_query($dbc, "CALL add_transaction($order_id, 'auth_only', $order_total, {$tresponse->getResponseCode()}, '$reason_text', {$tresponse->getTransId()}, '$full_response')"); Might have changed some semantics from anet's, e.g, $amount to $order_total, maybe a few more like "description" to "reason", etc.... It CAN work like it used to, just need a coffee or a beer now before tackling the admin capture part.... Link to comment Share on other sites More sharing options...
daddytiger Posted October 7, 2016 Share Posted October 7, 2016 Woops, not done yet correcting billing.php, it works but forgot I had commented out the error section around line 183 or so: else { // Do different things based upon the response: // switch ($response->response_code) { Using authorize. net's "AIM_guide_XML.pdf", forgot where the download link was, but looking at page 67 "Response Reason Codes and Response Reason Text" Table to redo that code section... Link to comment Share on other sites More sharing options...
daddytiger Posted October 7, 2016 Share Posted October 7, 2016 Note - as it turns out, the last post may not be terribly relevant - if using anet's sample code authorize-credit-card.php, their error code sections implement the same error messaging functionality although with more specificity, confusingly more.. Link to comment Share on other sites More sharing options...
Larry Posted October 15, 2016 Share Posted October 15, 2016 Thanks for sharing what you've learned! Let me know if you still have a specific question. Link to comment Share on other sites More sharing options...
Recommended Posts