So I got here via quite a roundabout route. The long and short of it is I wanted paypal to receive a correct total when I had already applied a payment (in this case a gift card).
I am somewhat cheating in my solution, because in order to update the outstanding_balance I need to first process the gift card. I believe store_credit also has the ability to do a partial deduction so this might apply there too?
My current solution is to replace the payment_details function in app/controllers/spree/paypal_controller.rb with one that uses outstanding_balance.
This may not work if store credit amount doesn't process until the order state == complete. In that case maybe it would be better to manually add up uncaptured payment amounts (from methods that aren't the current payment method) and use that instead?
So I got here via quite a roundabout route. The long and short of it is I wanted paypal to receive a correct total when I had already applied a payment (in this case a gift card).
I am somewhat cheating in my solution, because in order to update the outstanding_balance I need to first process the gift card. I believe store_credit also has the ability to do a partial deduction so this might apply there too?
My current solution is to replace the payment_details function in
app/controllers/spree/paypal_controller.rbwith one that usesoutstanding_balance.This may not work if store credit amount doesn't process until the order state == complete. In that case maybe it would be better to manually add up uncaptured payment amounts (from methods that aren't the current payment method) and use that instead?