Skip to content

Commit

Permalink
Change checkout url using the buy now mode
Browse files Browse the repository at this point in the history
  • Loading branch information
acasazza committed Aug 4, 2024
1 parent b1e3213 commit 6783da9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function CheckoutLink(props: Props): JSX.Element {
): void {
e.preventDefault()
e.stopPropagation()
console.log('e.currentTarget.href', e.currentTarget.href)
const currentHref = e.currentTarget.href
if (accessToken && endpoint && order?.id) {
void getOrganizationConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/src/reducers/OrderReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ export async function addToCart(
const params = `${id}?accessToken=${config.accessToken ?? ''}`
const redirectUrl = checkoutUrl
? `${checkoutUrl}/${params}`
: `https://${organization}.checkout.commercelayer.app/${params}`
: `https://${organization}.commercelayer.app/checkout/${params}`
location.href = redirectUrl
} else if (openMiniCart) {
publish('open-cart')
Expand Down

0 comments on commit 6783da9

Please sign in to comment.