File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function isProduction(env: string): boolean {
2020}
2121
2222export default async ( req : NextApiRequest , res : NextApiResponse ) => {
23- const { NODE_ENV , DOMAIN } = process . env
23+ const { NODE_ENV , DOMAIN , HOSTED } = process . env
2424 const accessToken = req . query . accessToken as string
2525 const orderId = req . query . orderId as string
2626 const domain = isProduction ( NODE_ENV )
@@ -54,10 +54,11 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
5454
5555 if (
5656 isProduction ( NODE_ENV ) &&
57+ ! ! HOSTED &&
5758 ( subdomain !== slug || kind !== "sales_channel" )
5859 ) {
5960 return invalidateCheckout ( )
60- } else if ( slug ) {
61+ } else if ( slug && kind === "sales_channel" ) {
6162 endpoint = `https://${ slug } .${ domain } `
6263 } else {
6364 return invalidateCheckout ( )
You can’t perform that action at this time.
0 commit comments