Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Authorize.net Simple Integration Method (SIM) Support


netstep

Recommended Posts

There is no space before or after the PHP tags....thus my confusion.

I truly appreciate any trouble shooting you can offer.

The php.txt files are linked in this post so you can view the code.

 

No space uh? Well in those two files you have posted above their is space before the opening <? and after the closing ?> that shouldn't be there.

 

post your general.php

Edited by Silverado05

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

No space uh? Well in those two files you have posted above their is space before the opening <? and after the closing ?> that shouldn't be there.

 

post your general.php

I'm not trying to be a pain, and I really appreciate your help.

Looking at the text file > Select all > not seeing any spaces above or below php tag.

...if it really does turn out to be something this basic....I'll go back to flippin' burgers. :blink:

 

If you tweak the file and email, I'll be happy to install and see if fix works.

Top line of module txt file has my email address: //CUSTOMIZED BY: oscommerce AT

 

My general.php is new osCms2.2.

Sam M. - Seattle

Link to comment
Share on other sites

DEMO

Catalog Modules Demo (Will not connect to Authorize.net)

Admin Modules Demo

 

Module file Text Visible

Current Module File

Current Module Language File

 

 

If you click on the links of the files above you will notice like it states in the error line 1. Well line 1 of authorizenet_sim.php is a space which is a space then <? instead of it just starting with <? and the bottom is the same way. If that it not it post your general.php file here so I can look at it.

 

here is another post that talks about this same error. When you see this error it is because of whitespace like I have told you. If you keep getting this error then you are missing it and not getting it completely.

 

http://www.oscommerce.com/forums/index.php?showtopic=156547

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

If you click on the links of the files above you will notice like it states in the error line 1. Well line 1 of authorizenet_sim.php is a space which is a space then <? instead of it just starting with <? and the bottom is the same way. If that it not it post your general.php file here so I can look at it.

You've been very helpful and exceedingly patient...thank you.

 

After looking at the files many times in my editor, I opened them in my control panel file text editor and saw the mystery characters at the beginning of both files "".

Not sure why my editor wouldn't display them....I use it for dozens of php files every week, and I've never seen this.

 

Now installs like a dream....which I could erase all the posts regarding this to remove the clutter.

My apologies.

 

PS: I guess I better get my burger flipper warmed up. ug.

Edited by netstep

Sam M. - Seattle

Link to comment
Share on other sites

  • 3 weeks later...

Today I continued tests with Authorize.net. We have a test account at Authorize.net. I was able to get simple tests (outside of osCommerce) to work on both our live web server and our development server (local). I was very happy to find out that I could get to the payment form at Authorize.net from our development server, since I wasn't sure if it was needing to come from a site that could be found online.

 

Unfortunately I'm still looking for why I'm getting an error when I use osCommerce. I did install the latest available SIM update for osC. (http://www.oscommerce.com/community/contributions,5370)

 

This is the error when trying to confirm a purchase (using the test account) I'm getting from osCommerce on our local server:

 

The following errors have occurred.

(14) The referrer, relay response or receipt link URL is invalid.

 

Any ideas here? By the way, I'm connecting to https://test.authorize.net/gateway/transact.dll because we have a test account and have the php code for this mod updated to use that URL.

Link to comment
Share on other sites

The following errors have occurred.

(14) The referrer, relay response or receipt link URL is invalid.

 

Any ideas here? By the way, I'm connecting to https://test.authorize.net/gateway/transact.dll because we have a test account and have the php code for this mod updated to use that URL.

 

Do you have the referrer URLs set up in Anet?

http://www.yoursite.com/checkout_process.php

Sam M. - Seattle

Link to comment
Share on other sites

Yes, I do have the URL to our development server entered in as Default Receipt URL and Default Relay Response URL on the Response/Receipt URLs page. I also see that URL in the Default Relay Response URL on the Relay Response page, in case that makes a difference.

Link to comment
Share on other sites

  • 3 weeks later...
Any ideas here? By the way, I'm connecting to https://test.authorize.net/gateway/transact.dll because we have a test account and have the php code for this mod updated to use that URL.

 

 

After several hours this morning, I was told on the phone from Authorize.net Support that a Live Account in TEST MODE can't connect to :

https://test.authorize.net/gateway/transact.dll

 

that it MUST be:

https://certification.authorize.net/gateway/transact.dll

 

 

so I changed it in the default authorize.net module and it worked (bounced back to Order successfully processed.)

 

I assume it went through as just b4 that I was getting this error:

The following errors have occurred.

(13) The merchant login ID or password is invalid or the account is inactive.

 

Now to try a real transaction.

Link to comment
Share on other sites

  • 3 weeks later...

netstep/Sam,

 

Thanks for posting this contribution. I was wondering if you know how to change something. When the credit card is declined the error message comes up just under the breadcrumb bar in the same background color as the bar itself. Do you know if and where I can change the background color of the error message? Is it in the stylesheet?

 

Thanks,

Keith

Link to comment
Share on other sites

netstep/Sam,

 

Thanks for posting this contribution. I was wondering if you know how to change something. When the credit card is declined the error message comes up just under the breadcrumb bar in the same background color as the bar itself. Do you know if and where I can change the background color of the error message? Is it in the stylesheet?

 

Thanks,

Keith

You should put it in the stylesheet and name it something like "DIV.error_anet", but I put mine inline.

 

chechout_payment.php

Look for

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
	<td>
		<table border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td class="pageHeading"><?php echo PAYMENT_HEADING_TITLE; ?></td>
			</tr>
		</table>
	</td>
</tr>

Below it add

<?php //+5370
$error_message = (isset($HTTP_GET_VARS['error_message']) ? $HTTP_GET_VARS['error_message'] : '');
if (tep_not_null($error_message)) {
echo '<tr>
			<td>
				<div style="font-size:12px; color:#cc0000; font-weight:bold; width:600; border:3px solid #cc0000; padding:5px; background:#ffffcc;">ERROR: ' . $error_message . '</div>
			</td>
		</tr>';				
} //-5370
?>

 

Find where the error message is currently located near the breadcrumbs and comment that out.

Sam M. - Seattle

Link to comment
Share on other sites

Hello, Looking for any help that I can get.

I have installed the authorize.net SIM module on our website http://squaredealfarm.org. Unfortunately, I can not get it to work and find the folks at authorize.net clueless to help.

At the point when a customer leaves our website to go to the secure server, an error message is shown reading, "The following errors have occurred.

(99) This transaction cannot be accepted".

I have been working my way through this install, and cannot get past this point. This is the third different error message that I have received so I must be making some progress.

I apologize for my ignorance -I 'm a stubborn farmer trying to figure this out for myself.

Ray

Link to comment
Share on other sites

Hello, Looking for any help that I can get.

I have installed the authorize.net SIM module on our website http://squaredealfarm.org. Unfortunately, I can not get it to work and find the folks at authorize.net clueless to help.

At the point when a customer leaves our website to go to the secure server, an error message is shown reading, "The following errors have occurred.

(99) This transaction cannot be accepted".

I have been working my way through this install, and cannot get past this point. This is the third different error message that I have received so I must be making some progress.

I apologize for my ignorance -I 'm a stubborn farmer trying to figure this out for myself.

Ray

Sounds like the info your passing to Anet isn't verifying in the Anet system.

Authorize.net > Login > Account > Settings > Response/Receipt URLs

http://YOURSITE/checkout_process.php [Default Receipt URL]

In your site this may look like:

http://www.squaredealfarm.org/osCommerce/c...out_process.php

You'll also need to enter the transaction key from Anet into your osC payment module.

 

...looks like you may be in over your head a bit at http://www.squaredealfarm.org/osCommerce/c...stall/index.php

Geeks like to make it sound like installing osC is a piece a cake...and it is for geeks....but if you're a beginner it can be trying to take a drink from a fire hose. Believe me when I say I can feel your pain. I was a beginner about 7 years ago, and many of the super geeks in osC community help me realize I've still got a great deal to learn. If you're about to go crazy, you may want to considering hiring a member of this talented community to help you get your site up an running.

 

OFF TOPIC...in addition to your osC install you need some help getting you images optimized, etc.

Example: http://squaredealfarm.org/images/threestacktwo.JPG is 1.2mb can be optimized to 19k and cut the loading time for that image by 98%.

Get optimized image here - right click - save-as

A free program like http://www.fookes.com/ezthumbs/ can really help get your images resized and speed up your page loading time.

Edited by netstep

Sam M. - Seattle

Link to comment
Share on other sites

You should put it in the stylesheet and name it something like "DIV.error_anet", but I put mine inline.

 

chechout_payment.php

Look for

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
	<td>
		<table border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td class="pageHeading"><?php echo PAYMENT_HEADING_TITLE; ?></td>
			</tr>
		</table>
	</td>
</tr>

Below it add

<?php //+5370
$error_message = (isset($HTTP_GET_VARS['error_message']) ? $HTTP_GET_VARS['error_message'] : '');
if (tep_not_null($error_message)) {
echo '<tr>

Thanks Sam, really appreciated the help.  I will give it a try.
			<td>
				<div style="font-size:12px; color:#cc0000; font-weight:bold; width:600; border:3px solid #cc0000; padding:5px; background:#ffffcc;">ERROR: ' . $error_message . '</div>
			</td>
		</tr>';				
} //-5370
?>

 

Find where the error message is currently located near the breadcrumbs and comment that out.

Link to comment
Share on other sites

You should put it in the stylesheet and name it something like "DIV.error_anet", but I put mine inline.

 

chechout_payment.php

Look for

<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
	<td>
		<table border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td class="pageHeading"><?php echo PAYMENT_HEADING_TITLE; ?></td>
			</tr>
		</table>
	</td>
</tr>

Below it add

<?php //+5370
$error_message = (isset($HTTP_GET_VARS['error_message']) ? $HTTP_GET_VARS['error_message'] : '');
if (tep_not_null($error_message)) {
echo '<tr>
			<td>
				<div style="font-size:12px; color:#cc0000; font-weight:bold; width:600; border:3px solid #cc0000; padding:5px; background:#ffffcc;">ERROR: ' . $error_message . '</div>
			</td>
		</tr>';				
} //-5370
?>

 

Find where the error message is currently located near the breadcrumbs and comment that out.

 

 

Thanks Sam, really appreciated the help. I will give it a try.

Link to comment
Share on other sites

Sounds like the info your passing to Anet isn't verifying in the Anet system.

Authorize.net > Login > Account > Settings > Response/Receipt URLs

http://YOURSITE/checkout_process.php [Default Receipt URL]

In your site this may look like:

http://www.squaredealfarm.org/osCommerce/c...out_process.php

You'll also need to enter the transaction key from Anet into your osC payment module.

 

...looks like you may be in over your head a bit at http://www.squaredealfarm.org/osCommerce/c...stall/index.php

Geeks like to make it sound like installing osC is a piece a cake...and it is for geeks....but if you're a beginner it can be trying to take a drink from a fire hose. Believe me when I say I can feel your pain. I was a beginner about 7 years ago, and many of the super geeks in osC community help me realize I've still got a great deal to learn. If you're about to go crazy, you may want to considering hiring a member of this talented community to help you get your site up an running.

 

OFF TOPIC...in addition to your osC install you need some help getting you images optimized, etc.

Example: http://squaredealfarm.org/images/threestacktwo.JPG is 1.2mb can be optimized to 19k and cut the loading time for that image by 98%.

Get optimized image here - right click - save-as

A free program like http://www.fookes.com/ezthumbs/ can really help get your images resized and speed up your page loading time.

 

Sam, Thanks for the response -I am in WAY over my head. However, we have been using OS commerce for a couple of years with good luck. What you are seeing right now is a little skewed as just upgraded to the latest version of OS and my set up got pretty messed up.

We are forging forward and will try to make this work since we are in no position to be paying a site developer right now.

Thanks for the tip about optimizing -that's a new one on me.

Anyway, I'm back to the point where I can try to get the Authorize.net SIM add-on to work. I'm sure I'll have more questions.

Do you like maple syrup?

Ray

Link to comment
Share on other sites

  • 4 weeks later...

I have two problems that I could use some help on. I have read many of the threads on problems encountered but haven't seen

these exact problems. So, in hope that someone knows how to fix these, I'd be most appreciative for the info. I am currently still

in Test mode and all apears to be working with these exceptions.

 

Problem #1 - This really does not appear to affect anything but when I go to the Checkout Confirmation page, in the new box that

appears (yellow background) the text reads "...you will be returned to DOMAIN" where do I make the change so that DOMAIN

actually spells out the name of my website?

 

Problem #2 - The appears to also be some sort of configuration problem but I cannot locate the source. After I am brought to the

AUTHORIZE.NET page when I enter my CC information and click the Submit buttom, I am faced with an error screen that tells me

 

"An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

 

This transaction has been approved.

 

It is advisable for you to contact the merchant to verify that you will receive the product or service."

 

I received the email and it tells me

 

"Your script timed out while we were trying to post transaction results to

it.

Transaction ID: 0

Transaction Result: This transaction has been approved.

 

The following message was displayed to the customer:

 

------------------------------An error occurred while trying to report

this transaction to the merchant. An e-mail has been sent to the merchant

informing them of the error. The following is the result of the attempt to

charge your credit card.

 

This transaction has been approved.

 

It is advisable for you to contact the merchant to verify that you will

receive the product or service."

 

Where did I mess up? Or, is this standard for Test Mode? Many thanks for your reply.

Link to comment
Share on other sites

Problem #1 - This really does not appear to affect anything but when I go to the Checkout Confirmation page, in the new box that appears (yellow background) the text reads "...you will be returned to DOMAIN" where do I make the change so that DOMAIN actually spells out the name of my website?

I apologize. The constant "DOMAIN" is not standard in osC. The simplest way to fix this is to add the constant to your includes/config.php file.

define('HTTP_COOKIE_DOMAIN', 'www.Example.com');
define('DOMAIN','www.Example.com');
You may also use define('DOMAIN',HTTP_COOKIE_DOMAIN);

 

Problem #2 - The appears to also be some sort of configuration problem but I cannot locate the source. After I am brought to the AUTHORIZE.NET page when I enter my CC information and click the Submit buttom, I am faced with an error screen that tells me

 

"An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card. This transaction has been approved. It is advisable for you to contact the merchant to verify that you will receive the product or service."

 

I received the email and it tells me

 

"Your script timed out while we were trying to post transaction results to it.

Transaction ID: 0

Transaction Result: This transaction has been approved.

The following message was displayed to the customer:

------------------------------An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

 

This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will receive the product or service."

Where did I mess up? Or, is this standard for Test Mode? Many thanks for your reply.

Errrr....not sure about this one. I never messed around much with using the module in test mode. I went straight to the production mode and put a $1 test product in my catalog. Then I made actual purchases with my CC then canceled them. If you do this a bunch you're CC company may flag your card and you'll have to let them know this was intentional. May help to do different amounts..$1, $2, $3, etc. As long as you can log into your authorize.net terminal and cancel them before they post.

I wish I could be more help, but it's challenging when I can't duplicate the error.

Sam M. - Seattle

Link to comment
Share on other sites

Thanks for reply. One more question, if you don't mind. In Section 3 of your documentation, you spell out some definitions to add to a configuration file. Forgive my naivete but is this required and, if it is, to which file do I add this information. I am not too clear on this part.

Gary

Link to comment
Share on other sites

You are referring to constants that may be added to the includes/config.php file (optional).

3. CUSTOMIZE PAYMENT FORM (See screen shot)
***NOTE: Any references to files (images/CSS) must be on an SSL server or it will cause the Internet Explorere "non-secure items" warning.
***Example: You might want to dress up your form by linking it to your site style sheet....but EVERY time someone goes to your form it will pop-up a warning window...unless your stylesheet is on an SSL server.
***Even if it's on an SSL server, the visitor may get a phishing warning because the reference is to a site other then the site they are on (authorize.net).
You may add some customization to the payment form by editing the form settings in your Authorize.net control panel.
OR
You can define values that will be sent to the form.
I prefer this method because the header/footer settings in the merchant control panel are limited to 255 characters.
It doesn't take much formatting to suck this up.
CSS
I put all my CSS in the tag too so no external style references.
Some of the values are specific to the Payment form (view code on form to see other elements you can format.
Example: #x_exp_date,#x_card_code,#x_card_num{background: #FFFF66;} makes the background for the required fields yellow.

Add the definitions below to your configuration file.

//EVERYTHING REFERENCED BY CSS OR IMAGES MUST BE HOSTED ON SSL TO PREVENT IE "Secure/non-secure" error
define('AUTHORIZENET_PAYFORM_HTML_HEADER','
<style type="text/css">
body {font-family:Tahoma,Verdana,Arial;font-size:12px;background: #4C71AB;}
.name{font-size:30px;font-weight:bold;}
.title{font-size:18px;font-weight:bold;color:#666666;}
.HeaderFooter1{font-family:Tahoma,Verdana,Arial;font-size:12px;}
.Page{background: #ffffff;}
#x_exp_date,#x_card_code,#x_card_num{background: #FFFF66;}
</style>
<span class="name">Company or Site Name</span><br>
<span class="title">Secure Payment System</span>
');
define('AUTHORIZENET_PAYFORM_HTML_FOOTER','I suggest displaying your street address here in the footer<br />Phone: 555-555-5555 | Fax: 555-555-5555');
define('AUTHORIZENET_PAYFORM_LOGO',''); //MUST BE ON SSL SERVER

 

These values are optional.

The code in the payment module looks like this.

Note the "if(defined...."

		//+HEADFOOT - PAYMENT FORM HEADER & FOOTER - Not limited to 255 characters like the Authorize.net payment form settings. You can include styles, etc. However, be careful not to link to images on NON-SSL sites.
//define these variables in your configuration file: AUTHORIZENET_PAYFORM_HTML_HEADER, AUTHORIZENET_PAYFORM_HTML_FOOTER, AUTHORIZENET_PAYFORM_LOGO

	if(defined('AUTHORIZENET_PAYFORM_HTML_HEADER')){
		$payform_header_html = AUTHORIZENET_PAYFORM_HTML_HEADER;
	}else{
		$payform_header_html = '';
	}
	if(defined('AUTHORIZENET_PAYFORM_HTML_FOOTER')){
		$payform_footer_html = AUTHORIZENET_PAYFORM_HTML_FOOTER;
	}else{
		$payform_footer_html = '';
	}
	if(defined('AUTHORIZENET_PAYFORM_LOGO')){
		$payform_logo = AUTHORIZENET_PAYFORM_LOGO; //MUST BE ON SSL SERVER & LISTED IN YOUR AUTHORIZED URLS.
	}else{
		$payform_logo = '';
	}
	//-HEADFOOT

Sam M. - Seattle

Link to comment
Share on other sites

Hi, Sam. Thanks for the help. I have change the DOMAIN constant and that fixed the first problem but the second problem remains. After I click the Submit button on the ANet payment form and wait a few seconds, I am presented with

 

""An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

 

This transaction has been approved.

 

It is advisable for you to contact the merchant to verify that you will receive the product or service."

 

I received the email and it tells me

 

"Your script timed out while we were trying to post transaction results to it.

Transaction ID: 0

Transaction Result: This transaction has been approved.

The following message was displayed to the customer:

------------------------------An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

 

This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will receive the product or service."

 

So, I contacted ANet and Tech Support gave me a list of things to check.

 

"When Authorize.net is responding back to a script on your server,

our system waits 10 seconds for a response. If we do not get a response in 10 seconds,

our server will time out and display an error page. The first thing that you will need

to look for is the order that your script executes. It is very important that something

is printed to the screen before any other process is started. If your script prints to

the screen first, we will recognize that you are receiving the information. The most

effective method would be to PRINT the headers, and a line of text such

as "Processing, please wait."

 

To resolve this issue:

 

-Check that your script permissions are correct and that it can accept a HTTPS POST.

 

-Check that the script is not completing other functions before writing to the screen,

such as writing to a database or sending emails.

 

- Please check to see if there are different processes that are used in your script for

approvals, declines, or errors. Be sure to check each process to be sure that each process

will write to the screen before any other functions.

 

- Check if your script is using redirects immediately upon receipt of the response from our

servers. Redirects are discouraged because they can potentially interfere with the process.

 

***On occasion, timeouts will occur that are outside of the control of your script or our

servers. Typical reasons for these timeouts are Internet traffic, your server is overloaded

or malfunctioning, or Internet routing issues. Depending upon your server location and what

route is used to send data, it is possible that you may occasionally receive the message you

are seeing. "

 

I have no idea as to what to look for in my setups or configurations to solve this. If you (or anyone else for that matter)

could point me in the direction of what I might look for to fix this, I would be most grateful. Thanks.

Gary

Link to comment
Share on other sites

"Your script timed out while we were trying to post transaction results to it.

Transaction ID: 0

Transaction Result: This transaction has been approved.

1. Is the Anet-SIM module set to "test" or "production" mode?

 

2. Is the transaction appearing in the Authorize.net system.

Connect > transact > fail on return to osC

OR

Connect > fail

 

3. What is your "Default receipt URL" in

Authorize.net > Account > Settings > Response/Receipt URLs

Should be like: http://www.example.com/checkout_process.php (or https:// for secure + make sure w/w-out www matches your config too)

Sam M. - Seattle

Link to comment
Share on other sites

1. Is the Anet-SIM module set to "test" or "production" mode?

 

I am in Test mode right now.

 

2. Is the transaction appearing in the Authorize.net system.

Connect > transact > fail on return to osC

OR

Connect > fail

 

Since I am in test mode, the transactions do not appear. But I do get message that everything was processed properly. Should I try it in production mode? Where can I cancel the transaction after it is done since I don't actually want it to go through to my card?

 

3. What is your "Default receipt URL" in

Authorize.net > Account > Settings > Response/Receipt URLs

Should be like: http://www.example.com/checkout_process.php (or https:// for secure + make sure w/w-out www matches your config too)

 

It is http://www.mywebsite.com/oscommerce-2.2ms2...out_process.php

 

Which CONFIG file do I need to check this with?

Thanks.

Gary

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...