WirecardResponseListener wirecardResponseListener = new WirecardResponseListener() {
@Override
public void onResponse(WirecardPaymentResponse paymentResponse) {
if (paymentResponse.getTransactionState().equals(TransactionState.SUCCESS)) {
} else {
}
}
@Override
public void onError(WirecardResponseError responseError) {
switch (responseError.getErrorCode()) {
case WirecardErrorCode.ERROR_CODE_GENERAL:
String detailedMessage = responseError.getErrorMessage();
break;
case WirecardErrorCode.ERROR_CODE_INVALID_PAYMENT_DATA:
break;
case WirecardErrorCode.ERROR_CODE_NETWORK_ISSUE:
break;
case WirecardErrorCode.ERROR_CODE_USER_CANCELED:
break;
}
}
};
```java
wirecardClient.makePayment(wirecardPayPalPayment, wirecardResponseListener, paymentPageStyle);