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

Multiple Payments #51

Closed
skukx opened this issue Mar 31, 2017 · 3 comments
Closed

Multiple Payments #51

skukx opened this issue Mar 31, 2017 · 3 comments

Comments

@skukx
Copy link

skukx commented Mar 31, 2017

self.update_attributes(amount: order.total)

When there are multiple payments on an order (Credit Card, Gift Card). This line will mess up checkout by changing the actual amount on the payment, to the order total.
For example:
Order total is $19

1st Payment is $10 (gift card)
2nd Payment is $9 (credit card)

See https://github.com/solidusio/solidus/blob/master/core/app/models/spree/order/payments.rb#L42 for below context.

1st Payment:

  • process! then purchase! is called
  • $10 captured on first payment
  • payment.complete! called
  • oops, payment.amount now $19

Now 2nd payment is getting processed:

  • payment_total reflects total we break which causes checkout to fail
  • Customer goes through checkout again
  • Completed payment shows for $19
  • Complete order and all is well even though customer was only actually charged $10
@skukx skukx changed the title Split Payments Multiple Payments Mar 31, 2017
skukx pushed a commit to deseretbook/solidus_avatax_certified that referenced this issue Mar 31, 2017
See: boomerdigital#51

Updating the payment here will cause issues with multiple payments and
is redundant.

Since the payment has already been authorized and captured, there
is no logical reason to update the payment amount to be other than
what the payment currently is.
skukx pushed a commit to deseretbook/solidus_avatax_certified that referenced this issue Apr 20, 2017
See: boomerdigital#51

Updating the payment here will cause issues with multiple payments and
is redundant.

Since the payment has already been authorized and captured, there
is no logical reason to update the payment amount to be other than
what the payment currently is.
@acreilly
Copy link
Contributor

#60

@acreilly
Copy link
Contributor

acreilly commented May 3, 2017

@skukx Has this issue been taken care of?

@skukx
Copy link
Author

skukx commented May 3, 2017

Yes I believe so

@skukx skukx closed this as completed May 3, 2017
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