Bug Tracker Incident #15665

 


Summary
Project
INCDT - xTuple ERP
Incident Category
Bugs
Incident Number
15665
Visibility
public


Product Version
3.7.3
Fixed In Version
3.8.0Beta2


Summary
*Charging a credit card incorrectly uses only 1 decimal place


Description

When charging a credit card using Authorize.net xtuple sends the dollar amount and one decimal place only, omitting the second decimal place.

Steps to Reproduce:
Charge an amount of 31009.96 and xtuple will ask if you want to charge 31009.9


Details
Reporter
ecologix_akelly
CRM Account
Ecologix Systems
Status
Closed
Assigned
gmoskowitz


Priority
Very High
Severity
Severe
Updated
11-16-12 10:44
Resolution
Fixed



Comments

DateUsernameComment
12/27/11 15:39ptyler

Tested okay in 3.8RC2 pre demo db with following merchant email results for same scenario tested when bug was confirmed:

========= ORDER INFORMATION =========
Invoice :
Description :
Amount : 31009.96 (USD)
Payment Method : Visa
Type : Authorization and Capture

============== RESULTS ==============
Response : This transaction has been approved.
Authorization Code : 000000
Transaction ID : 0
Address Verification : AVS Not Applicable

10/05/11 10:26gmoskowitz

Andrew,

The $10,000+ detail was /the/ clue required to find this bug. Unfortunately this is a C++ change in the Authorize.Net (and other credit card processor) handling and isn't scriptable.

Gil

10/05/11 10:18svn

Revision: 12567
http://postbooks.svn.sourceforge.net/postbooks/?rev=12567&view=rev
Author: gilmoskowitz
Date: 2011-10-05 14:18:09 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
bug #15665 - default args for QString::number(double) round to 6 significant figures

Modified Paths:
--------------
xtuple/trunk/guiclient/authorizedotnetprocessor.cpp
xtuple/trunk/guiclient/creditcardprocessor.cpp
xtuple/trunk/guiclient/cybersourceprocessor.cpp
xtuple/trunk/guiclient/yourpayprocessor.cpp

10/04/11 15:20ptyler

Confirmed in 3.8 beta demo db. Cash receipt transaction for TTOYS (using Authorize.net in Test Mode) for $31009.96 cleared the xTuple application okay, but got the following rounded amount in the subsequent Merchant Email Receipt:

========= ORDER INFORMATION =========
Invoice :
Description :
Amount : 31010.00 (USD)
Payment Method : Visa
Type : Authorization and Capture

============== RESULTS ==============
Response : This transaction has been approved.
Authorization Code : 000000
Transaction ID : 0
Address Verification : AVS Not Applicable

10/04/11 13:10paladinlogic

This is the same behavior we see when there is an MD5 check failure. The MD5 check fails and the amount charged via authorize.net is different from the amount of the sales order - it is rounded. We conjecture that the amount is used in creating the MD5 hash and rounding the value causes the hash to be different and hence the MD5 failure.

09/30/11 15:32ecologix_akelly

OK, here is further info to hopefully speed a fix to this. It appears that the cc process is somehow choking when amount is 10,000+. Please see attached screenshots. $31009.96 has both decimal places chopped off and becomes (rounded) to 31010. If you were to charge instead $3109.96 then there is no issues - 3109.96 (not rounded) is passed correctly to authnet. This would appear to be a pretty onerous issue, any chance of a patch to get this fixed before next major release, I can hear accounting's screams for my name/head on a platter every time this comes up.

09/30/11 15:18ecologix_akelly

New Cash Receipt. We only charge cc after invoice stage never at sales order stage. Although seems odd that the functionality would be different at sales order stage.

09/30/11 14:11ptyler

Where are you charging the credit card in xTuple when you see this? I charged a card in the Sales Order header, but did not get the message. Thanks.

09/13/11 14:31ecologix_akelly

When charging a credit card using Authorize.net xtuple sends the dollar amount and one decimal place only, omitting the second decimal place.

Steps to Reproduce:
Charge an amount of 31009.96 and xtuple will ask if you want to charge 31009.9



Characteristics

Backport
No
CodeReview
Needed
Operating System
Windows
Doc Flag
False
Copyright Assigned
Yes
HaxTuple
No
Points
None

Files

Filename
cc_charge_5_ok.jpg
cc_charge_6_bad.jpg


Related Documents

TypeNumberDescriptionRelationshipRemove
Incident1410R&M - Changing note on RMA failsRelated tox
Incident1411Compile error on windowsRelated tox
Incident15567*MD5 credit card issuesRelated tox
ProjectXTUPLEAPPSPorted From Mantisx


Subscribers

You do not have permission to view subscribers.


Incident History

DateUsernameFieldChange
10/04/11 15:20ptylerStatusStatus Changed: New -> Confirmed
10/04/11 18:47jrogelstadDescription Updated: "When charging a cred..." -> "When charging a cred..."
10/04/11 18:47jrogelstadPriorityPriority Changed: -> Very High
10/05/11 08:16gmoskowitzDescription Updated: "When charging a cred..." -> "When charging a cred..."
10/05/11 08:16gmoskowitzStatusStatus Changed: Confirmed -> Assigned
10/05/11 08:16gmoskowitzAssignedAssigned to: "" -> "gmoskowitz"
10/05/11 10:29gmoskowitzCharacteristic CodeReview Changed: "" -> "Needed"
10/05/11 10:29gmoskowitzStatusStatus Changed: Assigned -> Resolved
10/05/11 10:29gmoskowitzResolutionResolution Changed: -> Fixed
10/05/11 10:29gmoskowitzFixed In: -> 3.8.0
09/13/11 14:31ecologix_akellyNewIncident Added
09/13/11 14:31ecologix_akellyCharacteristic Backport Added: "No"
09/13/11 14:31ecologix_akellyCharacteristic CodeReview Added: ""
09/13/11 14:31ecologix_akellyCharacteristic Operating System Added: "Windows"
09/13/11 14:31ecologix_akellyCharacteristic haxTuple Added: "No"
09/13/11 14:31ecologix_akellyCharacteristic Estimated Hours Added: ""
09/13/11 14:31ecologix_akellyCharacteristic Doc Flag Added: "False"
09/13/11 14:31ecologix_akellyCharacteristic Copyright Assigned Added: "Yes"
09/13/11 14:31acdrupalFound In: -> 3.7.3
09/14/11 07:54gmoskowitzSeveritySeverity Changed: -> Severe
09/30/11 14:11ptylerStatusStatus Changed: New -> Feedback
09/30/11 16:26ptylerStatusStatus Changed: Feedback -> New
12/27/11 15:39ptylerStatusStatus Changed: Resolved -> Closed
11/16/12 10:44ptylerDescription Updated: "When charging a cred..." -> "When charging a cred..."