Why not use ServiceUtil.returnFailure()?
Also, for failures and errors it is a good practice to include some
sort of message about why it failed or had an error...
-David
On Jul 5, 2008, at 5:30 AM, [EMAIL PROTECTED] wrote:
Author: jleroux
Date: Sat Jul 5 04:30:05 2008
New Revision: 674179
URL: http://svn.apache.org/viewvc?rev=674179&view=rev
Log:
Merged by hand from a Rashko Rejmer's patch
"capturePaymentsByInvoice service doesn't return not optional
parameter while processing multiple orders invoice" (https://issues.apache.org/jira/browse/OFBIZ-1221
) - -1221
This second commit contains only Rashko changes. My apologies for
useless changes before
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?rev=674179&r1=674178&r2=674179&view=diff
=
=
=
=
=
=
=
=
======================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/
payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/
payment/PaymentGatewayServices.java Sat Jul 5 04:30:05 2008
@@ -996,7 +996,9 @@
if (testOrderId == null || !allSameOrder) {
Debug.logWarning("Attempt to settle Invoice #" +
invoiceId + " which contained none/multiple orders", module);
- return ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
+ result.put("processResult", "FAILED");
+ return result;
}
// get the invoice amount (amount to bill)