Skip to content

Conversation

@alecritson
Copy link
Collaborator

@alecritson alecritson commented May 27, 2025

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.

@alecritson alecritson requested a review from glennjacobs May 27, 2025 11:20
@alecritson alecritson marked this pull request as ready for review May 28, 2025 11:45
@glennjacobs glennjacobs self-assigned this Jun 17, 2025
@glennjacobs
Copy link
Contributor

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?

@glennjacobs glennjacobs removed their assignment Jun 17, 2025
@alecritson
Copy link
Collaborator Author

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.

Copy link
Contributor

@glennjacobs glennjacobs left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants