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
This commit is contained in:
Jacopo Cappellato
2007-06-02 08:40:30 +00:00
parent cdfa5c23fc
commit 672f8d0a37
@@ -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) {