@Test public void testRequestPaymentSession() { when(validateMerchantRequestDataMock.getValidationURL()).thenReturn("http: when(worldpayApplePayPaymentCheckoutFacadeMock.getValidateMerchantRequestDTO()).thenReturn(validateMerchantRequestDTOMock); testObj.requestPaymentSession(validateMerchantRequestDataMock); verify(worldpayApplePayPaymentCheckoutFacadeMock).getValidateMerchantRequestDTO(); verify(restTemplateMock).postForObject(validateMerchantRequestDataMock.getValidationURL(), validateMerchantRequestDTOMock, Object.class); }
@RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody public Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData) { final ValidateMerchantRequestDTO requestDTO = worldpayApplePayPaymentCheckoutFacade.getValidateMerchantRequestDTO(); return restTemplate.postForObject(validateMerchantRequestData.getValidationURL(), requestDTO, Object.class); }
ApplePayController extends AbstractCheckoutController { @RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody public Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData) { final ValidateMerchantRequestDTO requestDTO = worldpayApplePayPaymentCheckoutFacade.getValidateMerchantRequestDTO(); return restTemplate.postForObject(validateMerchantRequestData.getValidationURL(), requestDTO, Object.class); } }
ApplePayController extends AbstractCheckoutController { @RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody public Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData) { final ValidateMerchantRequestDTO requestDTO = worldpayApplePayPaymentCheckoutFacade.getValidateMerchantRequestDTO(); return restTemplate.postForObject(validateMerchantRequestData.getValidationURL(), requestDTO, Object.class); }  }
ApplePayController extends AbstractCheckoutController { @RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody public Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData) { final ValidateMerchantRequestDTO requestDTO = worldpayApplePayPaymentCheckoutFacade.getValidateMerchantRequestDTO(); return restTemplate.postForObject(validateMerchantRequestData.getValidationURL(), requestDTO, Object.class); }  @RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData); @RequireHardLogIn @PostMapping(value = "/authorise-order", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody DirectResponseData authoriseOrder(@RequestBody final ApplePayAuthorisationRequest authorisationRequest); @RequireHardLogIn @PostMapping(value = "/update-payment-method", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody ApplePayOrderUpdate updatePaymentMethod(@RequestBody final ApplePayPaymentMethodUpdateRequest paymentMethodUpdateRequest); }
ApplePayController extends AbstractCheckoutController { @RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody public Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData) { final ValidateMerchantRequestDTO requestDTO = worldpayApplePayPaymentCheckoutFacade.getValidateMerchantRequestDTO(); return restTemplate.postForObject(validateMerchantRequestData.getValidationURL(), requestDTO, Object.class); }  @RequireHardLogIn @PostMapping(value = "/request-session", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody Object requestPaymentSession(@RequestBody final ValidateMerchantRequestData validateMerchantRequestData); @RequireHardLogIn @PostMapping(value = "/authorise-order", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody DirectResponseData authoriseOrder(@RequestBody final ApplePayAuthorisationRequest authorisationRequest); @RequireHardLogIn @PostMapping(value = "/update-payment-method", consumes = {MediaType.APPLICATION_JSON_VALUE}) @ResponseBody ApplePayOrderUpdate updatePaymentMethod(@RequestBody final ApplePayPaymentMethodUpdateRequest paymentMethodUpdateRequest);  }