Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payments after order submited no longer works #312

Open
mufi-siebird opened this issue Oct 12, 2024 · 2 comments
Open

Payments after order submited no longer works #312

mufi-siebird opened this issue Oct 12, 2024 · 2 comments

Comments

@mufi-siebird
Copy link

So Craft Commerce provides a feature where you can submit cart without payment and later ask for payment on completed order. that no longer works due to this JS change 5.0.4.2...5.0.4.3

As that added this JS code that has 2 issues:

if(json.redirect && json.cart.isCompleted === true) {
      window.location.href = json.redirect;
      return;
}
  1. json.cart is not a variable on order payment form. its json.order
  2. As isCompleted variable is true in that case, it goes to return and thus payment form does not appears.

Suggested solution:

if(json.redirect && typeof(json.cart) !== "undefined" && json.cart.isCompleted === true) {
      window.location.href = json.redirect;
      return;
}
Copy link

linear bot commented Oct 12, 2024

@KasimMahroof
Copy link

The company I work for has also ran into this issue on the 4.x branch.

Unfortunately, this has broken partial payments for our users, forcing us to downgrade.

It would be greatly appreciated if this could be addressed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants