Skip to content

Conversation

@hdasdoria
Copy link

Q A
Branch? 1.4
Bug fix? yes
New feature? no
Related tickets /

Hi, there was an issue with the javascripts in the payWithPaypal template.

The window.location.reload() in error and cancel callbacks was executed instead of being passed as a callback in the fetch().then() function.

The page was reloading before the call was made and the payment was never cancelled, so the payment could not be processed again !

Had to override locally because half of our paypal orders fell in that and payment were never completed.

headers: {},
body: error
}).then(window.location.reload());
}).then(() => window.location.reload());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}).then(() => window.location.reload());
}).then(window.location.reload);

window.location.reload is a function
window.location.reload() is the function call

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants