From 672f8d0a3773d223cc5ce4bfda05e023066b2cb8 Mon Sep 17 00:00:00 2001 From: Jacopo Cappellato Date: Sat, 2 Jun 2007 08:40:30 +0000 Subject: [PATCH] Added check to verify if the capturePayment method returned an error. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@543718 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/ofbiz/accounting/payment/PaymentGatewayServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java index cf8e3712f0..094f5fcc82 100644 --- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java +++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java @@ -1155,7 +1155,7 @@ public class PaymentGatewayServices { 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) {