code: @Override
      @RequestMapping(value = "/return", method = RequestMethod.GET)
      public String returnEndpoint(Model model, HttpServletRequest request,
                                   final RedirectAttributes redirectAttributes,
                                   @PathVariable Map<String, String> pathVars) throws PaymentException {
          if (request.getParameter(MessageConstants.CHECKOUT_COMPLETE) != null) {
              request.setAttribute(MessageConstants.CHECKOUT_COMPLETE, true);
          }
          String path = super.process(model, request, redirectAttributes);
          if (isAjaxRequest(request) && StringUtils.startsWith(path, baseRedirect)) {
              return StringUtils.replace(path, baseRedirect, "ajaxredirect:");
          }
          return path;
      }
docs: ***********************************************