Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Release Branch 10.04
-
None
Description
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):
@@ -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) {