Fix redirect checkout (#502)

* Fix redirect checkout

* Don't use checkout for saleor
This commit is contained in:
Gonzalo Pozzo
2021-09-24 13:42:09 -03:00
committed by GitHub
parent c440ff06d4
commit 8e7b942240
11 changed files with 21 additions and 22 deletions

View File

@@ -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,

View File

@@ -1,7 +1,6 @@
{
"provider": "saleor",
"features": {
"wishlist": false,
"customCheckout": true
"wishlist": false
}
}