Closed bramstroker closed 3 years ago
Nevermind, this is not an issue.
The graphQL schema doc "The hash added to your custom URL" brought me on the right track.
We need to pass the order_hash
in the returnURL, not the payment token.
This is not clear in the docs/wiki. In the example <payment_token>
is listed, so maybe the docs need a little tweaking.
Describe the bug Our client is trying to use the
mollieCustomerOrder
query as indicated in your docs. However this is resulting in aNoSuchEntityException
thrown from theOrderRepository
.Used versions
To Reproduce Steps to reproduce the behavior:
Expected behavior The order is returned
Actual behavior An "Internal server error" message is returned
Additional context I did some digging around and found the following; The
PaymentToken
resolver which is used during the place order mutation is responsible for generating the payment token. When I look at the algorithm used I see the following:$this->mathRandom->getUniqueHash()
.Next I did have a look at the
MollieCustomerOrder
resolver. There I see the following code to get from the payment token to an order:This is a 2 way encryption, but when generating the payment token a one way hash is generated which is not decryptable in anyway imho.
Imo the following code should be used to retrieve the order by the payment token, which is also used by the
CreateMollieTransaction
mutation:When my findings are correct I'm curious how this could have worked previously.