Im guessing something like this might just do it.....
var order = TC.GetOrder(1, new Guid("f58bb604-db18-43eb-8222-d014b3be94e9"));
var gateway = new TeaCommerce.PaymentProviders.Classic.SagePay();
if (gateway.SupportsRefundOfPayment)
{
gateway.RefundPayment(order, gateway.DefaultSettings);
}
You should use the PaymentMethodService.Instance.Get to get the payment method. Then has a using TeaCommerce.Api.Web.PaymentProviders and then you can do paymentMethod.RefundPayment( order );
Programmatically Refund Order Amount
I'm using Sage Pay Gateway.
Is it possible to programmatically carry out an Order Refund, without having to log into the TeaCommerce backoffice.
I'm hoping I can just pass a transaction ID to a TC refund method.
Im guessing something like this might just do it.....
You should use the PaymentMethodService.Instance.Get to get the payment method. Then has a using TeaCommerce.Api.Web.PaymentProviders and then you can do paymentMethod.RefundPayment( order );
Kind regards
Anders
Woo! worked - thanks Anders
is working on a reply...