solidus
solidus copied to clipboard
Store credits applied after the payment is created
Describe the bug
In the payment step, if the user has store credits, a first payment with the total amount is saved to the database. After that, store credits are subtracted from the payment and the amount is updated with the remaining total. This happens even if store credits completely cover the order total and the user still needs to input his credit card.
Solidus Version:
master
To Reproduce
- Assign yourself some store credits in the admin area
- Put a byebug here
- Check how the payment evolves after each action
- Complete the checkout
Expected behavior
The payment is directly saved with the correct amount on the database
Additional context
If this behavior is intended to be as it is now, I'm going to add some documentation to explain the reasons better.