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
[Bye bye spree] Bring base_helper and log_entry from spree core #5924
[Bye bye spree] Bring base_helper and log_entry from spree core #5924
Conversation
b0da530
to
796e068
Compare
c620b84
to
c9baa56
Compare
c9baa56
to
904cfa3
Compare
904cfa3
to
865a4b3
Compare
|
||
# Fix for Spree #1767 | ||
# If a payment fails, we want to make sure we keep the record of it failing | ||
after_rollback :save_anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud: It would've been much easier not to include this in the same DB transaction so it wouldn't have been rolled back.
Hi @luisramos0 , Before staging this PR, I checked the Payments tab, when editing an order before this PR, for an order with Stripe-SCA payment method: Then, I ran the SQL command for that order, and got (first lines):
After that, I staged the PR and
Then, I ran the SQL command, for that order:
All good! |
What? Why?
Continues #4826
Here we move the following files to OFN:
No code changes were made, here we only move the code from spree, adapt the specs if needed and improve the code a little with rubocop and transpec.
What should we test?
Re Spree::BaseHelper:
re Spree::LogEntry
select l.details from spree_orders o, spree_payments p, spree_log_entries l where o.number = 'R820014810' and o.id = p.order_id and p.id = l.source_id;
There should be some log info about the transaction with Stripe.
Release notes
Changelog Category: Changed
Brought code needed in OFN from Spree so that we can make OFN independent of Spree.