You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Paypal Express our checkout flow skips the payment step. For example our checkout flow is:
Address
Delivery
Confirm
Complete
In Spree's checkout.rb model, "create_tax_charge!" is called when an order progresses through the payment step, however in our case (and I assume most use cases for Paypal Express) this is never called due to the lack of a payment step. This leads to tax adjustments on shipping not being calculated.
To resolve I have added the following line to an order_decorator to ensure create_tax_charge! is called: state_machine.before_transition to: :confirm, from: :delivery, do: :create_tax_charge!
I have added the call between the delivery and before the confirm to ensure it is only called when a checkout skips the payment step, however perhaps there may be another better time to call it?
The text was updated successfully, but these errors were encountered:
When using Paypal Express our checkout flow skips the payment step. For example our checkout flow is:
In Spree's checkout.rb model, "create_tax_charge!" is called when an order progresses through the payment step, however in our case (and I assume most use cases for Paypal Express) this is never called due to the lack of a payment step. This leads to tax adjustments on shipping not being calculated.
To resolve I have added the following line to an order_decorator to ensure create_tax_charge! is called:
state_machine.before_transition to: :confirm, from: :delivery, do: :create_tax_charge!
I have added the call between the delivery and before the confirm to ensure it is only called when a checkout skips the payment step, however perhaps there may be another better time to call it?
The text was updated successfully, but these errors were encountered: