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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user