Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am having some difficulties understanding how/when entries are added to the sale history.
I have implemented a custom payment provider, and have a partial capture example where the checkout process authorizes an amount of 370 but only captures 200. Afterwards I capture the remaining amount using the "New Payment" button in the backend.
When the total amount is captured (it seems) the 'Sale history' section becomes visible, but only displays the following entries:
We successfully captured 170
We were authorized to capture 370
There is no entry for the initial partial capture of 200. The invoice rows "Total", "Collected" and "Balance due" are working perfectly though.
My PerformAuthorizeCapturePayment looks roughly like this:
protected override IPaymentResult PerformAuthorizeCapturePayment(IInvoice invoice, decimal amount, ProcessorArgumentCollection args)
var payment = GatewayProviderService.CreatePayment(PaymentMethodType.CreditCard, amount, PaymentMethod.Key);
payment.Collected = false;
payment.Authorized = true;
var captureResult = Helpers.Helpers.Payment.PerformCapturePayment(currencyInfo, amount, "", merchantNumber, paymentId , ""));
payment.Collected = captureResult.Success;
var result = payment.Collected
? new PaymentResult(Attempt<IPayment>.Succeed(payment), invoice, true)
: new PaymentResult(Attempt<IPayment>.Fail(new Exception(errorMessage)), invoice, false);
GatewayProviderService.ApplyPaymentToInvoice(payment.Key, invoice.Key, AppliedPaymentType.Denied, result.Payment.Exception.Message, 0);
GatewayProviderService.ApplyPaymentToInvoice(payment.Key, invoice.Key, AppliedPaymentType.Debit, "Payment authorized and captured", amount);
Can someone tell me what I am missing?
Update: The payments tab correctly displays the initial capture of 200
...but the sale tab is still not correct
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted