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
Tx service gw adapters 2/X #1026
Conversation
30fc4cf
to
ce79635
Compare
|
||
def get_payment_details(tx:) | ||
payment_total = Maybe(PaymentModel.where(transaction_id: tx[:id]).first).total_sum.or_else(nil) | ||
total_price = tx[:unit_price] * 1 # TODO fixme for booking (model.listing_quantity) |
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.
This needs to be done before merge?
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 need to check this once more. It's a copy & paste comment so no behavior change here between master and this branch but I could either remove the comment or then change something.
You found out the bug (or at least very confusing behaviour) of |
TransactionStore is now tightly coupled to the Conversation ( |
|
result.maybe: Yes, should be fixed to avoid others having to discover this odd behavior and unnecessary debugging. Not in this branch. coupled conversation: This is not modelled optimally but also not in the scope of this change. This just moves model level operations behind a store interface but doesn't change the way things are modelled under the hood. Hopefully this makes changing later easier because the surface area of the modelling implications is smaller. Good point about charge commission. Adapter is not exactly the correct place, it's a process level thing somehow. I left out the part where processes would handle the async behavior consistently with the sync behavior because this includes moving actions away from statesman and MarketplaceService::Transaction. Not sure when this work will happen but at least we need to clarify what to do with preauth flow before that. Charge commission should be addressed then too. |
8d188a3
to
1adc73b
Compare
This value is not used downstream at the moment but still better pass correct information since we have it.
No description provided.