You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2007/04/27 07:04:33 UTC

svn commit: r532964 - in /ofbiz/branches/release4.0/applications: accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java order/src/org/ofbiz/order/order/OrderReturnServices.java

Author: lektran
Date: Thu Apr 26 22:04:33 2007
New Revision: 532964

URL: http://svn.apache.org/viewvc?view=rev&rev=532964
Log:
Applied fix from trunk for revision: 532804

Modified:
    ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java

Modified: ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?view=diff&rev=532964&r1=532963&r2=532964
==============================================================================
--- ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/branches/release4.0/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Thu Apr 26 22:04:33 2007
@@ -2115,7 +2115,7 @@
                     result.put("paymentId", paymentId);
                     return result;
                 } else {
-                    return ServiceUtil.returnError("The refund failed");
+                    return ServiceUtil.returnFailure("The refund failed");
                 }
             } else {
                 return ServiceUtil.returnError("No refund service defined");

Modified: ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?view=diff&rev=532964&r1=532963&r2=532964
==============================================================================
--- ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/branches/release4.0/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Thu Apr 26 22:04:33 2007
@@ -938,8 +938,9 @@
                                 try {
                                     // for electronic types such as CREDIT_CARD and EFT_ACCOUNT, use refundPayment service
                                     serviceResult = dispatcher.runSync("refundPayment", UtilMisc.toMap("orderPaymentPreference", orderPaymentPreference, "refundAmount", new Double(amountToRefund.setScale(decimals, rounding).doubleValue()), "userLogin", userLogin));
-                                    if (ServiceUtil.isError(serviceResult)) {
-                                        return ServiceUtil.returnError("Error in refund payment", null, null, serviceResult);
+                                    if (ServiceUtil.isError(serviceResult) || ServiceUtil.isFailure(serviceResult)) {
+                                        Debug.logError("Error in refund payment: " + ServiceUtil.getErrorMessage(serviceResult), module);
+                                        continue;
                                     }
                                     paymentId = (String) serviceResult.get("paymentId");
                                 } catch (GenericServiceException e) {
@@ -950,8 +951,9 @@
                                 try {
                                     // for Billing Account refunds
                                     serviceResult = dispatcher.runSync("refundBillingAccountPayment", UtilMisc.toMap("orderPaymentPreference", orderPaymentPreference, "refundAmount", new Double(amountToRefund.setScale(decimals, rounding).doubleValue()), "userLogin", userLogin));
-                                    if (ServiceUtil.isError(serviceResult)) {
-                                        return ServiceUtil.returnError("Error in refund payment", null, null, serviceResult);
+                                    if (ServiceUtil.isError(serviceResult) || ServiceUtil.isFailure(serviceResult)) {
+                                        Debug.logError("Error in refund payment: " + ServiceUtil.getErrorMessage(serviceResult), module);
+                                        continue;
                                     }
                                     paymentId = (String) serviceResult.get("paymentId");
                                 } catch (GenericServiceException e) {