Moneris Gateway

Contrib type: 
Module
Status: 
Complete and working
Moderation: 
Failed code review
Latest version: 
1.2.1

Downloads


Compatibility: 
Ubercart 1.x

Updated Verified by Visa now available! Also implemented is the ability to perform Purchase/PreAuth and Completion transaction types. (VBV or not)

Using the Authorize.net payment module as a basis I have created a working Moneris.com module. This module is live on several Ubercart installations and working well.


PreviewAttachmentSize
uc_moneris.zip12.05 KB
codexmas's picture
Offline
Joined: 09/19/2007
Juice: 106
Re: Moneris Gateway

Just update the module code as I had discovered a small issue with the Credit Card date parsing.
The code in the module is from a live site that has been working great for several months now.

Enjoy!

Gord.
northStudio.com

Cheers,
Gord.

sleepingmonk@drupal.org's picture
Offline
Joined: 01/20/2008
Juice: 81
Hosted Pay Page?

Hey guys! I'm very thankful for this contribution. It's one of the reasons I'm favoring Ubercart over eCommerce. However it seems to only be configurable to use "Direct Post" and not a "Hosted Pay Page". "Direct Post" requires a SSL Certificate while "Hosted Pay Page" does not, because the data is submitted on a secure Moneris page.

Am I just missing something? I've been trying different settings in Ubercart and the moneris module for a couple of days and reading anything I can find on the topic. Is there a setting for this or is it just not in the module?

Thanks for the contribution!

"I've had this birthmark since I was born." --JB

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Hosted Pay Page?

If you need an SSL you can get it from any of the several vendors that exist, and then to invoke it you just need the Secure Pages module (and then specify which pages to include or exclude from the Secure side). Is this what you mean?

--
Help directly fund development: Donate via PayPal!

sleepingmonk@drupal.org's picture
Offline
Joined: 01/20/2008
Juice: 81
SSL Cert

Actually, I'm trying to avoid the need to purchase my own SSL cert by collecting payment info on the Moneris page rather than on site.

Moneris calls this their "Hosted Pay Page". It's kind of like using PayPal. You just POST transaction amounts and your account id to their server and the user enters credit card info on a secure Moneris page. Moneris processes, sends back a verification message and redirects the user to a page back on your site.

Is there a way to do that with the existing module? My ability to code is not quite good enough to update the module myself. Though I may give it a shot if no one more capable is interested. There's probably not a lot of demand for this feature.

"I've had this birthmark since I was born." --JB

davegan@drupal.org's picture
Offline
Joined: 07/21/2008
Juice: 26
Problems with Ubercart 1.0

Seems like Ubercart is dropping off the decimal fractions if the price is a whole number. Moneris, however, needs to have the fractions in order for the payment to go through. Sample error message:

Payment failed: Credit card payment declined: invalid amount parameter:10

If the price is changed to $9.99, it goes through just fine.

However, if the price is $10 even, then Moneris rejects it. The module should be changed to add on ".00" if there if the amount is a whole number.

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3467
Re: Problems with Ubercart 1.0

It looks like the code should be using number_format($amount, 2) on line 86 instead of just $amount. I'm surprised this wasn't noticed sooner. Is this module still supported?

<tr>.
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15450
Re: Re: Problems with Ubercart 1.0

I doubt it... I can move the contrib authorship to you or just apply this fix in the morning myself if you don't want to have your name on it. Eye-wink

(Read: be bothered by other bugs that pop up, too.)

codexmas's picture
Offline
Joined: 09/19/2007
Juice: 106
Re: Re: Re: Problems with Ubercart 1.0

Agh! I have only just received an email for the last comment... I was not intentionally ignoring or abandoning this module.

I will try to update it soon, with the number format fix as described.

Thanks,
Gord.

Cheers,
Gord.

df
df's picture
Offline
Joined: 04/05/2008
Juice: 13
Another glitch with $amount

I noticed that if you do the fix described above, number_format($amount, 2), then it will add commas to amounts for the thousands (ie. $1,200.75). This also causes the same problem for Moneris (Payment failed: Credit card payment declined: invalid amount parameter).

To fix this I just changed the code on line 86 to:
    'amount'    => str_replace(",", "", number_format($amount, 2)),

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6854
Use number_format($amount,

Use number_format($amount, 2, '.', '') to use a different thousands separator. Another option is sprintf().

codexmas's picture
Offline
Joined: 09/19/2007
Juice: 106
format applied to current version that is available

Thanks for the tip Lyle, I have released the new version of the module, hoping for some feedback, preferably positive...

Smiling

Cheers,
Gord.

Cheers,
Gord.

PhilC's picture
Offline
Joined: 11/19/2008
Juice: 2
Hosted Pay Page ?

A while back, someone asked about using this Moneris module with a Hosted pay page setup for the checkout phase. This setup allows for the request to be posted to the moneris ssl page for the credit card number entry. It allow to outsource the whole SSL and security to Moneris.

Is this possible or do I need to host the SSL credit card number grabbing page on my own site?

Thanks,

Philippe

greggles's picture
Offline
Joined: 12/12/2007
Juice: 95
host moneris module on drupal.org?

I think it would be great to host this on drupal.org

I need to use it and work with it for a client and enjoy using the d.o issue tracker and CVS. What do you think?

Greggles Drupal Articles

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15450
Re: host moneris module on drupal.org?

+1 to that... codexmas, let us know if you need any help getting started with CVS or getting CVS Access on drupal.org.

ivansf's picture
Offline
Joined: 12/24/2008
Juice: 24
Back to checkout with Secure Pages

If I don't use Secure Pages, meaning I will be in http: I don't get any problems with payment, the card get processes and I get the Order Complete page. But If I turn Secure pages on every time I submit the order it sends me back to the checkout page with no message.

Any idea?

j27lee's picture
Offline
Joined: 01/28/2009
Juice: 4
Drupal 6/UC2

Any plans for a Drupal6.x Ubercart 2 version of this module?

80elements's picture
Offline
Joined: 01/28/2009
Juice: 2
Inquiry of Payment confirmation

When using Hosted Page Pay key:

Does this module support Moneris API sending a confirmation back for a successfully completed transaction. Assuming this, does it mean that the transaction will change from "payment pending" to "payment received" in ubercart?

with thanks,

Adrian

stongo's picture
Offline
Joined: 11/26/2008
Juice: 17
Moneris Module for V2 Drupal 6

Anyone heard of any progress for the moneris module being updated for drupal 6?

stongo's picture
Offline
Joined: 11/26/2008
Juice: 17
Ubercart beta2 and drupal 6

Anyone had any luck integrating Moneris into Ubercart on Drupal 6?

RPM
RPM's picture
Offline
Joined: 03/18/2009
Juice: 3
Hello Everyone

I'm looking to use Moneris in Drupal 6. Any word on if it being upgraded?
Thanks

chiddicks's picture
Offline
Joined: 03/19/2009
Juice: 2
Version for UC2/D6

I've done some work in updating this module to UC2/D6. It can be found here: http://drupal.org/node/412910#comment-1421624

Please test and report bugs.

Drupal.org project page: http://drupal.org/project/uc_moneris

j27lee's picture
Offline
Joined: 01/28/2009
Juice: 4
recurring payments?

Can this be configured to use run recurring payments? Any idea on what it would cost to add?

tordrup's picture
Offline
Joined: 03/17/2009
Juice: 19
recurring payments

Bump re: recurring payments. I have a budget, if anyone wants to tackle it (Drupal 6, Ubercart 2)

dbthorburn's picture
Offline
Joined: 08/26/2009
Juice: 6
HELP! Can't process C/C via Moneris module

First I was getting the error:

Payment failed for order #: CVV Verification failed with Moneris code

I figured that maybe my client didn't have eFraud enabled on his account. I disabled CVV, AVS and went forward. Then I got this error:

Payment failed for order #: Credit card **purchase** declined: Cancelled: Malformed XML

I looked around and found this issue - http://drupal.org/node/525268. I made the requested change:

if ($txn_array['type'] == '') { $txn_array['type'] = 'purchase'; }

on line 436 to uc_moneris.module, and went forward. Then I got this error:

Payment failed for order #: Credit card **purchase** declined: API token mismatch

Now I am stuck. I am going to call Moneris in the morning and make sure that they have eFraud enabled, and will then re-enable CVD and AVS. I will then re-enable CVD and AVS in the payment options of Ubercart. I will also remove the code on line 436 from uc_moneris.module. I will then try the whole thing over again.

Want to go live with production site tomorrow morning if possible!

gavinblair@drupal.org's picture
Offline
Joined: 09/09/2009
Juice: 4
any headway with this?

I have the exact same problem. I regenerated the API key, and that didn't help. eFraud is not enabled on the account, so CVD and AVS are disabled and it's not helping.

I made the code changes above which changed the Malformed XML error to API token mismatch, but I don't know what to do next.

Did anyone get it working?

gavinblair@drupal.org's picture
Offline
Joined: 09/09/2009
Juice: 4
using MONERIS_TEST_HOST instead of MONERIS_HOST!

I just got off the phone with Moneris, and they said my transactions were going to their test server (esqa.moneris.com) instead of their live server (www3.moneris.com), which would result in the API Token Mismatch error.

This means that despite the $form['moneris_settings']['moneris_transaction_mode'] having the option of 'production' or 'test', it's still using 'test' regardless of what the value saved is.

The quick and dirty way to solve the issue is to edit mpgClasses.php and change MONERIS_TEST_HOST to be the same as MONERIS_HOST, which I am doing now.

occupant's picture
Offline
Joined: 11/24/2009
Juice: 5
Re: using MONERIS_TEST_HOST instead of MONERIS_HOST!

"The quick and dirty way to solve the issue is to edit mpgClasses.php and change MONERIS_TEST_HOST to be the same as MONERIS_HOST, which I am doing now."

Did this solve the issue for you? I am still getting the API Token Mismatch (even after changing both to the correct host).

Anyone have a working version of the current (D6) module? I'm desperate to get it working.

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3467
Re: Re: using MONERIS_TEST_HOST instead of MONERIS_HOST!

This module has been hosted on drupal.org for almost a year. If you have questions or problems you should raise them in the issue queue at http://drupal.org/project/uc_moneris

<tr>.