fix: Add SALEOR_API_TOKEN auth for COD transaction creation

- Add SALEOR_API_TOKEN environment variable support
- Update Apollo client to include auth header
- Enable COD transaction creation after checkout
This commit is contained in:
Unchained
2026-03-29 18:22:16 +02:00
parent 5f9b7bac3a
commit e15e6470d2
7 changed files with 921 additions and 173 deletions

View File

@@ -75,6 +75,7 @@ interface SaleorCheckoutStore {
openCart: () => void;
closeCart: () => void;
clearError: () => void;
clearCheckout: () => void;
// Getters
getLineCount: () => number;
@@ -299,6 +300,7 @@ export const useSaleorCheckoutStore = create<SaleorCheckoutStore>()(
closeCart: () => set({ isOpen: false }),
clearError: () => set({ error: null }),
setLanguageCode: (languageCode: string) => set({ languageCode }),
clearCheckout: () => set({ checkout: null, checkoutToken: null }),
getLineCount: () => {
const { checkout } = get();