Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently in uc_recurring_authorizenet_cim_renew(), if the charge fails, the error message ($result['comment']) is thrown out and not logged anywhere. If the renewal fails due to having no reference on the order, there is no error message.
This patch adds a couple of calls to uc_order_comment_save() to assist debugging/customer support.
Comment | File | Size | Author |
---|---|---|---|
#5 | uc_recurring-cim-log-error-691884-5.patch | 1.43 KB | tinker |
#4 | uc_recurring-n691884-4.patch | 785 bytes | DamienMcKenna |
#3 | uc_recurring.uc_authorizenet.inc-691884-3.patch | 584 bytes | RSTaylor |
#1 | uc_authorizenet.inc_.error_message-2.patch | 972 bytes | RSTaylor |
Comments
Comment #1
RSTaylor CreditAttribution: RSTaylor commentedrepatch, may as well log success message too.
Comment #2
univate CreditAttribution: univate commentedWhy the difference between the use of $user->uid / $result['uid'] and $result['message'] / $result['comment']?
Powered by Dreditor.
Comment #3
RSTaylor CreditAttribution: RSTaylor commentedAfter looking at it more closely, on success the uc_authorizenet module does actually log a comment in _uc_authorizenet_cim_profile_charge(), it's just on failure that it doesn't, returning the comment instead (in both 'comment' and 'message').
So in this, $user->uid should only be needed for the case where no reference is found and the function call is skipped.
Comment #4
DamienMcKennaRerolled.
Comment #5
tinker CreditAttribution: tinker commentedVerified the patch in #4 works great but univate's point from #2 is valid. The order comment's user is the person (or process) that enters the comment. It is not the customer's uid. So in this case it should be global user which will show that it was an automated process that created the comment.
Attached patch can be applied using
git am uc_recurring-cim-log-error-691884-5.patch
I would mark this RTBC but since I made a change I will leave it up to someone else.
Comment #6
univate CreditAttribution: univate commentedCommitted.