OFBiz
  1. OFBiz
  2. OFBIZ-4185

processCaptureResult error with billing account

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Release Branch 10.04
    • Fix Version/s: Release Branch 10.04
    • Component/s: accounting
    • Labels:
      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) {
      

        Activity

        Wickersheimer Jeremy created issue -
        Hide
        Jacques Le Roux added a comment -

        Thanks Jeremy,

        Your "patch" is in
        trunk at r1165130
        R11.04 r1165133
        R10.04 r1165134
        R9.04 r1165136

        Show
        Jacques Le Roux added a comment - Thanks Jeremy, Your "patch" is in trunk at r1165130 R11.04 r1165133 R10.04 r1165134 R9.04 r1165136
        Jacques Le Roux made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Jacques Le Roux [ jacques.le.roux ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=OFBIZ-4185, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Failed to parse FishEye response: Error on line 13 of document : An invalid XML character (Unicode: 0x1a) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x1a) was found in the element content of the document.

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Wickersheimer Jeremy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development