diff --git a/components/PayBlock.vue b/components/PayBlock.vue index 4cc12a9..d262b82 100644 --- a/components/PayBlock.vue +++ b/components/PayBlock.vue @@ -80,7 +80,7 @@ const createOrder = async () => { typeRid: 'Purchase', amount: cartSum, currency: 'RUB', - hppRedirectUrl: `${import.meta.env.VITE_BASE_URL}/cart`, + hppRedirectUrl: `${process.env.VITE_BASE_URL}/cart`, }, }, }) diff --git a/nuxt.config.ts b/nuxt.config.ts index 8379d3f..6a63af7 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -22,7 +22,7 @@ export default defineNuxtConfig({ 'vue-yandex-maps/nuxt', ], yandexMaps: { - apikey: import.meta.env.VITE_YANDEX_MAPS_TOKEN, + apikey: process.env.VITE_YANDEX_MAPS_TOKEN, }, css: ['~/assets/css/main.css', '~/assets/scss/main.scss'], i18n: { diff --git a/server/api/bsbp_create.ts b/server/api/bsbp_create.ts index db6d8fd..a3da762 100644 --- a/server/api/bsbp_create.ts +++ b/server/api/bsbp_create.ts @@ -4,9 +4,9 @@ import axios from 'axios' import { defineEventHandler, readBody } from 'h3' export default defineEventHandler(async (event): Promise => { - const merchantId = import.meta.env.BSPB_MERCHANT_ID! - const merchantPassword = import.meta.env.BSPB_MERCHANT_PASSWORD! - const apiUrl = import.meta.env.BSPB_API_URL! + const merchantId = process.env.BSPB_MERCHANT_ID! + const merchantPassword = process.env.BSPB_MERCHANT_PASSWORD! + const apiUrl = process.env.BSPB_API_URL! const assetsStorage = useStorage('assets:server') const bspbKey = await assetsStorage.getItem('pgtest_key.key') diff --git a/server/api/yandex_location_detect.ts b/server/api/yandex_location_detect.ts index 19f8e51..16a25c0 100644 --- a/server/api/yandex_location_detect.ts +++ b/server/api/yandex_location_detect.ts @@ -5,8 +5,8 @@ import { defineEventHandler, readBody } from 'h3' export default defineEventHandler(async (event): Promise => { try { const data = await readBody(event) - const apiUrl = import.meta.env.VITE_YANDEX_B2B_BASE_URL! - const token = import.meta.env.VITE_YANDEX_B2B_TOKEN! + const apiUrl = process.env.VITE_YANDEX_B2B_BASE_URL! + const token = process.env.VITE_YANDEX_B2B_TOKEN! const response = await axios.post( `${apiUrl}/location/detect`, diff --git a/server/api/yandex_pvz.ts b/server/api/yandex_pvz.ts index ef7985c..6cf910e 100644 --- a/server/api/yandex_pvz.ts +++ b/server/api/yandex_pvz.ts @@ -5,8 +5,8 @@ import { defineEventHandler, readBody } from 'h3' export default defineEventHandler(async (event): Promise => { try { const data = await readBody(event) - const apiUrl = import.meta.env.VITE_YANDEX_B2B_BASE_URL! - const token = import.meta.env.VITE_YANDEX_B2B_TOKEN! + const apiUrl = process.env.VITE_YANDEX_B2B_BASE_URL! + const token = process.env.VITE_YANDEX_B2B_TOKEN! const response = await axios.post( `${apiUrl}/pickup-points/list`,