Payout profile payment is previous solution but it didn't specify which line item of that payout payment. New payout model will have a relationship to the line item as well. This PR also include some changes which are auto-correct by rubocop that hard to ignore.
Generate above payouts is process as follow:
User create payment
When it supported payout, payment generate payouts with amount required by merchant & store (with state :created)
Payment use payouts records to construct payout params for create transaction in bank.
When paid, bank will send us transaction info:
We check if total payout amount from bank is equal to payouts of that payment, then update state to :confirmed.
In next PR, we focus on making payout support tax, shipment, adjustment run by store or merchant.
Payout profile payment is previous solution but it didn't specify which line item of that payout payment. New payout model will have a relationship to the line item as well. This PR also include some changes which are auto-correct by rubocop that hard to ignore.
Generate above payouts is process as follow:
In next PR, we focus on making payout support tax, shipment, adjustment run by store or merchant.