Author: jleroux
Date: Sun Sep 4 23:07:17 2011
New Revision: 1165130
URL: http://svn.apache.org/viewvc?rev=1165130&view=rev
Log:
A "patch" from Wickersheimer Jeremy
https://issues.apache.org/jira/browse/OFBIZ-4185 "processCaptureResult error
with billing account"
When using a billing account the processCaptureResult will fail with a missing
captureRefNum parameter.
There is a hack that sets it to an empty string but i guess a change occurred
and calling makeValid will convert that empty string to null making the service
call fail.
The fix is simply a matter of copying the workaround in private static void
processCaptureResult(DispatchContext dctx, Map<String, Object> result,
GenericValue userLogin, GenericValue paymentPreference, String authServiceType):
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=1165130&r1=1165129&r2=1165130&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
Sun Sep 4 23:07:17 2011
@@ -1279,7 +1279,9 @@ public class PaymentGatewayServices {
captureResult.put("invoiceId", invoiceId);
captureResult.put("captureResult", Boolean.TRUE);
captureResult.put("orderPaymentPreference",
paymentPref);
- captureResult.put("captureRefNum", ""); // FIXME: this
is an hack to avoid a service validation error for processCaptureResult
(captureRefNum is mandatory, but it is not used for billing accounts)
+ if (context.get("captureRefNum") == null) {
+ captureResult.put("captureRefNum", ""); // FIXME:
this is an hack to avoid a service validation error for processCaptureResult
(captureRefNum is mandatory, but it is not used for billing accounts)
+ }
// process the capture's results
try {