La Casa del Bordadito lets you save payment cards to your account so checkout is faster. Saved cards are listed in the Configuración sub-tab of the Cuenta screen and are pulled into the checkout flow whenever you choose card as your payment method. Cards are stored in Firebase Realtime Database under your user node.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AndresLopezCorrales/La-casa-del-bordadito/llms.txt
Use this file to discover all available pages before exploring further.
Where cards are stored
Each saved card lives atUsuarios/{uid}/metodosPago/{cardId} in the Realtime Database. The PaymentMethod data class defines the structure:
| Field | Description |
|---|---|
id | Firebase push key generated by ref.push().key |
last4 | Last four digits of the card number |
brand | Card network string from EditCredit’s cardType |
holderName | Cardholder name as typed |
expiry | Expiry date formatted as MM/AA |
isDefault | true for the first card added; false for subsequent ones |
Adding a new card
Open the add-card screen
In the Cuenta tab, switch to Configuración. Tap Agrega tu primera tarjeta (shown when no cards exist yet) or Agregar otra tarjeta (shown when at least one card is already saved). Either button launches
TarjetaAgregarActivity.If you already have 5 saved cards, tapping the button shows the message “Máximo 5 tarjetas permitidas” and
TarjetaAgregarActivity is not opened. Remove an existing card first.Enter card details
The form contains four fields:
The card number field formats digits automatically and detects the card brand in real time as you type.
| Field | Validation | |
|---|---|---|
| Card number | Validated by editCreditView.isCardValid (EditCredit library) | |
| Cardholder name | Must not be empty | |
| Expiry date | Must match `^(0[1-9] | 1[0-2])/\d$— auto-formatted asMM/AA` while you type |
| CVV | Must be exactly 3 digits |
Card brand detection
The brand string is read directly from the EditCredit view after validation:Supported brands detected by the library: Visa, Mastercard, Amex, Discover. Unrecognised prefixes produce
"Unknown".Deleting a card
Tap the delete action on any saved card in the Configuración list. AnAlertDialog confirms the action:
“¿Deseas eliminar la tarjeta terminada en ?”Confirming calls
removeValue() on Usuarios/{uid}/metodosPago/{cardId}. The list updates in real time through the ValueEventListener already attached to metodosPago.
Using a card at checkout
When placing an order, select the Tarjeta toggle in the payment step. A dialog displays all saved cards, each shown with its brand and masked number (e.g.,Visa **** **** **** 4242). Tap a card to select it — the metodoPago field of the order is recorded as the card’s description string.
Supported card brands
Visa
Prefix:
4Mastercard
Prefix:
51–55, 2221–2720Amex
Prefix:
34, 37Discover
Prefix:
6011, 622126–622925, 644–649, 65Card details (last 4 digits, brand, expiry, and holder name) are stored directly in Firebase Realtime Database for display purposes. No actual payment processing is performed — this is a demonstration flow and does not charge any real card. Full payment gateway integration (e.g., Stripe or Conekta) would be required before going live.