mollie / Shopware6

47 stars 52 forks source link

Cancel payment leads to PaymentException #807

Closed jackyraimond closed 2 weeks ago

jackyraimond commented 4 weeks ago

If I'm cancelling an payment I'm redirected to the webshop again and I can see an error 500 message:

{
  "errors": [
    {
      "code": "0",
      "status": "500",
      "title": "Internal Server Error",
      "detail": "Undefined constant Shopware\\Core\\Checkout\\Payment\\PaymentException::PAYMENT_CUSTOMER_CANCELED_EXTERNAL"
    }
  ]
}
BlackScorp commented 3 weeks ago

Hello Thx for pointing that out. We already addressed this issue and it will be fixed in upcoming release.

The problem here is within our polyfill classes. in order to ensure that the plugin is working on different shopware versions, we created polyfill classes which comes in place if a current shopware version does not provide it.

the autoloading process in PHP however finds sometimes our polyfill class instead of the original shopware class and then a wrong class is included int he code.

i fixed this with this commit. https://github.com/mollie/Shopware6/commit/8b3253b99887ee50464051d6e9675cc773c3a9b5. maybe you can apply it to your code base until the new version is released so you dont have the error in the meantime

BlackScorp commented 2 weeks ago

@jackyraimond just released new version, should be fixed now

jackyraimond commented 2 weeks ago

Thanks, will test it!