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

@@ -574,8 +574,8 @@
const mp=new window.MercadoPago(session.payment_public_key,{locale:'pt-BR'});
cardBrick=await mp.bricks().create('cardPayment','cardPaymentBrick',{
initialization:{amount:approved.total_cents/100, payer:{email:approved.customer.mail}},
// Credit cards only: the store does not take debit.
customization:{paymentMethods:{maxInstallments:12,types:{excluded:['debit_card']}},
// Credit cards only, in up to 3 installments, as Dropstar decided.
customization:{paymentMethods:{maxInstallments:3,types:{excluded:['debit_card']}},
// The option above already names the card; the form's own title
// ("crédito ou débito") would contradict it.
visual:{hideFormTitle:true,