Author: jacopoc
Date: Sat Jun 2 01:40:30 2007
New Revision: 543718
URL:
http://svn.apache.org/viewvc?view=rev&rev=543718Log:
Added check to verify if the capturePayment method returned an error.
Modified:
ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?view=diff&rev=543718&r1=543717&r2=543718==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Sat Jun 2 01:40:30 2007
@@ -1155,7 +1155,7 @@
Debug.logInfo("Payment preference = [" + paymentPref + "] amount to capture = [" + amountToCapture +"] amount of this capture = [" + amountThisCapture +"] actual auth amount =[" + authAmount + "] amountToBillAccount = [" + amountToBillAccount + "]", module);
Map captureResult = capturePayment(dctx, userLogin, orh, paymentPref, amountThisCapture.doubleValue());
- if (captureResult != null) {
+ if (captureResult != null && !ServiceUtil.isError(captureResult)) {
// credit card processors return captureAmount, but gift certificate processors return processAmount
Double amountCaptured = (Double) captureResult.get("captureAmount");
if (amountCaptured == null) {