What is the difference between priceToPay and grandTotal for TotalsTransfer

xartyomkax
xartyomkax Tech lead Unconfirmed Posts: 1 🧑🏻‍🚀 - Cadet
edited March 5 in Job Opportunities

Hello dear Spryker experts,

I have a question what is the difference between priceToPay and grandTotal for TotalsTransfer.

I can see in logic of \Spryker\Zed\SalesPayment\Business\Expander\SalesOrderExpander::calculatePriceToPay
that we calculating it as grandTotal - all availableAmounts from payments which has IsLimitedAmount == true

IMO priceToPay is something that we should have as total price to pay for every payment methods (since it located in totalTransfer)

I also saw that similar question was asked here but unfortunately I wasn't able to find an answer for my question.

Happy to hear you thoughts about that.

Tagged:

Answers

  • Salmanali Agharia
    Salmanali Agharia Posts: 14 🧑🏻‍🚀 - Cadet

    Hi @xartyomkax ,

    GrandTotals means the total order cost including item amount, all taxes, shipping, and discounts, whereas PriceToPay is the amount which the customer actually pays after deducting gift cards, store credits amounts etc from the GrandTotals.