@Test public void testCaptureSendRequest() throws WirecardPaymenException { when(paymentMethod.getName()).thenReturn(PaymentMethodName.PAYPAL); Payment response = defaultWirecardPayPalService.sendRequest(payment, CAPTURE_URL, wirecardPaymentMethodConfiguration); assertNotNull(RESPONSE_NULL, response); assertEquals(RESPONSE_EQUALS, this.payment, response); }
@Override public Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel) throws WirecardPaymenException { String xmlRequest = getPaymentConverter().convertDataToXML(payment); String xmlResponse = getResponse(configureHttpRequest(xmlRequest, url, wirecardAuthenticationModel)); Payment paymentResponse = getPaymentConverter().convertXMLToData(xmlResponse); checkFingerprint(payment, paymentResponse); return paymentResponse; }
DefaultWirecardPaymentCommandService implements PaymentCommandService { @Override public Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel) throws WirecardPaymenException { String xmlRequest = getPaymentConverter().convertDataToXML(payment); String xmlResponse = getResponse(configureHttpRequest(xmlRequest, url, wirecardAuthenticationModel)); Payment paymentResponse = getPaymentConverter().convertXMLToData(xmlResponse); checkFingerprint(payment, paymentResponse); return paymentResponse; } }
DefaultWirecardPaymentCommandService implements PaymentCommandService { @Override public Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel) throws WirecardPaymenException { String xmlRequest = getPaymentConverter().convertDataToXML(payment); String xmlResponse = getResponse(configureHttpRequest(xmlRequest, url, wirecardAuthenticationModel)); Payment paymentResponse = getPaymentConverter().convertXMLToData(xmlResponse); checkFingerprint(payment, paymentResponse); return paymentResponse; }  }
DefaultWirecardPaymentCommandService implements PaymentCommandService { @Override public Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel) throws WirecardPaymenException { String xmlRequest = getPaymentConverter().convertDataToXML(payment); String xmlResponse = getResponse(configureHttpRequest(xmlRequest, url, wirecardAuthenticationModel)); Payment paymentResponse = getPaymentConverter().convertXMLToData(xmlResponse); checkFingerprint(payment, paymentResponse); return paymentResponse; }  @Override Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Override int sendTestAuthenticationRequest(String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Override String sendSearchRequest(String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Required void setBasicResponseHandler(BasicResponseHandler basicResponseHandler); @Required void setPaymentConverter(PaymentConverter paymentConverter); }
DefaultWirecardPaymentCommandService implements PaymentCommandService { @Override public Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel) throws WirecardPaymenException { String xmlRequest = getPaymentConverter().convertDataToXML(payment); String xmlResponse = getResponse(configureHttpRequest(xmlRequest, url, wirecardAuthenticationModel)); Payment paymentResponse = getPaymentConverter().convertXMLToData(xmlResponse); checkFingerprint(payment, paymentResponse); return paymentResponse; }  @Override Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Override int sendTestAuthenticationRequest(String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Override String sendSearchRequest(String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Required void setBasicResponseHandler(BasicResponseHandler basicResponseHandler); @Required void setPaymentConverter(PaymentConverter paymentConverter);  }