ProcessPaymentRequest Order Subtotal

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi,

I created PayPal Payflow Pro payment processor plugin. I am using this method:

public ProcessPaymentResult ProcessRecurringPayment(ProcessPaymentRequest processPaymentRequest)

How do I get a list of coupon codes used with the purchase?
4 years ago
It's here,

var initialOrder = _orderService.GetOrderById(processPaymentRequest.InitialOrderId);
var discounts = initialOrder.DiscountUsageHistory.Select(o => o.Discount).ToList();
4 years ago
Hi,

I am using nopCommerce 4.2. The order has not been inserted yet, so our tool cannot look up discounts using that code. Is there another way? Tried this code, but I see no discounts:

            _orderTotalCalculationService.GetShoppingCartSubTotal(customer.ShoppingCartItems.ToList(), true, out _discountAmount, out _discounts, out _subTotalWithoutDiscount, out _subTotalWithDiscount, out _taxRates);

I see a subTotalWithDiscount and a subTotalWithoutDiscount field and they are correct.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.