Reply
Highlighted
Member
Posts: 8
Registered: ‎09-25-2014

Using the PHP SDK - missing AuthorizeNet.php file

From the http://www.authorize.net/support/DirectPost_guide.pdf Chapter 10, it explains how to set up a test environment, yet many steps are confusing or missing entirely.

 

I assume step 2 and 3 are the same (quite confusing, as step 2 doesn't explain where you get the SDK or if it is different that the SDK in step 3). I skipped step 2, and just downloaded the SDK in step 3 and unzipped it and placed it on the web server).

 

Step 5 is the killer.  "Include anet_php_sdk/AuthorizeNet.php in your project.". This file doesn't reside in the SDK and doesn't explain where you are supposed to get this file.  Once you get it, where should it be placed?  Should you create a directory in on the server "anet_php_sdk" and stick the file there? 

 

The rest of the steps look straight forward, although it woudl have been handy to just have all the files in the project download.

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Using the PHP SDK - missing AuthorizeNet.php file

They haven't  update it after it move to github.

Just read the readme (scroll down) on the https://github.com/AuthorizeNet/sdk-php

Highlighted
Member
Posts: 8
Registered: ‎09-25-2014

Re: Using the PHP SDK - missing AuthorizeNet.php file

Thanks for the fast reply. Does that mean it doesn't currently work with PHP?  The readme doesn't say anything about the missing AuthorizeNet.php file (or even reference it).

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Using the PHP SDK - missing AuthorizeNet.php file

The new version on github doesn't use that file anymore.

Highlighted
Member
Posts: 8
Registered: ‎09-25-2014

Re: Using the PHP SDK - missing AuthorizeNet.php file

I forgot to ask but maybe other than Github, is there is a better way to test this out on our servers?  Ideally, we'd just like a set of php files that demostrates that it works, perhaps after entry of the API Login ID and transaction key.

Highlighted
Member
Posts: 8
Registered: ‎09-25-2014

Re: Using the PHP SDK - missing AuthorizeNet.php file

Tried the DPM example:

$url             = "http://YOUR_DOMAIN.com/direct_post.php";
$api_login_id    = 'YOUR_API_LOGIN_ID';
$transaction_key = 'YOUR_TRANSACTION_KEY';
$md5_setting     = 'YOUR_MD5_SETTING'; // Your MD5 Setting
$amount          = "5.99";
AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);

1) The file direct_post.php doesn't exsist anywhere in the GitHub files or sub-directoies

2) What do you put for YOUR_MD5_SETTINGS ?  it wasn't provided with the API Login ID and Transaction Key.
3) Should this code reside in a php file by iteslf, or should it be in HTML code between the body tags (with <?php ?>)?

 

You may want to remove the http://www.authorize.net/support/DirectPost_guide.pdf file with how to use instructions, since they no longer work.