Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spree::Payment#avalara_finalize bug #127

Open
rczjns opened this issue Feb 7, 2019 · 1 comment
Open

Spree::Payment#avalara_finalize bug #127

rczjns opened this issue Feb 7, 2019 · 1 comment

Comments

@rczjns
Copy link

rczjns commented Feb 7, 2019

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?

@dhonig
Copy link
Contributor

dhonig commented Feb 7, 2019

@rczjns The gem is written to meet the needs of the 80/20, against a solidus store out of the box. Its most common for stores to use one or two payment methods at most. Do you have a need for this in your store? If so do you have a proposal or suggestion for behavior of this method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants