Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#8 | 525268_general_cleanups.patch | 1.86 KB | greggles |
Comments
Comment #1
spirodon CreditAttribution: spirodon commentedI have the same error. Any help?
Comment #2
ezra-g CreditAttribution: ezra-g commentedThis 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.
Comment #3
spirodon CreditAttribution: spirodon commentedAh very cool. Is there anything I can do on my end to help you out? [ not being pushy, just trying to be helpful : ) ]
Comment #4
spirodon CreditAttribution: spirodon commentedAlright 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.
Comment #5
jerry CreditAttribution: jerry commentedIn 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:
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.)
Comment #6
thisisnotrealpeople CreditAttribution: thisisnotrealpeople commentedAlso 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
Comment #7
j0rd CreditAttribution: j0rd commentedAug 27th release contains this bug:
api/mpgClasses.php & api/mpiClasses.php
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).
Comment #8
gregglesHere'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.
Comment #9
ezra-g CreditAttribution: ezra-g commented$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.
Comment #10
occupantI 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
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.
Comment #11
dirksonii CreditAttribution: dirksonii commentedI'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.
Comment #13
ezra-g CreditAttribution: ezra-g commentedI 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.
Comment #14
ezra-g CreditAttribution: ezra-g commentedI accidentally messed up the commit message. For those interested in the change it's http://drupal.org/cvs?commit=313314
Comment #15
ezra-g CreditAttribution: ezra-g commented