Skip to content

Shipment tax adjustments not created when using Paypal Express #219

Description

@mdavo6

When using Paypal Express our checkout flow skips the payment step. For example our checkout flow is:

  1. Address
  2. Delivery
  3. Confirm
  4. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions