Checkout
orderTotals - Retrieving pricing information
orderTotals - Retrieving pricing informationimport React from "react"
import { useCheckout } from "@limio/internal-checkout-sdk"
import { formatCurrencyForCurrentLocale } from "@limio/sdk"
const PricingSummary = () => {
const { useCheckoutSelector } = useCheckout({ redirectOnFailure: true })
const orderTotals = useCheckoutSelector((state) => state.display.orderTotal)
const { orderSubtotal, orderTotal, currency, taxSummary } = orderTotals
return (
<div>
<p>Subtotal: {formatCurrencyForCurrentLocale(orderSubtotal, currency)}</p>
<p>Total: {formatCurrencyForCurrentLocale(orderTotal, currency)}</p>
</div>
)
}usePreview - Managing tax calculation states
usePreview - Managing tax calculation statesLast updated
Was this helpful?

