Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4185

processCaptureResult error with billing account

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Release Branch 10.04
    • Release Branch 10.04
    • accounting
    • 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) {
      

      Attachments

        Activity

          People

            jleroux Jacques Le Roux
            jwickers Wickersheimer Jeremy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: