mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Fix redirect checkout (#502)
* Fix redirect checkout * Don't use checkout for saleor
This commit is contained in:
@@ -6,7 +6,7 @@ export type CheckoutAPI = GetAPISchema<CommerceAPI, CheckoutSchema>
|
||||
|
||||
export type CheckoutEndpoint = CheckoutAPI['endpoint']
|
||||
|
||||
const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({ req, res, config }) => {
|
||||
const getCheckout: CheckoutEndpoint['handlers']['getCheckout'] = async ({ req, res, config }) => {
|
||||
try {
|
||||
const html = `
|
||||
<!DOCTYPE html>
|
||||
@@ -43,7 +43,7 @@ const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({
|
||||
}
|
||||
}
|
||||
|
||||
export const handlers: CheckoutEndpoint['handlers'] = { submitCheckout }
|
||||
export const handlers: CheckoutEndpoint['handlers'] = { getCheckout }
|
||||
|
||||
const checkoutApi = createEndpoint<CheckoutAPI>({
|
||||
handler: checkoutEndpoint,
|
||||
|
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"provider": "saleor",
|
||||
"features": {
|
||||
"wishlist": false,
|
||||
"customCheckout": true
|
||||
"wishlist": false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user