feat: credit card payments in up to 3 installments

Dropstar sells in up to 3 installments. The card form offers no more, and
the server refuses a payment asking for more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-07 15:00:00 -03:00
parent c75c40ff28
commit 44cb6ccc16
3 changed files with 7 additions and 3 deletions

View File

@@ -61,6 +61,9 @@ def run():
# Debit cards are not taken, even sent around the payment page.
customer.call('/payments/intent', {'quote_id': quote_id, 'method': {
'type': 'card', 'token': 'tok', 'payment_method_id': 'debvisa'}}, expected=422)
# At most 3 installments.
customer.call('/payments/intent', {'quote_id': quote_id, 'method': {
'type': 'card', 'token': 'tok', 'payment_method_id': 'visa', 'installments': 4}}, expected=422)
# Starting a PIX twice returns the same one. A card in review blocks every
# further attempt, so one quote can never be charged twice.