Skip to content
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

Payment log entries are not being saved for refunds #4866

Open
kennyadsl opened this issue Jan 23, 2023 · 5 comments
Open

Payment log entries are not being saved for refunds #4866

kennyadsl opened this issue Jan 23, 2023 · 5 comments
Assignees
Labels
good first issue Wanted, but lacking time to work on it and might be a good fit for a first contribution type:bug Error, flaw or fault

Comments

@kennyadsl
Copy link
Member

Apparently, refunding a payment is not creating a payment log entry when executed.

Screenshot 2023-01-23 at 16 56 05@2x

☝️ In this example, the order has been cancelled, and a payment have been automatically refunded with the credit method on the payment method/gateway. This is not attaching the log entry event to the payment.

As you can see, the refund that is correctly created for the order, is linked to the original payment, so there's no apparent reason not to link the credit log entry event to the payment:

Screenshot 2023-01-23 at 16 59 41@2x

Solidus Version:
All

To Reproduce

First of all bundle exec rake sandbox and bin/rails s

  1. Complete a payment on the frontend
  2. Go to admin, capture the payment of the newly created order
  3. Refund the payment.
  4. No log entry event for the refund.

Current behavior

No log entry event logged on the original payment for its refund.

Expected behavior

A log entry event logged on the original payment for its refund.

Screenshots

See above.

@kennyadsl kennyadsl added type:bug Error, flaw or fault good first issue Wanted, but lacking time to work on it and might be a good fit for a first contribution labels Jan 23, 2023
@senemsoy
Copy link
Contributor

@benjaminwil and I are working on this.

@kennyadsl
Copy link
Member Author

Hello @senemsoy! Are you still working on this? I think we are facing this in the Stripe extension, and if you and @benjaminwil did find anything worth sharing, it would be great to know. 🙂

senemsoy added a commit to senemsoy/solidus that referenced this issue Apr 4, 2023
This reproduces the issue mentioned here solidusio#4866

Co-authored-by: Benjamin Willems <[email protected]>
@benjaminwil
Copy link
Contributor

@kennyadsl We were able to reproduce the issue but haven't had time to find the source. We just created a pull request with a pending feature test so someone else can pick this up if it's urgent. 👍

@rainerdema rainerdema self-assigned this May 11, 2023
@cesartalves
Copy link
Contributor

It seems that the LogEntrie(s) are built, but never saved when performing the refund. See

log_entries.build(parsed_payment_response_details_with_fallback: perform_response)

@rainerdema
Copy link
Contributor

After a recent team conversation, we have decided to postpone addressing this issue until the implementation of the new admin, which is already underway.

The main reason for this decision is that the logs are being saved correctly with the related Spree::Refund source, but the current view only displays logs originating from Spree::Payment source type.

In conclusion, the issue is primarily related to view presentation rather than data integrity.

The overhaul of the admin interface will provide an opportune time to enhance the view presentation of these logs, ensuring a more comprehensive and accurate representation and including details about the log origin.

cc @solidusio/core-team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Wanted, but lacking time to work on it and might be a good fit for a first contribution type:bug Error, flaw or fault
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants