I have added a new PaymentGroup
for our Ecommerce site for store-points redemption based on the documentation.
After submitting an order (store points + cash), I could see that the final amount of the store points PaymentGroups
is incorrect.
It seems the amount is a cumulative sum of the points amount of previous orders.
When debugging I saw following in PaymentGroupFormHandler.applyPaymentGroups()
method, List commerceIdentifierPaymentInfos = container.getAllCommerceIdentifierPaymentInfos();
This list contains the PaymentInfo
of the previous order as well. So, the pgm.recalculatePaymentGroupAmounts(order)
gives a cumulative summation of previous points redemptions.
Still I couldn't find the root cause for this. Any help would be appreciated.