package org.killbill.billing.payment.core.sm;
import org.killbill.automaton.OperationResult;
import org.killbill.billing.osgi.api.OSGIServiceRegistration;
import org.killbill.billing.payment.api.DirectPayment;
import org.killbill.billing.payment.api.PaymentApiException;
import org.killbill.billing.payment.core.DirectPaymentProcessor;
import org.killbill.billing.payment.dispatcher.PluginDispatcher;
import org.killbill.billing.retry.plugin.api.PaymentControlPluginApi;
import org.killbill.commons.locker.GlobalLocker;
public class RetryChargebackOperationCallback extends RetryOperationCallback {
public RetryChargebackOperationCallback(final GlobalLocker locker, final PluginDispatcher<OperationResult> paymentPluginDispatcher, final RetryableDirectPaymentStateContext directPaymentStateContext, final DirectPaymentProcessor directPaymentProcessor, final OSGIServiceRegistration<PaymentControlPluginApi> paymentControlPluginRegistry) {
super(locker, paymentPluginDispatcher, directPaymentStateContext, directPaymentProcessor, paymentControlPluginRegistry);
}
@Override
protected DirectPayment doCallSpecificOperationCallback() throws PaymentApiException {
return directPaymentProcessor.notifyChargeback(retryableDirectPaymentStateContext.isApiPayment(),
retryableDirectPaymentStateContext.getAccount(),
retryableDirectPaymentStateContext.getDirectPaymentId(),
null,
retryableDirectPaymentStateContext.getDirectPaymentTransactionExternalKey(),
retryableDirectPaymentStateContext.getAmount(),
retryableDirectPaymentStateContext.getCurrency(),
false,
retryableDirectPaymentStateContext.getCallContext(),
retryableDirectPaymentStateContext.getInternalCallContext());
}
}