-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Bug]: Error on recreateOrder if one time token is used #103
Comments
Thanks a lot for reporting the issue. We did not consider the issue as "Priority" or "Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding. |
Hi @kingjia90 here is the Stacktrace: [2023-03-18T09:57:04.352301+01:00] app.ERROR: Pimcore\Bundle\EcommerceFrameworkBundle\Exception\VoucherServiceException: Token has already been used. in /home/.../www/vendor/pimcore/pimcore/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Pattern.php:140 Stack trace: Pimcore Demo definitely throws an Error with this steps: Configure Commercial voucher |
Confirming the problem. |
My thoughts on this: From that perspective, I think most reasonable fix for that would be to remove the voucher from the original order when recreating the order (and place the information in notes or version notes for traceability)? @kingjia90 WDYT? |
Fixed by #121 |
Expected behavior
order is recreated and containing the voucher token which is onetime use
Actual behavior
recreate order reapplies the voucher token to the new order without removing it for the source order and throws an error, that the voucher can not be used anymore
Steps to reproduce
add a onetime use voucher to the cart and start a payment
return and change cart so the order will be recreated
start payment again -> throws exception and the new order has not order items and no voucher
The text was updated successfully, but these errors were encountered: