Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Store balance transaction ID in order metadata #7945
Store balance transaction ID in order metadata #7945
Changes from 6 commits
f33af70
fbc8664
7f9fc28
1bf3da7
83d5af8
d73ab09
5f1a297
8c2f80f
1e58fcc
a7bef87
adc9a67
1f4681a
69c82bd
bb87366
4d9d729
e745e71
2af5d52
8022a4a
edd6872
16f83e8
d3d2655
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I was getting Psalm UndefinedMethod linting error, so replaced the abstract class type hint with a list of possible concrete types. I wonder if there's a proper way to use abstract types as type hints without Psalm complaining.
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.
part of this method ( calling the setters and calling the save method) is identical to
attach_intent_info_to_order__legacy
.This method extracts the data that needs to be added to the order, and saves it on the order.
attach_intent_info_to_order__legacy
only saves the information to the order.We can keep this method to extract the data and call the
attach_intent_info_to_order__legacy
in this method.So, we could:
add_intent_info_to_order
attach_intent_info_to_order__legacy
(attach_intent_info_to_order
)attach_intent_info_to_order
in this methodThere 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.
I agree with this, common code can be extracted to a separate function as part of this refactor.
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.
@dpaun1985 @naman03malhotra Thanks for the feedback. I fixed the code duplication in a7bef87.
In the long term, I think it's desirable to remove the legacy method and keep only the refactored one. This will allow us to care about only one method when adding new intent properties to order meta.
Unfortunately, I cannot change the name as I'd like my changes to apply to all uses of this method.