Last active
April 18, 2016 21:26
-
-
Save matiasgualino/f958a949208cf70a8f22c220047133a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Button onClick method | |
public void submit(View view) { | |
/* | |
1. Crea la lista de medios a excluir | |
Como pudiste ver en un paso anterior, transferencia bancaria | |
tenía 3 medios de pagos disponibles. Vamos a ver que pasa si | |
excluímos dos de ellos.. | |
*/ | |
List<String> excludedPaymentMethodIds = new ArrayList<String>(){{ | |
add("banamex_bank_transfer"); | |
add("serfin_bank_transfer"); //Santander's id | |
}}; | |
// 2. Inicia la UI de MercadoPago seteando la lista de exclusiones | |
new MercadoPago.StartActivityBuilder() | |
.setActivity(activity) | |
.setPublicKey(TU_PUBLIC_KEY) | |
.setAmount(BigDecimal.valueOf(100)) | |
.setCurrency(CurrenciesUtil.CURRENCY_ARGENTINA) | |
.setPurchaseTitle("NOMBRE_ITEM") | |
.setExcludedPaymentMethodIds(excludedPaymentMethodIds); | |
.setMaxInstallments(MAX_INSTALLMENTS); | |
.startPaymentVaultActivity(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment