processCaptureResult error with billing account
----------------------------------------------- Key: OFBIZ-4185 URL: https://issues.apache.org/jira/browse/OFBIZ-4185 Project: OFBiz Issue Type: Bug Components: accounting Affects Versions: Release Branch 10.04 Reporter: Wickersheimer Jeremy Fix For: Release Branch 10.04 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)}}: {code} @@ -2032,8 +2032,11 @@ public class PaymentGatewayServices { result.put("serviceTypeEnum", authServiceType); ModelService model = dctx.getModelService("processCaptureResult"); Map<String, Object> context = model.makeValid(result, ModelService.IN_PARAM); + if (context.get("captureRefNum") == null) { + context.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) + } Map<String, Object> capRes; try { capRes = dispatcher.runSync("processCaptureResult", context); } catch (GenericServiceException e) { {code} -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4185. ---------------------------------- Resolution: Fixed Assignee: Jacques Le Roux Thanks Jeremy, Your "patch" is in trunk at r1165130 R11.04 r1165133 R10.04 r1165134 R9.04 r1165136 > processCaptureResult error with billing account > ----------------------------------------------- > > Key: OFBIZ-4185 > URL: https://issues.apache.org/jira/browse/OFBIZ-4185 > Project: OFBiz > Issue Type: Bug > Components: accounting > Affects Versions: Release Branch 10.04 > Reporter: Wickersheimer Jeremy > Assignee: Jacques Le Roux > Fix For: Release Branch 10.04 > > > 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)}}: > {code} > @@ -2032,8 +2032,11 @@ public class PaymentGatewayServices { > result.put("serviceTypeEnum", authServiceType); > > ModelService model = dctx.getModelService("processCaptureResult"); > Map<String, Object> context = model.makeValid(result, ModelService.IN_PARAM); > + if (context.get("captureRefNum") == null) { > + context.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) > + } > Map<String, Object> capRes; > try { > capRes = dispatcher.runSync("processCaptureResult", context); > } catch (GenericServiceException e) { > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |