Sylius / PayPalPlugin

Official integration with PayPal Commerce Platform
36 stars 54 forks source link

fix window reload on javascript payment callbacks #255

Open hdasdoria opened 2 years ago

hdasdoria commented 2 years ago
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.