Menu

#6 Payment Quantity does not calculate price correctly.

open
nobody
None
5
2012-02-06
2012-02-06
datrucka
No

Payment doesn\'t calculate the price correctly if quantity set. To fix in Payment.java in getNVPRequest():
if (entry.getKey().equals(\"L_AMT\")) {
int currentItemAmount = Integer.parseInt(entry.getValue().replace(\".\", \"\"));

String quantityString = items.get(i).get(\"L_QTY\");

if(quantityString != null && quantityString.trim().length() > 0){
int quantity = Integer.parseInt(quantityString);
currentItemAmount = currentItemAmount * quantity;
}
/*
remove decimal point and parse to int
*/
itemAmt += currentItemAmount;
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB