This commit is contained in:
parent
3d6a71f8e6
commit
c06d1d336d
@ -80,7 +80,7 @@ const createOrder = async () => {
|
|||||||
typeRid: 'Purchase',
|
typeRid: 'Purchase',
|
||||||
amount: cartSum,
|
amount: cartSum,
|
||||||
currency: 'RUB',
|
currency: 'RUB',
|
||||||
hppRedirectUrl: `${import.meta.env.VITE_BASE_URL}/cart`,
|
hppRedirectUrl: `${process.env.VITE_BASE_URL}/cart`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export default defineNuxtConfig({
|
|||||||
'vue-yandex-maps/nuxt',
|
'vue-yandex-maps/nuxt',
|
||||||
],
|
],
|
||||||
yandexMaps: {
|
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'],
|
css: ['~/assets/css/main.css', '~/assets/scss/main.scss'],
|
||||||
i18n: {
|
i18n: {
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import axios from 'axios'
|
|||||||
import { defineEventHandler, readBody } from 'h3'
|
import { defineEventHandler, readBody } from 'h3'
|
||||||
|
|
||||||
export default defineEventHandler(async (event): Promise<BsbpCreateResponse | { error: string }> => {
|
export default defineEventHandler(async (event): Promise<BsbpCreateResponse | { error: string }> => {
|
||||||
const merchantId = import.meta.env.BSPB_MERCHANT_ID!
|
const merchantId = process.env.BSPB_MERCHANT_ID!
|
||||||
const merchantPassword = import.meta.env.BSPB_MERCHANT_PASSWORD!
|
const merchantPassword = process.env.BSPB_MERCHANT_PASSWORD!
|
||||||
const apiUrl = import.meta.env.BSPB_API_URL!
|
const apiUrl = process.env.BSPB_API_URL!
|
||||||
|
|
||||||
const assetsStorage = useStorage('assets:server')
|
const assetsStorage = useStorage('assets:server')
|
||||||
const bspbKey = await assetsStorage.getItem<string>('pgtest_key.key')
|
const bspbKey = await assetsStorage.getItem<string>('pgtest_key.key')
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import { defineEventHandler, readBody } from 'h3'
|
|||||||
export default defineEventHandler(async (event): Promise<YandexLocationDetectResponse | { error: string }> => {
|
export default defineEventHandler(async (event): Promise<YandexLocationDetectResponse | { error: string }> => {
|
||||||
try {
|
try {
|
||||||
const data = await readBody<YandexLocationDetectRequest>(event)
|
const data = await readBody<YandexLocationDetectRequest>(event)
|
||||||
const apiUrl = import.meta.env.VITE_YANDEX_B2B_BASE_URL!
|
const apiUrl = process.env.VITE_YANDEX_B2B_BASE_URL!
|
||||||
const token = import.meta.env.VITE_YANDEX_B2B_TOKEN!
|
const token = process.env.VITE_YANDEX_B2B_TOKEN!
|
||||||
|
|
||||||
const response = await axios.post<YandexLocationDetectResponse>(
|
const response = await axios.post<YandexLocationDetectResponse>(
|
||||||
`${apiUrl}/location/detect`,
|
`${apiUrl}/location/detect`,
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import { defineEventHandler, readBody } from 'h3'
|
|||||||
export default defineEventHandler(async (event): Promise<YandexPvzResponse | { error: string }> => {
|
export default defineEventHandler(async (event): Promise<YandexPvzResponse | { error: string }> => {
|
||||||
try {
|
try {
|
||||||
const data = await readBody<YandexPvzRequest>(event)
|
const data = await readBody<YandexPvzRequest>(event)
|
||||||
const apiUrl = import.meta.env.VITE_YANDEX_B2B_BASE_URL!
|
const apiUrl = process.env.VITE_YANDEX_B2B_BASE_URL!
|
||||||
const token = import.meta.env.VITE_YANDEX_B2B_TOKEN!
|
const token = process.env.VITE_YANDEX_B2B_TOKEN!
|
||||||
|
|
||||||
const response = await axios.post<YandexPvzResponse>(
|
const response = await axios.post<YandexPvzResponse>(
|
||||||
`${apiUrl}/pickup-points/list`,
|
`${apiUrl}/pickup-points/list`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user