DefaultWorldpayB2BDirectOrderFacade extends DefaultWorldpayDirectOrderFacade implements WorldpayB2BDirectOrderFacade { @Override public DirectResponseData authorise3DSecureOnOrder(final String orderCode, final String paResponse, final WorldpayAdditionalInfoData worldpayAdditionalInfoData) throws WorldpayException, InvalidCartException { final OrderModel orderModel = b2BOrderService.getOrderForCode(orderCode); return internalAuthorise3DSecure(orderModel, paResponse, worldpayAdditionalInfoData); } DefaultWorldpayB2BDirectOrderFacade(final WorldpayAuthenticatedShopperIdStrategy worldpayAuthenticatedShopperIdStrategy, final WorldpayDirectOrderService worldpayDirectOrderService, final CartService cartService, final AcceleratorCheckoutFacade acceleratorCheckoutFacade, final WorldpayPaymentInfoService worldpayPaymentInfoService, final WorldpayMerchantConfigDataFacade worldpayMerchantConfigDataFacade, final CartFacade cartFacade, final B2BOrderService b2BOrderService); @Override DirectResponseData authoriseRecurringPayment(final String orderCode,
                                                        final WorldpayAdditionalInfoData worldpayAdditionalInfoData); @Override DirectResponseData authorise3DSecureOnOrder(final String orderCode,
                                                       final String paResponse,
                                                       final WorldpayAdditionalInfoData worldpayAdditionalInfoData);  }
@Test public void authorise3DSecureOnOrderShouldAuthoriseOrderForCode() throws WorldpayException, InvalidCartException { final DirectResponseData result = testObj.authorise3DSecureOnOrder(ORDER_CODE, PA_RESPONSE, worldpayAdditionalInfoDataMock); verify(worldpayDirectOrderServiceMock).authorise3DSecure(WORLDPAY_ORDER_CODE, worldpayAdditionalInfoDataMock, PA_RESPONSE); assertEquals(TransactionStatus.AUTHORISED, result.getTransactionStatus()); }