Skip to content

Spree::Payment#avalara_finalize bug #127

@rczjns

Description

@rczjns

I'm using the master branch. And this bug

Bug

avalara_finalize method updates the amount of payment to be the order total. This is not a valid update, if the order contains multiple payments (store credit plus credit card too).

def avalara_finalize
    return unless avalara_tax_enabled?

    if self.amount != order.total
      self.update_attributes(amount: order.total)
    end

    order.avalara_capture_finalize
  end

Why is this update necessary after the capture?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions