I can't process cc transactions. I get to the cart/review page, but it gets declined every time I confirm the order. Checking the log, I get: Credit card **purchase** declined: Canceled: Malformed XML.
Anyone have any ideas?

CommentFileSizeAuthor
#8 525268_general_cleanups.patch1.86 KBgreggles
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

spirodon’s picture

I have the same error. Any help?

ezra-g’s picture

Category: support » bug

This has to do with the way moneris generates the mpgHttpRequest object -- When you are not doing AVS or CVV, it should be 'purchase' (or us_purchase) rather than completion, or blank, which it probably is in this case. I'll be posting a patch to fix this.

spirodon’s picture

Category: bug » support

Ah very cool. Is there anything I can do on my end to help you out? [ not being pushy, just trying to be helpful : ) ]

spirodon’s picture

Alright so I couldn't wait any more cause I had a paying client rush me on it so I just fixed it myself. Here's what you need to do to the .module file to fix it:

Add this to line 436:
if ($txn_array['type'] == '') { $txn_array['type'] = 'purchase'; }

That should fix it. My transactions seem fine now. I'm not sure if that's what you were going for but it SEEMS to be working fine for me.

jerry’s picture

In the last dev release, dated today, I looked into this issue and found a couple of instances where the variable $txn_type was incorrectly referenced as $txnType. I believe that this may be the problem.

I hesitate to post a patch, though, because I haven't gotten the module to work yet myself and can't verify that my changes are correct. I keep getting this response:

Payment failed for order 70: Credit card **us_purchase** declined: Cancelled: null

I suspect that I'm just not setting things up for the test environment properly, and unfortunately, the Moneris folks have been rather less than helpful about it. Could someone briefly post (or E-mail) the steps required to obtain a valid test store ID/API token? (Or if that error means something to you, please clue me in.)

thisisnotrealpeople’s picture

Also getting the same issue. Currently do not have eFraud on the account, so I've disabled the CVV and AVS options. Also we are using the US api.

Originally my error message was the malformed xml error. Then I made the change to line 436 as indicated above by spirodon:

Add this to line 436:
if ($txn_array['type'] == '') { $txn_array['type'] = 'us_purchase'; }

Now when I try to process an order I get the following error:

Credit card **us_purchase** declined: Cancelled: null

j0rd’s picture

Aug 27th release contains this bug:

api/mpgClasses.php & api/mpiClasses.php

   $mode = variable_get('moneris_transaction_mode', 'test');
// should be this
// $mode = variable_get('uc_moneris_transaction_mode', 'test');

This makes all transactions getting sent out to the test server, which can cause stuff to fail.

You'll also want to patch the $txnType to $txn_type bug mentioned in post#5

And the fix in #4 along with moving should resolve enough issues to get you to process correctly (at least for me).

greggles’s picture

Status: Active » Needs review
FileSize
1.86 KB

Here's a patch that attempts to get these elements incorporated.

It would be great if folks could help review this and I will commit it shortly.

ezra-g’s picture

Status: Needs review » Needs work

$txn_array['type'] = 'purchase';

This is not compatible with the us api, which requires this value to be us_purchase(). We have a helper function to determine the proper purchase type. I'll try to re-roll later today.

occupant’s picture

I applied the patch in #8 and now get declined with an API token mismatch. I have gone into the api/mpgClasses.php and api/mpiClasses.php files and replaced both

                  'MONERIS_HOST' => 'www3.moneris.com',
                  'MONERIS_TEST_HOST' => 'esqa.moneris.com', 

with the development url (still trying to get a successful test) and it continues to fail. I've tried regenerating a new hpp_key without success.

Any ideas? I'd be happy to test any and give feedback.

dirksonii’s picture

I've applied the patch in #8, and it has not affected the problem whatsoever.

As a side note- Some of you must have a working, custom version of this module, yes? Is there any chance someone could just post that for the mean time? I really need to get /something/ up, even if it's not particularly polished.

ezra-g’s picture

Status: Needs work » Fixed

I committed this re-rolled version of the patch from #8. Please check and re-submit the uc_moneris payment gateway settings. I don't see the code mentioned in comment #8, so please file a new issue if you think that there is still a bug related to your proposed change.

ezra-g’s picture

I accidentally messed up the commit message. For those interested in the change it's http://drupal.org/cvs?commit=313314

ezra-g’s picture

Category: support » bug

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.