Forums / Addon Payment Modules / blank checkout_process page when using moneris payment module 1.24 or 1.25

blank checkout_process page when using moneris payment module 1.24 or 1.25

Views: 3,224

Results 1 to 10 of 10
30 Oct 2013, 2:16 PM
#1
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

blank checkout_process page when using moneris payment module 1.24 or 1.25

I have been using zen cart for sometime. However, since I tried to use Moneris payment module 1.24 or 1.25, I have been running through issues. I have done a bran new fresh install using ftp. I can checkout using money order smoothly and checkout_process page loads perfectly with order number.

I have tested with both versions 1.24 and 1.25 and the results are the same.
Issue 1.
When using Moneris, payment is accepted through moneris and an order id is generated. All database fields are populated with proper information. However, checkout_process page is blank. When viewing the page source it shows "1" without quotes. When debugging the page, I can see all parameters that are sent from moneris (https://esqa.moneris.com.....)
Issue 2.
When getting to page 2 out of 3 of the checkout process firefox debugger shows me "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional" the first line of "main_page=checkout_payment". Notice the code "" which by the way is also visible in the admin page under modules> payment. When uninstalling Moneris payment module, it goes away. so I know the culprit is moneris.
Attachment 13261
My test site is http://zc.upc-support.com and I appreciate all the help I could get.

I know I am running an older version but until i got some of the add-ons fixed for version 1.5, I will have to use 1.3.9h.

30 Oct 2013, 2:27 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

Have you tried using the Developers Tool Kit to search for  ?

Are there error log files in your /cache or /logs folder ?

30 Oct 2013, 2:31 PM
#3
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

Thank you for the prompt response. I did a search using all 5 search features and none came back with zero results.

30 Oct 2013, 3:06 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

And the error logs ?

30 Oct 2013, 3:27 PM
#5
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

I had forgotten about the log. This is what I get in the log
Cannot modify header information - headers already sent by (output started at /home1/upcsuppo/public_html/zc/includes/modules/payment/moneriseselectplus.php:1) in /home1/upcsuppo/public_html/zc/includes/functions/functions_general.php on line 45

if ($httpResponseCode == '') {
  header('Location: ' . $url);                   //* ---------> line 45 in functions_general.php
  session_write_close();
} else {
  header('Location: ' . $url, TRUE, (int)$httpResponseCode);
  session_write_close();

I suspect that "" is the culprit for the error generated in the logs.

30 Oct 2013, 4:40 PM
#6
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

Ok, I guess I was not too bright. I got it fixed. I had accidentally downloaded Moneris version 1.25 and saved it as moneris payment module without a version number. I redownloaded moneris v1.24 and uplaoded it and the odd character went awaya nd the site is working as it should.

Thank you for the support. I felt that I was't alone which is why I like forums.

30 Oct 2013, 4:42 PM
#7
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

riomaha:

I had forgotten about the log. This is what I get in the log
Cannot modify header information - headers already sent by (output started at /home1/upcsuppo/public_html/zc/includes/modules/payment/moneriseselectplus.php:1) ...
Remove the last "?>" from all of the files which are part of the "moneris" payment module version 1.25. The closing "?>" on a file is not needed in PHP. Removing the closing "?>" from PHP files ensures any trailing character data (such as a NULL, Line Break, ETC) are not treated as content to be printed when the PHP file is interpreted.

I suspect this may be the issue (or possibly an extra space / character before the first "<?php" in a file).

Note: I'm not sure what changed from 1.24 to 1.25 as i do not use this module, but glad switching back fixed your issue. And thank you for reporting back on your solution!

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

30 Oct 2013, 9:22 PM
#8
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

I got it working finally. I reloaded versuion1.24 an I would suspect that removing the closing ?> tag might have worked. However, I wont go back and test again. When I say I got it to work with version 1.24 I could only get it to work with appropved transactions. When I got a declined or invalid card number, it was showing a white page. In simple words anytime it failed a credit card transaction it showed a white checout_process page. I did some basic troubleshooting and I found out that something the amount of text found in the languiage file for moneriseselectplus as well as the template english language file thatc ontained invalid expiration date, invalid card, etc. I reduced the amount of text to 5 words and I got it to work flawlessly.

Thank you guys and gals

1 Nov 2013, 7:17 PM
#9
riomaha avatar

riomaha

New Zenner

Join Date:
Oct 2013
Location:
MTL
Posts:
66
Plugin Contributions:
1

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

So I finally figured out where "" it comes from. I was building a payment module and only when I was comparing that I found the cause.
I created the page using UTF-8 and while I was comparing it to another page. I noticed the odd characters. I copy and pasted the same code from original payment page and I could still see the odd characters. By the way, I was using EXAMDIFF to compare and that is why I saw the odd characters ion my UTF-8 document.. At first a blank space at before the <?php tag was causing one to appear but there was another code exactly identical. I resaved the document using ANSI and that is when the odd characters disappeared. I had to save my definition file as well using ANSI.
It appears that Zen Cart 1.5 does not pay attention to UTF-8 or ANSI but Zen Cart 1.3.9 requires a plugin or something to be able to ignore UTF-8 encoding.
I know posting solution at this stage might sound idiotic but in the event that someone else came across this post. I hope it is helpful to them.

1 Nov 2013, 9:45 PM
#10
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: blank checkout_process page when using moneris payment module 1.24 or 1.25

Thank you for reporting back. It is appreciated by both myself and the community.

A character encoding does make sense, especially if characters were present outside the php block (when interpreted in a web server environment, php "prints" stuff outside the php blocks). If it was inside the php block it would not have been "printed" unless explicitly told by php code to be "printed".

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker