[OFBiz] SVN: r6688 - trunk/applications/order/src/org/ofbiz/order/order
jaz@svn.ofbiz.org
jaz at svn.ofbiz.org
Mon Feb 6 07:50:09 CST 2006
Author: jaz
Date: 2006-02-06 07:50:07 -0600 (Mon, 06 Feb 2006)
New Revision: 6688
Modified:
trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
Log:
better error handling when refunds fail
Modified: trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
===================================================================
--- trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java 2006-02-06 10:37:11 UTC (rev 6687)
+++ trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java 2006-02-06 13:50:07 UTC (rev 6688)
@@ -760,6 +760,10 @@
// call the refund service to refund the payment
try {
Map serviceResult = dispatcher.runSync("refundPayment", UtilMisc.toMap("orderPaymentPreference", orderPayPref, "refundAmount", thisRefundAmount, "userLogin", userLogin));
+ if (ServiceUtil.isError(serviceResult)) {
+ return ServiceUtil.returnError(ServiceUtil.getErrorMessage(serviceResult));
+ }
+
paymentId = (String) serviceResult.get("paymentId");
} catch (GenericServiceException e) {
Debug.logError(e, "Problem running the refundPayment service", module);
More information about the Svn
mailing list