Brand newbie to anet.....
Input this:
<?php require_once 'http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php';$url = "http://www.riberian.com/global/payments/anet_php_sdk/direct_post.php";$api_login_id = 'xxxxxx';$transaction_key = 'xxxxxxxx';$md5_setting = 'yyyyy';$amount = "5.99";AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);?>
Got this:
Warning:
require(/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/lib/shared/AuthorizeNetRequest.php)
[function.require]: failed to open stream: No such file or directory in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/AuthorizeNet.php
on line 7
Fatal error: require() [function.require]: Failed opening required
'/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/lib/shared/AuthorizeNetRequest.php'
(include_path='.:/usr/local/php5/lib/php') in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/AuthorizeNet.php
on line 7
Code in the script is copied and pasted from "....payments in 15 minutes...." page.
Any help is much appreciated.
vinceg
โ03-27-2013 11:58 AM
does this exist?
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/lib/shared/AuthorizeNetRequest.php
http://www.riberian.com/global/payments/anet_php_sdk/lib/shared/AuthorizeNetRequest.php
404
โ03-27-2013 12:23 PM
Thanks for the response...
"../lib/shared..." did not exist before the last try.
I just added "../lib/shared/..." to the server and placed the SDK & direct_post files inside them, and tried again.
Different failure....
"Warning: require_once() [function.require-once]: URL file-access is
disabled in the server configuration in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/lib/shared/direct_post.php
on line 9
Warning:
require_once(http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php)
[function.require-once]: failed to open
stream: no suitable wrapper could be found in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/lib/shared/direct_post.php
on line 9
Fatal error: require_once() [function.require]: Failed opening required
'http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php'
(include_path='.:/usr/local/php5/lib/php') in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/lib/shared/direct_post.php
on line 9"
These error messages refer to folders (".../lib/shared/...") that are not mentioned anywhere in the "...15 minutes to payment..." doc.
Looked in the SDK and found "../lib/shared/..." as locations for some of the .php files, and "../shared/.." for the rest.
Do we need to modify the SDK?
Still in the dark.
vinceg
โ03-27-2013 12:46 PM
I think when they said
You'll need to include the file "anet_php_sdk/AuthorizeNet.php" in your project so make sure you save the SDK into a folder that your web server can access such as your var/www folder or your htdocs folder.
They mean everything in the sdk, not just the authorizeNet.php
It still look to me the SDK and your direct_post.php is not in the right location.
getting a 404 on
http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php
โ03-27-2013 01:32 PM - edited โ03-27-2013 01:33 PM
Those files are in "..../global/payments/anet_php_sdk/lib/shared/..." folder...
I put them there before the last test....
I followed the "...15 minutres..." instructions as close as I could.
Step 2 refers only to the AuthorizeNet.php file, and nothing else.
"....
Step 2:Download the Authorize.Net PHP SDK and include it in your project.
The Authorize.Net PHP SDK gives you access to the full suite of APIs.
....."
There was no reference to do anything to or with any of the other files listed in the SDK,
Which files are needed for this test, and where can I get them?
Thanks,
vinceg
โ03-27-2013 02:07 PM
There was no reference to do anything to or with any of the other files listed in the SDK,
Which files are needed for this test, and where can I get them?
Just unzip the file and put everything in.
โ03-27-2013 02:14 PM
All files in folders as in the .zip file....
The AuthorizeNet.php is in the anet_php_sdk folder (same as in the zip file), and the direct_post.php is in that same folder.
Image of Files listing: (url altered....)
"...ww.riberian.com/global/payments/FilesListing.jpg..."
Still not working...
Warning: require_once() [function.require-once]: URL file-access is
disabled in the server configuration in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/direct_post.php
on line 9
Warning:
require_once(http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php)
[function.require-once]: failed to open
stream: no suitable wrapper could be found in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/direct_post.php
on line 9
Fatal error: require_once() [function.require]: Failed opening required
'http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php'
(include_path='.:/usr/local/php5/lib/php') in
/home/content/n/e/w/newph4d/html/riberian/global/payments/anet_php_sdk/direct_post.php
on line 9
Thanks for hanging in there on this...
vinceg
โ03-27-2013 05:51 PM
โ03-27-2013 06:03 PM
Looked at the reference article you sent, and checked the php.ini file.... (PHP5.ini)
"...
[Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so
register_globals = off allow_url_fopen = on
expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" upload_max_filesize = 10M
cgi.fix_pathinfo=1
...."
Appears that 'allow_url_fopen = on' is set correctly.
Other php files in this server seem to function OK. (ww.riberian.com/global/contact/contact.htm...uses a .php file to open the form....)
Thanks,
vinceg
โ03-28-2013 04:13 AM
Guess you have to talk to the server/php administrator to see why it erroring with URL file-access is disabled in the server configuration or you can change your code to not use URL for refereing http://www.riberian.com/global/payments/anet_php_sdk/AuthorizeNet.php
โ03-28-2013 04:22 AM