#{{ product(item, '#') }}
\r\n#{{ product(item, \"#\") }}
\r\nThis order is a gift
\r\n\r\n{{ orderBuilder.gift_to.gift_message }}
\r\n\r\n{{ orderBuilder.gift_to.gift_from_name }}
\r\n\r\n Change
\r\n\r\n {{ orderBuilder.gift_to.gift_name }}\r\n
\r\n\r\n {{ orderBuilder.gift_to.gift_street1 }}, {{ orderBuilder.gift_to.gift_street2 }}\r\n
\r\n\r\n {{ orderBuilder.gift_to.gift_city }}, {{ abbr }}\r\n {{ orderBuilder.gift_to.gift_postal_code }}\r\n\r\n
\r\nThank you for your order!
\r\nYour order is being processed. Refreshing this page or navigating away from this page before the order is processed may result in multiple orders being placed.
\r\n `,\r\n remainingTime: canSendObj.remainingTime\r\n }, {root: true});\r\n}\r\n\r\n// Function to create the data payload for the API call\r\nfunction _processPaymentCreateDataPayload(state, orderBuilder, customerInfo, event_id, systemId) {\r\n orderBuilder.transaction_id = state.processingOrderInfo.transaction_id\r\n return {\r\n url: \"/api/v4/checkout/process-payment\",\r\n namespace: \"orderInfo/checkout/processPaymentAndPostOrder\",\r\n orderBuilder: orderBuilder,\r\n customer_data: customerInfo,\r\n hasScentFlirt: state.subsInOrder,\r\n event_id,\r\n external_id: systemId,\r\n };\r\n}\r\n\r\n// Function to handle the API response and update the state accordingly\r\nasync function _processPaymentHandleProcessPaymentApiResponse(ctx, response, event_id) {\r\n // response = {\"body\":{\"data\":{\"OrderID\":1231231231231232,\"sfOrderID\":0},\"message\":\"0\",\"paymentMethod\":\"CC\",\"status\":200,\"success\":\"True\"}}\r\n const {commit, dispatch} = ctx;\r\n const customerInfo = JSON.parse(localStorage.getItem(\"user\"))\r\n // Handle BOV products in the response if present\r\n const bov = response?.body?.BOV_products;\r\n if (bov?.length) {\r\n await commit(\"removeBovProducts\", bov);\r\n await dispatch(\"loadTotals\", customerInfo?.ShipCountryProvinceId);\r\n await commit(\"updateCartItems\");\r\n return;\r\n }\r\n const OrderState = response?.body?.OrderState;\r\n if (OrderState === \"Processing\") {\r\n await _processPaymentDisplayLoaderMessage(ctx);\r\n commit(\"alertInfo/alert/updDataLoaderIsLoading\", true, {root: true});\r\n return\r\n }\r\n // Handle the order ID in the response and complete the order if present\r\n const OrderID = response?.body?.data?.OrderID;\r\n if (OrderID) {\r\n commit(\"orderCompleted\", {\r\n orderResponse: response,\r\n customer_data: customerInfo,\r\n event_id, // FB events from pixel\r\n });\r\n }\r\n const outOfStockDict = response?.body?.oosItems;\r\n if (outOfStockDict) {\r\n let outOfStock = Object.entries(response.body.oosItems)\r\n .map(([, value]) => `• ${value}`)\r\n .join('\r\n \r\n \r\n {{\r\n cartItems.filter(\r\n (item) => !item.itemDescription.includes(\"ScentFlirt\")\r\n ).length > 0\r\n ? dateFormatter(\r\n utils.addBusinessDays((d = new Date()), 1).toDateString(),\r\n \"s\"\r\n )\r\n : \"\"\r\n }}\r\n
!item.itemDescription.includes('ScentFlirt')\r\n ).length > 0 &&\r\n cartItems.filter((item) =>\r\n item.itemDescription.includes('ScentFlirt')\r\n ).length > 0\r\n \"\r\n />\r\n {{\r\n cartItems.filter((item) =>\r\n item.itemDescription.includes(\"ScentFlirt\")\r\n ).length > 0\r\n ? scentFlirtMessage\r\n : \"\"\r\n }}\r\n \r\n - \r\n
\r\n \r\n {{\r\n totals.subtotal ? totals.subtotal : \"-\"\r\n }}\r\n
\r\n\r\n \r\n {{ totals.taxes ? totals.taxes : \"-\" }}\r\n
\r\n\r\n \r\n {{\r\n totals.shipping ? totals.shipping : \"-\"\r\n }}\r\n
\r\n\r\n \r\n\r\n {{\r\n totals.handling ? totals.handling : \"-\"\r\n }}\r\n
\r\n\r\n \r\n {{\r\n totals.discount ? totals.discount : \"-\"\r\n }}\r\n
\r\n\r\n \r\n {{\r\n totals.total ? totals.total : \"-\"\r\n }}\r\n
\r\n\r\n SEND THIS GIFT SUBSCRIPTION TO\r\n
\r\n