- ๐ฎ๐ฑIsrael jsacksick
Now that โจ Add logging for payment failures during checkout Fixed is in... Let's work on logging payment failures.
Let's reboot the work here taking into account the comment from Ryan ( https://www.drupal.org/project/commerce/issues/2845321#comment-14446796 โจ Add payment logging to orders Fixed ) as a reference.
- First commit to issue fork.
- Merge request !151Issue #3112812: Add logging for payment failures during checkout โ (Merged) created by tbkot
- Status changed to Needs review
over 1 year ago 4:51pm 21 March 2023 - last update
over 1 year ago 782 pass 25:48 20:19 Running- last update
12 months ago 788 pass - Status changed to Needs work
12 months ago 8:22am 23 November 2023 - ๐ฎ๐ฑIsrael jsacksick
@tBKoT: This is a good start, but I believe we need to dispatch the event for manual gateways, and potentially for offsite gateways too? Also I noticed we only dispatch the event for decline exceptions. WHat about regular payment gateway exceptions?
Also, you should get the order from route match right before you need it, not straight from the constructor as this could cause issues.For exceptions throwns by form plugins, we should catch them from
PaymentGatewayForm::submitInlineForm()
. - last update
12 months ago 788 pass - last update
12 months ago 788 pass - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Hiding the files as we've got an MR.
- last update
12 months ago 788 pass - last update
12 months ago 788 pass - last update
12 months ago 788 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Discussed splitting this issue into 2 parts with @jsacksick - one issue to add the event and then another issue to concentrate on what data we add to commerce logging. This several benefits:
- We could get the non-controversial part in - any payment gateway exception will trigger an event.
- Contrib modules can use this event to record data in their own fashion
- We have an issue concentrating on what data weโre going to add to commerce_log. Getting this right is important because it would allow contrib modules to get historic data is commerce log was enabled before them.
- It would result in smaller MRs that are easier to review and rationalise about.
I propose we leave this issue to be about consuming the event and using commerce log and I'll open a new one to add the event. I will credit everyone here on that issue.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Opened โจ Add an event for payment failures during checkout Needs work
- last update
12 months ago 789 pass - last update
12 months ago 789 pass - Status changed to Needs review
12 months ago 1:09pm 1 December 2023 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
The event issue has merged - thanks @jsacksick. The MR now only contains the logging stuff.
- last update
12 months ago 789 pass - ๐ฎ๐ฑIsrael jsacksick
I gave the patch a manual test today, since the log template is also used for manual payments, the log template doesn't seem appropriate but at the same time, there's very little chance that payment gateway exceptions would be thrown from a manual gateway:
Here's the message I got:
Payment request failed at Manual for $10.60.
"Request" sounds like the API request itself failed... Perhaps we should say instead "Payment attempt failure"? Thoughts?
- ๐ฎ๐ฑIsrael jsacksick
I discussed this with @alexpott on Slack and we agreed on the following template:
<p>Payment failed via <em>{{ gateway }}</em> for {{ amount|commerce_price_format }}{% if method %} using <em>{{ method }}</em>{% endif %}.<br/>Message: {{ error_message }}.{% if remote_id %}<br /> Transaction ID: {{ remote_id }}.{% endif %}</p>
- last update
12 months ago 789 pass - last update
12 months ago 789 pass - last update
12 months ago 789 pass -
jsacksick โ
committed 9656d5f8 on 8.x-2.x authored by
tBKoT โ
Issue #3112812 by tBKoT, alexpott, jsacksick, lisastreeter, Jing Qian:...
-
jsacksick โ
committed 9656d5f8 on 8.x-2.x authored by
tBKoT โ
- Status changed to Fixed
12 months ago 12:59pm 6 December 2023 - ๐ฆ๐บAustralia Nigel Cunningham Geelong
@jacksick, do you have plans to do a release any time soon, please?
- ๐ฎ๐ฑIsrael jsacksick
@Nigel Cunningham: Yes, by the end of the year hopefully.
-
jsacksick โ
committed 5bfdd02a on 3.0.x authored by
tBKoT โ
Issue #3112812 by tBKoT, alexpott, jsacksick, lisastreeter, Jing Qian:...
-
jsacksick โ
committed 5bfdd02a on 3.0.x authored by
tBKoT โ
Automatically closed - issue fixed for 2 weeks with no activity.