Move hardcoded test values to env variables

This commit is contained in:
Chloe Herd 2026-01-07 11:17:14 -05:00
parent 3f9df4c331
commit 3d3d48a1ec
4 changed files with 7 additions and 3 deletions

View file

@ -13,6 +13,8 @@ const environmentVariables = {
['__VUE_APP_SAFELITE_HOP__']: "https://sv2-safelitehop-dev.safelite.com/fmgCheckoutShared.aspx", ['__VUE_APP_SAFELITE_HOP__']: "https://sv2-safelitehop-dev.safelite.com/fmgCheckoutShared.aspx",
['__VUE_APP_SESSION_TIMEOUT_MINUTES__']: 30, ['__VUE_APP_SESSION_TIMEOUT_MINUTES__']: 30,
['__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__']: "", ['__VUE_APP_SOLARWINDS_MONITORING_SCRIPT__']: "",
['__VUE_APP_ADYEN_ENVIRONMENT__']: "test",
['__VUE_APP_ADYEN_CLIENT_KEY__']: "test_WYGT4F5ZT5BRRL5MPWHK6QLYOIXZXROD",
}; };
const keysOnly = Object.keys(environmentVariables); const keysOnly = Object.keys(environmentVariables);

View file

@ -32,6 +32,8 @@ const applicationConfig = {
COOKIE_NAME_LENGTH_MAX_LIMIT: 44, COOKIE_NAME_LENGTH_MAX_LIMIT: 44,
SESSION_TIMEOUT_MINUTES: process.env.__VUE_APP_SESSION_TIMEOUT_MINUTES__, SESSION_TIMEOUT_MINUTES: process.env.__VUE_APP_SESSION_TIMEOUT_MINUTES__,
RETURN_USER_PAGE: "/fmg/return-user", RETURN_USER_PAGE: "/fmg/return-user",
ADYEN_CLIENT_KEY: process.env.__VUE_APP_ADYEN_CLIENT_KEY__,
ADYEN_ENVIRONMENT: process.env.__VUE_APP_ADYEN_ENVIRONMENT__,
}; };
export { applicationConfig }; export { applicationConfig };

View file

@ -4,6 +4,7 @@ import globalMethods from "@/global-methods";
import { endpoints } from "@/constants/endpoints"; import { endpoints } from "@/constants/endpoints";
import { AppointmentTypeStrings } from "@/constants/schedule-constants"; import { AppointmentTypeStrings } from "@/constants/schedule-constants";
import { paymentMethods } from "@/constants/payment-method-constants"; import { paymentMethods } from "@/constants/payment-method-constants";
import { applicationConfig } from "../constants/application-config";
export async function getNewSession(sessionConfig) {} export async function getNewSession(sessionConfig) {}
@ -42,8 +43,8 @@ export async function createAdyenCheckout({
id: id, id: id,
sessionData: sessionData, sessionData: sessionData,
}, },
clientKey: "test_WYGT4F5ZT5BRRL5MPWHK6QLYOIXZXROD", clientKey: applicationConfig.ADYEN_CLIENT_KEY,
environment: "test", environment: applicationConfig.ADYEN_ENVIRONMENT,
locale: "en_US", locale: "en_US",
countryCode: "US", countryCode: "US",
showPayButton: showPayButton, showPayButton: showPayButton,

View file

@ -281,7 +281,6 @@ export default {
value: this.adyenPriceTotal, value: this.adyenPriceTotal,
currency: "USD", currency: "USD",
}, },
environment: "test", // Change this to "live" when you're ready to accept live PayPal payments
countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production. countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production.
blockPayPalVenmoButton: true, blockPayPalVenmoButton: true,
blockPayPalPayLaterButton: true, blockPayPalPayLaterButton: true,