Skip to content

Commit

Permalink
clients: Fix Checkout Link state issue with success_url
Browse files Browse the repository at this point in the history
  • Loading branch information
birkjernstrom committed Feb 1, 2025
1 parent 72fc097 commit a9c4d3f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const CheckoutLinkForm = ({
product_id: product.id,
product_price_id: checkoutLink.product_price_id ?? undefined,
allow_discount_codes: checkoutLink.allow_discount_codes ?? true,
success_url: checkoutLink.success_url ?? undefined,
success_url: checkoutLink.success_url ?? '',
discount_id: checkoutLink.discount_id ?? '',
}
}
Expand All @@ -86,6 +86,7 @@ export const CheckoutLinkForm = ({
product_id: product.id,
product_price_id: undefined,
allow_discount_codes: true,
success_url: '',
discount_id: '',
}
}
Expand Down Expand Up @@ -150,6 +151,9 @@ export const CheckoutLinkForm = ({
if (params.discount_id === '') {
params.discount_id = null
}
if (params.success_url === '') {
params.success_url = null
}
const body: CheckoutLinkCreate = {
payment_processor: 'stripe',
...params,
Expand Down

0 comments on commit a9c4d3f

Please sign in to comment.