Closed (fixed)
Project:
Moneris Payment Gateway for Ubercart
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Jun 2009 at 16:41 UTC
Updated:
17 Jan 2012 at 14:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
ezra-g commentedThis needs a re-roll to cover some spots where the transaction type is incorrect for the Canadian API.
Comment #2
ezra-g commentedHere is a more complete re-roll. This also changes the "unable to verify" avs/cvv drupal_set_messages to be warnings.
Comment #3
ezra-g commentedPrevious patch included a line from #412910: Moneris for Drupal 6?.
Comment #4
gregglesApplied to head - http://drupal.org/cvs?commit=229218
And to the DRUPAL-5 branch http://drupal.org/cvs?commit=229222
Comment #6
j0rd commentedAlright. This patch is bad. This patch allows successfully processed transactions to get shown to the user and ubercart "AVS Failed", even though there transaction has been processed on their credit card.
Here's the use case:
Moneris returns with AVS 'W'. Which it has been on my account. AVS code 'W' is not in the $avs_access array, there for the AVS code marks the transaction as failed, even though the $response_code is less than 49 (a success).
The true way (which needs to superceed any other logic on success/failed) I believe needs to be the response_code. This tells us if we have charged the card or not. If we have charged the card, we need to allow ubercart to display a successful transaction. Otherwise the user will continue to process their card (sucessfully) but being displayed failed messages.
THIS IS BAD BAD BAD and does happen with this code.
Everything needs to be refactored to error on the side of caution.
It should work like this
right now it works like this
this is poor logic and your clients are getting billed and ubercart is not showing successes.
Comment #7
ezra-g commentedThanks for pointing this out. Since this patch has long ago been applied, I created a new issue for this bug report: http://drupal.org/node/630064
Comment #8
j0rd commentedHere's another bug:
$completed is equal to 'true'
$completed is never equal to 'TRUE'
Again, when you are dealing with credit card processor integrations you need to error in the side of caution and should do something like
str_tolower($completed) == 'true';
Unless for what ever reason PHP string comparisons are case insensitive, but I don't think they are.
Here's what responses look like
I've replaced numbers with D to hide the information.
Here's one with AVS response W
I've also noticed that successful transactions seem to have an AUTHCODE of non 0000000 . I assume this also means it was able to auth the card and charge it.
Comment #9
ezra-g commentedThanks for pointing this out. The proper place for this new bug is in a new bug report. Please open a new issue so that we can keep track of it. Thanks!
Comment #11
j0rd commentednevermind.