View Full Version : Moneris / eSelect Plus Payment Module
sdwood
13th May 2006, 09:02 PM
I'm reviving this thread about Moneris / eSelect (http://www.zen-cart.com/forum/showthread.php?t=26682) from the archives, as there appeared to be no resolution at the time it was locked.
as of Feb 12 they will not longer support the method used.
Cloelke implies that there are changes necessary to the eselect_api module. Can anyone confirm this? If so what is the nature of the changes?
I am working with Moneris Integration Support to sort out the eslect_api contribution. Hoping to hear back from them early next week and will post their response as soon as its available.
Coredesign, have they responded to your request?
Are there people out there who are presently running ZenCart with processing with through Moneris? Reading this thread one gets the impression that payments would have ceased functioning as of Feb 12. If that's indeed true I find it hard to believe there's been no further mention of it here. Does the silence mean all is well, or that nobody actually uses the eselect_api module in production?
Lastly, does anyone have any comments about the Moneris / ZenCart relationship? I'm curious to know how supportive people feel they are when it comes to integration issues.
Regards,
Steven
--
Steven Wood
Ikoro Digital Inc (http://ikoro.com)
moxy
10th July 2006, 05:14 PM
I'm about to set up a simple shopping cart and would like to use zencart. But my client is committed to processing via Moneris.. Has there been any resolution to this - or more simply, is it possible and/or relatively easy to use zencart with Moneris?
Thanks in advance...
fantasygoat
28th August 2006, 10:20 PM
I'm also finally at the point where I am ready to set up the credit card processing for my zencart store, and am looking for a Moneris payment module. Any updates on this? Would the osCommerce one work?
coredesign
28th August 2006, 11:35 PM
This was the "fix" provided by Moneris Integration Specialist, Christian Abdel-Malek:
"Please ensure that you do not have any leading space in your mpgClasses.php file as that has been known to cause several errors in sending transactions not only in zencart but also in previous oscommerce transactions that I have dealt with in the past."
aasaria
26th September 2006, 02:41 AM
Did people get this solved? I have a working e-select Moneris module working. Let me know if you need it.
duckydoodles.com
27th September 2006, 07:42 PM
Did people get this solved? I have a working e-select Moneris module working. Let me know if you need it.
Hello aasaria! I would love it if you could send me the working e-select Moneris module. What version of Zen Cart are you using? If you could please send it to stencells########################## that would be much appreciated, thank-you. :D
jstushnoff
28th September 2006, 05:38 AM
I had got my eSelect Payment Module working too, but I can't remember what I did (it was a while ago). It did have something to do with downloading the latest MPG classes from Moneris though.
BIG PROBLEM THOUGH! I just found out yesterday. After using it for a few months, we've just discovered that orders over $1000 process normally on Zen Carts end (no errors), but the transaction is not recorded with Moneris! :ohmy: Anybody know what might be the problem? We've lost a few thousand dollars worth of merchandise that was shipped before we noticed the problem!
I will post the fixes if/when I get them all figured out, but if anyone has figured this out yet, or has any ideas, please let me know ASAP.
jstushnoff
28th September 2006, 09:04 AM
:D OK, it seems like I've got the problem fixed.
I believe I originally started with the eSelect Plus/Moneris Payment Module for Zen v1.2.4, written by NetworkDad.
Instead of using the supplied mpgClasses.php file, I downloaded the latest "PHP API" from
https://www3.moneris.com/connect/en/process/apis/PHP/
Make sure you open the file and change " MONERIS_HOST" to be 'www3.moneris.com' when you want to take the store into the 'Production' environment (instead of just testing)
For more information go to CHAPTER 11 on this PDF:
https://www3.moneris.com/connect/en/download/feb05/PHP/eSELECTplus_PHP_IG.pdf
I then made modifications to eselect_api.php according to stealthman from this post http://www.zen-cart.com/forum/showthread.php?t=15013
Make sure you get the "if ($response_code == "null")" condition included in the script (3/4 of the way down the last bunch of Code) or you, nor the customer, will have no indication if the cc processing fails! (I missed putting that in, as I think the rest of the code was already included in the module I downloaded)
Here's the biggie for orders over $1000. On line 241, the code should be changed from
amount => number_format($order->info['total'], 2),
to
amount => number_format($order->info['total'], 2, '.', ''),
note the added , '.', ''),
This makes sure there is NO thousands separator instead of the default ' separator.
Moneris (CANADA) requires a number with only a decimal place separator of . and no other separators!
For more information go to APPENDIX A on this PDF:
https://www3.moneris.com/connect/en/download/feb05/PHP/eSELECTplus_PHP_IG.pdf
BTW, I really don't know PHP, so if anyone can check and correct anything please leave a post here.
Also, does anyone know how to submit this module with updates for possible inclusion on the community, or does anyone know where you can get the original anymore?
If anyone else has made any other improvements please leave a post for those of us still using this module. Thanks
aasaria
1st October 2006, 08:08 PM
Nice find on the thousands separator! I would have missed that.
Please note that in stealman's he calculates the next order ID by incrementing the last order ID. In the code as far as I can see, this isn't used anywhere except stored in a DB. This is probably because he doesn't show another part of code which allows invoices to display transaction information.
Please note that incrementing the last order ID is, technically, not a correct way to find the current order ID. You see, the way Zen works, it only gives an Order ID to an order AFTER it has been processed (with payment). Before that, the customer could cancel their order. So the problem is that when you do a transaction, you have no simple way to associate it with an order until after the transaction has taken place (there are other functions in the payment modules that help do that).
The problem could occur that two customers are paying at the same time and simply incrementing the last order ID will give both of the transactions the same "next order id" value. This would become a very noticable problem if you have many orders per hour.
You can ignore this advice if you don't care about showing tx info in your invoices. The code will work fine.
aasaria
1st October 2006, 08:15 PM
Also, with regards to getting a "NULL" response from Moneris.
This happens in two cases:
1. The moneris server was unreachable (the server is down, your internet connection is down, etc.)
2. The Moneris server took too long to reply
In the second case, it gets tricky becauase it is *possible* that the Moneris server got your transaction, processed it properly, and charged the card but just didn't have enough time to reply and say "yo, it's all good". In this case, with the code as is, your store will give a customer an error and make them enter their credit card info again.
Now the problem here is that the code as is generates a new order id ($oid) every time so the second time the customer will enter their credit card info, it will process as a second trasaction and double bill the customer. Making the oid persist will cause you other problems (e.g. the customer can change stuff in their cart after the first NULL response and the orders are no longer the same).
Solution? Well for both cases 1 & 2 our store has decided it is best to tell the customer, hey, your transaction went fine. Process the order and use a secondary, human way to process the card. In this case, our human operator will use the SAME moneris order id so that if the original order *did* go through, the moneris server will say "transaction already done" and avoid the double bill.
basically my advice is that if you get a null, don't just tell the customer to enter data again. because if the server *is* down (case 1) this just means frustration for the customer. and if the tx did timeout, it is possible it still went through.
Radish
18th October 2006, 09:56 PM
Hi All,
Does anyone have a working copy of this mod that they could post or send me? I've been looking a for Moneris solution for a while.
Feel free to PM me.
Cheers,
Colin
coeus
8th November 2006, 10:51 PM
Just a question,
Can't their oscommerce module work with zen-cart?
jegelstaff
23rd November 2006, 09:36 PM
Hello,
I am wondering if out of this useful discussion an official working version of the this payment module was developed, and if so, could it be posted in the official downloads area?
Obviously several people have working versions. I'm new around here, but surly it can't be hard to get something like this posted on the zen-cart.com site?
Thank you very much to the contributors here who have shared their knowledge. With that it should be at least possible to recreate a working version of the module, if it comes to that!
--Julian
weekend camper
7th April 2007, 11:07 PM
This was the "fix" provided by Moneris Integration Specialist, Christian Abdel-Malek:
"Please ensure that you do not have any leading space in your mpgClasses.php file as that has been known to cause several errors in sending transactions not only in zencart but also in previous oscommerce transactions that I have dealt with in the past."
WOW!
that helped clear one hurdle at least.
for those that are still getting "header already sent" messages,
modify the mpgClasses.php file at the very beginning to take away ANY blank spaces that maybe hiding hidden characters:
<?php
#################### mpgGlobals ###########################################
class mpgGlobals{
becomes:
<?php
################### mpgGlobals #############
the bottom part is the same:
}//end class
?>
becomes:
}//end class
?>
^^ NO spaces at all after "?>"
Now .... to actually get it talking to the Moneris servers. :yuck:
weekend camper
25th April 2007, 11:19 PM
Anyone have a working module? I'm not getting the customer info to the Moneris servers.
b18cya
26th April 2007, 12:25 AM
x2 , need a working module
b18cya
26th April 2007, 03:37 PM
bump..anyone....
weekend camper
27th April 2007, 06:47 AM
bump..anyone....
b18cya, the module *does* work as it stands.
Two things to watch for:
1 - the spacing in the provided 2.02 version of mpgClasses.php (above)
2 - that the default setting of this is production, not testing servers (check readme.txt in the zip files).
If its something else, then I'll try to help here. Just give a few details.
b18cya
28th April 2007, 09:12 PM
Oh alright, so once you do that, the module works perfectly fine with no issues?
kuroi
28th April 2007, 09:20 PM
I got this working for a client in very similar fashion to what is described above and it looks pretty reliable.
sal4888
26th May 2007, 01:42 AM
I got this working for a client in very similar fashion to what is described above and it looks pretty reliable.
Do you have a working mod for zen1.37??
moltar
28th May 2007, 08:31 PM
So this thread is now over a year old and there is still no mod. I am trying to hack together a solution from the OSC module provided by Moneris, but there seem to be quite a few differences. I don't know history of ZC well enough to make the judgements on the edits, but I will try to fit it in. If someone could post a tutorial or a full contrib it'd be awesome! :)
kuroi
28th May 2007, 08:55 PM
As this thread shows, there are several people who have the Zen Cart module working. In my case with 1.3.7. All the information needed is already in this thread and if you track back through the older threads you'll find additional enhancements that allow you to add diagnostics and audit trail info.
Unfortunately my agreement with my client doesn't allow me to release any of the code that he had paid me to develop or amend; but this was one of the easiest parts of the work that I did for him. The module gets you 98% of the way there and this thread picks up the rest.
moltar
28th May 2007, 10:15 PM
But just to make things clear, are we indeed talking about the oscommerce model provided directly by Moneris? They have a long install proces that forces to make edits to the base ZC files. I thought it was a no-no with upgrades.
kuroi
28th May 2007, 11:32 PM
No. We're talking about the Zen Cart e-select API payment module available from here (http://www.zen-cart.com/archived_contributions/payment/).
moltar
28th May 2007, 11:43 PM
Well, that's a whole different ball game :) I looked in the contribution section, but didn't find it. I either blind, or it really isn't listed there. Thanks a bunch!!!
weekend camper
29th May 2007, 07:18 PM
. All the information needed is already in this thread and if you track back through the older threads you'll find additional enhancements that allow you to add diagnostics and audit trail info.
Currently tracking down a bug where Zen will accept an order that never 'hits' (shows as declined or accepted) by Moneris servers. To say I'm frustrated would be an understatement.
Will look for the posts that Kuroi mentions.
weekend camper
30th May 2007, 01:53 AM
Will look for the posts that Kuroi mentions.
:blush:
Restepped through the bits detailed here and in Stealthman's post.
Stealthman's error checking pointed me in the direction that was previously touched upon by a poster in this thread ... namely that if you send order ID's to Moneris (no real need, but it kept my bookkeeper happy), Moneris demands that each ID be unique ... for example, a rule which is broken when a customer re-inputs corrected CC info.
My solution rested on adding a time stamp to the order ID sent to Moneris (doesn't affect Zen invoice at all). :clap:
b18cya
21st June 2007, 01:37 AM
Hey, so I pretty much got it set up but get this error after entering CC info:
1146 Table 'b18cya_zencart.moneris_request' doesn't exist
in:
[insert into moneris_request (type, moneris_order_id, amount, pan_part, expdate) values ('preauth', '6083763766666076', '40.70', '5191 6469', '0708')]
Anyone know why ?
moltar
21st June 2007, 02:23 PM
Hey, so I pretty much got it set up but get this error after entering CC info:
1146 Table 'b18cya_zencart.moneris_request' doesn't exist
in:
[insert into moneris_request (type, moneris_order_id, amount, pan_part, expdate) values ('preauth', '6083763766666076', '40.70', '5191 6469', '0708')]
Anyone know why ?
Probably because you didn't create the moneris_request table as per documentation.
stage
4th July 2007, 02:34 AM
If anyone has any information or is interested in working on an official mod that can be posted and shared for eSelect I would be interested in hearing from you.
I have a client who I am working on this payment module. I had the osCommerce version about 75% ported, the rest is working with the ZC learning curve, I'm new here, lots of osC experience. My client notified me a few days ago that he is going to use the eSelect Hosted Payment Processing, so I'm shifting my effort in that direction, which becomes my top priority.
It sounds though from this thread that there is some interest in getting something official out there.
stage
moltar
4th July 2007, 12:10 PM
If anyone has any information or is interested in working on an official mod that can be posted and shared for eSelect I would be interested in hearing from you.
I'm up for it. I have a working copy on my development server. PM me.
colinbird
24th July 2007, 05:43 PM
any updates on this?
from the thread it looks like i can get the version for 1.2.4 from "NetworkDad" and just get the newest mpgClasses.php (and pay attention to whitespace, etc)
However, i can't seen to find the module written by NetworkDad anywhere.. Google searches just lead me back to this thread
any help would be appreciated!!
please PM me or email therudeness _@TT_ gmail
thanks!
kuroi
24th July 2007, 07:03 PM
The point of the forum is to share knowledge for everyone's benefit, so we don't email pr PM answers. Here's the one you're looking for:
http://www.zen-cart.com/archived_contributions/payment/eselect_api.zip
colinbird
24th July 2007, 07:09 PM
thanks so much!
coeus
26th July 2007, 03:21 PM
I have completed a Moneris Payment module (a fork from their original one made for osCommerce).
The Zen Cart team should soon approve my module and it will be available in the downloads section.
infectious
23rd August 2007, 02:29 AM
I have a client that needs to use their Moneris eSelectPlus account but doesn't want to have the customers leave the site to complete transactions on the Moneris Secure Payment Page.
Has anyone worked with the eSelect Plus PHP API, or know what's involved, to integrate into Zen Cart and allow for transactions to take place on the client's server?
I haven't tried the existing Moneris payment modules talked about here, so I'm not sure if any version of them use the API. I assumed that they would be connecting to the Secure Payment Page, like the WorldPay payment module which I have used previously.
Any info would be much appreciated.
Thanks,
Kevin
kuroi
23rd August 2007, 09:09 AM
The original Zen Cart module uses the API. I can't speak for the one ported from osCommerce.
infectious
28th August 2007, 08:53 PM
Is there anyone reading this thread who is using the Moneris / eSelect Plus API Payment Module who could provide an overview of the actual payment process when using the API?
I have previously used the WorldPay payment module, which sent the customer to WorldPay's payment page to complete the transaction, then returned the customer and payment status back to Zen Cart, so that's a process I'm familiar with.
I'm curious to know how both the API module (located at http://www.zen-cart.com/archived_con...select_api.zip as indicated by Kuroi) and the Moneris Payment Module located in the downloads (http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_48&products_id=666) differ.
Any information would be most appreciated.
Thanks very much,
Kevin
kuroi
28th August 2007, 09:48 PM
The original module sends a message to Moneris via the API and receives one back which it then interprets. The customer never leaves your site. It's a better and seamless customer experience.
infectious
28th August 2007, 11:18 PM
Thanks very much Kuroi
tamersalama
2nd November 2007, 07:52 PM
Without following this thread - here's what I did to get it working (November 2007):
- Followed the instructions as shown on the readme file (don't forget to use POST for your moneris feedback - Moneris eSelect Website | Admin configuration).
- Changed tep_* method names to zen_*
- Changed $db->Execute in insert_moneirs_orderid.php to zen_db_perform
HTH Someone.
toboldlygo
22nd November 2007, 11:27 PM
Hi,
I would like to use the Moneris module and would like customers to stay on my site. I understand the original moneris mod (that Kuroi referred to) does this. Does anyone know if the new one (the one ported from osCommerce and available in the downloads) does this? Which is the better one to use?
I would also like to use the new Interac Online service that is available in Canada. Moneris supports this. Does anyone know how I can modify the moneris mod to use this service? I am not too proficient with coding so any help would be appreciated. Or, can anyone modify the existing ones to do this?
Does anyone have a working moneris mod that I could access?
Thanks
infectious
26th November 2007, 08:46 AM
I've set up the mod mentioned by kuroi and have only used it in the test environment so far. It does process the transaction with the customer staying on your site.
Based on the reply from Tamersalama, I believe that the osCommerce port is being used in that instance, as there are some settings/configurations mentioned that are not in the module I integrated. As I haven't integrated it, I can't say for sure how it behaves, but I think it takes the user to the Moneris server for the transaction and then returns the user back to your site.
As for your question about including the Interac Online service, I'm afraid I can't help you with that, as I haven't tried to integrate that into my client's site. If you do find out any information about that, please do reply to this thread for anyone else who's interested.
Kevin
toboldlygo
26th November 2007, 10:33 PM
Hi Infectious,
Thanks for the info. I am still trying to decide whether I want to use Moneris. Dr. Byte is writing a new Beanstream mod that looks really interesting. It will allow customers to stay on your site for payment and will include Interac Online access. It looks like it will be really good.
If anyone else is interested in a mod for the Beanstream gateway and/or wants to have Interac Online capabilities (available only in Canada), Dr. Byte is looking for sponsors to cover development costs. Here is the thread for more information:
http://www.zen-cart.com/forum/showthread.php?t=80483
toboldlygo
27th November 2007, 06:01 AM
Hi Infectious,
Did you do anything other than what is mentioned in this threat to get the eSelect mod working properly?
Thanks
keylesslocks
6th December 2007, 08:27 PM
after I installed the moneris module, I did everything except the very last parts (7,8,9) because we were waiting for our login info from moneris... and our order processor told me we have an error, it said
1146 Table 'midwest_zc1.moneris_orderids' doesn't exist
in:
[select moneris_orderid from moneris_orderids where orders_id = 1190]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
this was on the admin order page for order 1190, on the top... because of this error, it wouldn't load the bottom of the page were he could mark it shipped, so I had to delete all the code from the pages and retreat....
what does the error mean? shouldn't I be able to have all the code installed, but not enabled as a payment module?
Please help I have to figure this out asap.
thanks,
ES
:lamo:
keylesslocks
6th December 2007, 10:33 PM
I installed the module from the contributions.... but after reading this I think I want to install the eselect mod from here: http://www.zen-cart.com/archived_contributions/payment/ - is that true? thanks:blink:
keylesslocks
13th December 2007, 10:13 PM
Anyone?????? Know If This Is True Or What? I Have To Integrate With Moneris Right Now...
kuroi
14th December 2007, 12:17 AM
There are two Moneris mods. Once with it's roots in Zen Cart from way back and one ported from osCommerce more recently. I doubt that anybody has tried both, so you have to make your own choice and go with it.
Your earlier problem was because the SQL patch hadn't been applied properly.
keylessguy
14th December 2007, 09:26 PM
So I downloaded the archived module and actually got it working, then I called moneris and asked if they see it in the test server log and they said I got the module was for the canadian version and it is a completely different api for US version. I download US version and uploaded new mpgClasses.php but now not working, keep getting header errors... tried to do the mods in this post to get rid of header errors like when I successfully did it for original canadian mod, but not working!
just says: String to be sent = XXXXXXSECURITYSTRINGXXXXXX
Warning: Cannot modify header information - headers already sent by (output started at /home/midwest/public_html/devtest/includes/modules/payment/eselect_api/mpgClasses.php:49) in /home/midwest/public_html/devtest/includes/functions/functions_general.php on line 44
any suggestions? am I close? do I have to modify the other pages of the module?
thanks Eric
keylessguy
14th December 2007, 09:37 PM
now I just copied the top portion of the us api into the mpgclasses of the working one.... but it is still the canadian rest of the page i wonder if it is working... on the front end it is, but back end? I want to try and get the full us one working, but I think it has bad sapces in it causing errors
jstushnoff
14th December 2007, 09:59 PM
I really am not a PHP programmer, but I've learned that the "headers already sent by" error happens when there is a blank line at the top (and/or bottom??) of the php page listed in the error.
Try using the original US mpgClasses.php page, but open it and make sure there is no blank line or space before the first <?php
Also, I am using the Canadian page, not the US one.
BeerBender
15th December 2007, 01:35 AM
Hey everyone. I am new to forums and am trying to install the moneris api payment module on my website.
I have downloaded the moneris api files from the archives and have done the revisions that were suggested in the following post
http://www.zen-cart.com/forum/showthread.php?t=15013
which stealthman made. I also added the 2 database tables moneris_request and moneris_transaction to my stores database.
I am running into a problem now when I try to complete a transaction in test mode. It just goes to a blank page. I check the moneris_transaction table and it says under the response_message field "API token mismatch."
I am currently waiting for an EVSSL certificate so currently my site is not running in SSL mode. Would that cause this issue?
I have double checked the token a few times and refreshed a new token with no luck.
I am not sure how to do the following either
*cURL is required and MUST be compiled into PHP with SSL support
*Port 43924 open for bi directional communication
which are listed in the requirements so they may also be factors. Please let me know if you can tell whats going wrong.
Also is the moneris api files located here
http://www.zen-cart.com/archived_contributions/payment/
for Canadian accounts? Because thats what I have and it could also be the issue.
BeerBender
2nd January 2008, 06:52 PM
Bump, nobody can help me with this?
vBulletin® v3.7.6, Copyright ©2000-2009, Jelsoft Enterprises Ltd.