Reply
Member
Posts: 7
Registered: ‎03-27-2013

Failing test script...

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

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

Re: Failing test script...

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

Member
Posts: 7
Registered: ‎03-27-2013

Re: Failing test script...

@RaynorC1emen7

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

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

Re: Failing test script...

[ Edited ]

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

Member
Posts: 7
Registered: ‎03-27-2013

Re: Failing test script...

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.

Download the SDK

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....

....."

 

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

 

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

Re: Failing test script...

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.

Member
Posts: 7
Registered: ‎03-27-2013

Re: Failing test script...

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

 

Highlighted
Expert
Posts: 4,525
Registered: ‎03-08-2010
Member
Posts: 7
Registered: ‎03-27-2013

Re: Failing test script...

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

 

 

 

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

Re: Failing test script...

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