Forums / Bug Reports / [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

[Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

Locked

Started by dharma on 27 Jun 2010, 8:26 PM · Views: 3,740

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
27 Jun 2010, 8:26 PM
#1
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

[Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

Using Safari the customer sees and completes the Authorize.net SIM payment page, clicks submit (and is approved) Authorize.net grabs the "checkout_success" page from my store and displays on "https://secure.authorize.net/gateway/transact.dll" missing CSS, images and some of the links are bad (page hyper links are via https://secure.authorize.net/ not https://mystore.com/ )

All other browsers work fine except safari (Windows) and safari mac (v. 4 & 5).

When I set up Authorize.net SIM a few weeks ago, I tested it with safari and it displayed correctly. I am running zen cart 1.39d and 138a both show this issue. My "response" and "receipt" URL settings in my Authorize.net Merchant Profile are left BLANK. I am using the MD5 Hash.

I have already called Authorize.net and they say its a problem with the zc code, which on my 138a store has not changed since installing SIM. Does anyone else see this issue?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

27 Jun 2010, 9:58 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,892
Plugin Contributions:
20

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

Anything in the debug files inside the cache folder?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

27 Jun 2010, 10:21 PM
#3
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

The transactions are going through, so no alerts, I turned on the logging, is there anything I should be looking for? everything looks ok, with no error messages. Again, the success page displays fine on every browser but safari...

Here are a few things I thought(guessing) might be worth noting:

[x_relay_response] => TRUE
[x_relay_URL] => https://www.xxxxxxxx.com/index.php?main_page=checkout_process

[x_receipt_link_method] => POST
[x_receipt_link_text] => Click here to complete your order.
[x_receipt_link_url] => https://www.xxxxxxxx.com/index.php?main_page=checkout_process
[zenid] => xxxxxxxxxxxxxxx
[url] => https://secure.authorize.net/gateway/transact.dll
[HashMatchStatus] => PASS
[url] => https://secure.authorize.net/gateway/transact.dll

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

28 Jun 2010, 8:00 PM
#4
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

28 Jun 2010, 9:04 PM
#5
sjolie avatar

sjolie

New Zenner

Join Date:
Oct 2009
Posts:
53
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

any word on this?

I use IExplorer and get the same problem with all customers.

Once it is SUCCESSFUL, it shoots them to the "success" page, but no images show, no CSS, nothing.. just Text.

What could cause this?

28 Jun 2010, 9:21 PM
#6
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

IE 8 works ok for me as does all browsers except Safari 5. Your issue may be related to not having SSL? I have read a few zc posts about that. This issue (above link) has more to due with Safari 5's handling of zc's checkout_success <base hrefs> on Authorize.Net's server specifically.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

29 Jun 2010, 4:47 PM
#7
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

When using Authorize.Net SIM with Safari 5, the checkout_success page has no css or images [All other browsers ok]:

Safari 5 ignores the <base> tag in the source html and instead uses the actual url "https://secure.authorize.net/gateway" as the <base> so all links using the <base> tag are broken, including CSS, Images and js.

example source code: ```php

<base href="https://www.mysite.com/" /> <link rel="stylesheet" type="text/css" href="includes/templates/mysite/css/mystylesheet.css" /> ```

What is displayed: ```php

<base href="https://secure.authorize.net/gateway/" /> <link rel="stylesheet" type="text/css" href="includes/templates/mysite/css/mystylesheet.css" /> ```

thus https://secure.authorize.net/gateway/includes/templates/mysite/css/mystylesheet.css etc... more info

Is there anyway to fix this issue? or have Absolute URL's on this page?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

1 Jul 2010, 3:41 PM
#8
stride_r avatar

stride_r

Zen Follower

Join Date:
Aug 2008
Posts:
115
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

We, like others recently, have had issue with the Auth.net SIM module. It seems to now be working again (thanks Dr. Byte for his workaround , and maybe to Authorize.net for undoing whatever they did).

However, upon running a "process offsite SIM" test order, i noticed that we still have have an odd behavior. Once the transaction is completed and the shopper is passed back to zencart, the page that loads does so without applying Css styles, & scripts, etc. Whats loading in my browser is just the HTML for the ZC "Thank you for your order" confirmation page. At the same time, the browser address bar still shows "https://secure.authorize.net/gateway/transact.dll" as the address, rather than the zencart site address.

I assume this explains why the CSS is not being loaded ...as while the path references in the HTML ARE correct, the browser isn't looking for it in the right domain?

As advised via the ZC SIM Set-up FAQ, we have verified our Auth.net settings:
Response/Receipt URLs:

  • there are only 2 "Default" options, both options are blank.
    Relay Response & Silent POST URL
  • both are also blank

Any ideas as to why this is happening?

2 Jul 2010, 12:58 AM
#9
stride_r avatar

stride_r

Zen Follower

Join Date:
Aug 2008
Posts:
115
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

No one have any thoughts or suggestions??

2 Jul 2010, 12:35 PM
#10
stride_r avatar

stride_r

Zen Follower

Join Date:
Aug 2008
Posts:
115
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

I can confirm that i too was seeing this response while using Safari 5 Browser ...though I do not know if it was restricted to Safari , or not.

My site in question does indeed use its own SSL.

I noticed that they have this posted (as of July 1st) at Auth.net:
http://community.developer.authorize.net/t5/News-and-Announcements/First-Partial-Authorization-Release/m-p/3838#M31

Take note of the line for SIM : "Please note that the Relay Response field order has changed."

I don't know enough about the SIM module to know if this might have had the impact we're experiencing??

2 Jul 2010, 12:45 PM
#11
stride_r avatar

stride_r

Zen Follower

Join Date:
Aug 2008
Posts:
115
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

I can also state that i believe this is a new phenomena as I ran a number of SIM Auth.net test transactions (via Safari) through the site as recent as 30 days ago ...and it worked fine then. The issue seems to be something new.

4 Jul 2010, 1:26 AM
#12
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

The way zc's Authorize.Net SIM works is the customer is taken to : https://secure.authorize.net/gateway/transact.dll after the confirmation page, fills in their details and if approved Authorize.Net grabs your HTML of checkout_success page and displays it on their website, thats why the URL is https://secure.authorize.net/gateway/transact.dll .

Up until a few weeks ago all browsers including safari displayed this "forwarded HTML" perfectly. Now however Safari's new version (5) ignores your <base> (mysite.com) html of the code and replaces it with (secure.authorize.net)'s because that is the site you are on.

So images are https://secure.authorize.net/gateway/images/product.jpg

instead of https://mysite.com/images/product.jpg

I think this is not a bug but a new security feature that apple has added. So their is no immediate solution to Safari customers, unless the zc coding is changed to work like paypal (customer is sent back to your site for success page) or all the <base> href are changed to absolute URL's on the success page.

This may seem like a small issue now, as it only affects Safari users on shops that use Authorize.Net SIM, but I think in time with more shops turning from AIM to SIM because of PCI liability and spoofing being more of an issue, most browsers will function this way.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

6 Jul 2010, 3:27 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

dharma:

Using Safari the customer sees and completes the Authorize.net SIM payment page, clicks submit (and is approved) Authorize.net grabs the "checkout_success" page from my store and displays on "https://secure.authorize.net/gateway/transact.dll" missing CSS, images and some of the links are bad (page hyper links are via https://secure.authorize.net/ not https://mystore.com/ )

All other browsers work fine except safari (Windows) and safari mac (v. 4 & 5).

When I set up Authorize.net SIM a few weeks ago, I tested it with safari and it displayed correctly. I am running zen cart 1.39d and 138a both show this issue. My "response" and "receipt" URL settings in my Authorize.net Merchant Profile are left BLANK. I am using the MD5 Hash.

I have already called Authorize.net and they say its a problem with the zc code, which on my 138a store has not changed since installing SIM. Does anyone else see this issue?

dharma:

The way zc's Authorize.Net SIM works is the customer is taken to : https://secure.authorize.net/gateway/transact.dll after the confirmation page, fills in their details and if approved Authorize.Net grabs your HTML of checkout_success page and displays it on their website, thats why the URL is https://secure.authorize.net/gateway/transact.dll .

Up until a few weeks ago all browsers including safari displayed this "forwarded HTML" perfectly. Now however Safari's new version (5) ignores your <base> (mysite.com) html of the code and replaces it with (secure.authorize.net)'s because that is the site you are on.

So images are https://secure.authorize.net/gateway/images/product.jpg

instead of https://mysite.com/images/product.jpg

I think this is not a bug but a new security feature that apple has added. So their is no immediate solution to Safari customers, unless the zc coding is changed to work like paypal (customer is sent back to your site for success page) or all the <base> href are changed to absolute URL's on the success page.

This may seem like a small issue now, as it only affects Safari users on shops that use Authorize.Net SIM, but I think in time with more shops turning from AIM to SIM because of PCI liability and spoofing being more of an issue, most browsers will function this way.

Problem noted. Research in progress. Very little technical information available on the what/why aspects of the browser changes.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Jul 2010, 2:31 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

You can try the following hack by replacing the following files with the files in the attached zip:
This is ONLY SUITABLE FOR v1.3.9d:
/includes/modules/payment/authorizenet.php
/includes/modules/checkout_process.php (no significant changes)
/includes/modules/checkout_process/header_php.php
/includes/modules/checkout_success/header_php.php
*
NOTE: These changes will be included in v1.3.9e*

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jul 2010, 7:03 PM
#15
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

I uploaded the new files:

/includes/modules/payment/authorizenet.php
/includes/modules/checkout_process.php (no changes)
/includes/modules/checkout_process/header_php.php
/includes/modules/checkout_success/header_php.php

and ran a test with Safari 5 and it works perfectly!

After the customer clicks submit on the https://secure.authorize.net/gateway/transact.dll page they are sent to a white page with centered text explaining something (loads/forwards in under a second, too fast to read) this page forwards to mysite.com's checkout_success page with CSS, images and working links!

yay!

Will this "hack" be added to the core code in the next release of 1.3.9e?

I'm a bit cautious about running custom/beta code with payment modules :unsure: esp. seeing this in the new coding:

MODULE_PAYMENT_AUTHORIZENET_MD5HASH == 'DANGEROUSLY-BYPASSED

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

19 Jul 2010, 2:01 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

The changes will be included in v1.3.9e and newer.

The code about which you claim to be alarmed is commented-out, and therefore irrelevant.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jul 2010, 2:40 AM
#17
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Re: [Done v1.3.9e]Auth.Net SIM - Safari checkout_success page= Bad links no css or images

Smokin'! :smoke: Thanks Dr. Byte! :clap:

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41