Closed (fixed)
Project:
Commerce Datatrans
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2021 at 08:16 UTC
Updated:
29 Mar 2021 at 14:04 UTC
Jump to comment: Most recent
Comments
Comment #3
berdirPushed some improvements to the merge request. Any unexpected status will now result in an exception. I first tried to make an error that is specific to declined, but that is only inside the details and I'm not sure how reliable those are. It is also a bit unfortuante that commerce_payment will then log this as an (system) error, but it's just failed validation and is kind of an expected flow.
I also did some cleanup and minor improvement to onReturn(), so that we don't do an API request just to realize that we already have a payment, so checking that first. In this case, that would explicitly not happen as the webhook will not create a payment and we have to check again. I'm not sure if it would be better to persist it as a failed payment, that would also give us a way to store the relevant information if a customer calls support and asks why they can't pay.
Comment #5
berdirFurther improvements can happen later, also got confirmation from a client that this works. Merging.
Comment #6
berdir