-
Notifications
You must be signed in to change notification settings - Fork 461
Add amount check to payment type #2202
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
base: 1.x
Are you sure you want to change the base?
Conversation
|
I agree we probably need a check to ensure orders are fully paid, perhaps it should be more of a UI thing in the admin system though? If someone wants to build a store that takes a deposit for example, this would prevent it. As long as the transaction is logging the amount taken, then we should be good. @alecritson considering this, should we close this PR? |
What happens in a situation when an order comes in as placed but the payment intent amount is less than what the order total is? In Lunar it would currently be marked as paid with a successful status. I understand this would stop someone taking a deposit however I feel that this is somewhat of a rare case and could instead be allowed with config/parameters passed to allow partial intents. |
glennjacobs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think if the payment manager can have the option to allow partial payments (e.g. deposits), but default to expecting the full amount, that would work.
This PR adds a new check into the Stripe PaymentType to ensure that the PaymentIntent amount equals the Order total.
Generally frontends will need to ensure they update the PaymentIntent amount when carts change, there could be situations where this hasn't happened and the order should not be marked as processed.