Go to file
Vality Bot 090bba7c1a
🔄 Synced file(s) with valitydev/configurations (#12)
* 🔄 Created local '.github/workflows/basic-linters.yml' from remote 'workflows/base/basic-linters.yml'

* 🔄 Synced local 'LICENSE' with remote 'LICENSE'

* 🔄 Created local '.github/settings.yml' from remote '.github/settings.yml'

* 🔄 Created local 'CODEOWNERS' from remote 'codeowners/java'
2022-05-12 15:13:23 +07:00
.github 🔄 Synced file(s) with valitydev/configurations (#12) 2022-05-12 15:13:23 +07:00
src TD-45: to dev.vality (#2) 2022-01-27 08:13:56 -08:00
.gitignore Lib for OCT(payout) adapter spring (#1) 2019-06-04 11:50:48 +03:00
CODEOWNERS 🔄 Synced file(s) with valitydev/configurations (#12) 2022-05-12 15:13:23 +07:00
LICENSE 🔄 Synced file(s) with valitydev/configurations (#12) 2022-05-12 15:13:23 +07:00
pom.xml TD-45: to dev.vality (#2) 2022-01-27 08:13:56 -08:00
README.md Lib for OCT(payout) adapter spring (#1) 2019-06-04 11:50:48 +03:00
renovate.json Update renovate config 2022-02-21 13:50:59 +03:00

adapter-bank-payout-spring-boot-starter

For new payout:

  1. implement RemoteClient

  2. implement ResultProcessor and config ChainProcessor:

    @Bean
    @Autowired
    public ResultProcessor<Response, ProcessResult> responseProcessorChain(ErrorMapping errorMapping) {
        SuccessProcessor successProcessor = new SuccessProcessor(null);
        return new ErrorProcessor(errorMapping, successProcessor);
    }
    
  3. implement WithdrawalConverter

  4. implement GenericServlet for woody:

    @WebServlet("/adapter/{app-path}/payout")
    public class PayoutServlet extends GenericServlet {
    
        @Autowired
        private AdapterSrv.Iface payoutAdapterServiceLogDecorator;
    
        private Servlet servlet;
    
        @Override
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
            servlet = new THServiceBuilder().build(AdapterSrv.Iface.class, payoutAdapterServiceLogDecorator);
        }
    
        @Override
        public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
            servlet.service(request, response);
        }
    
    }