Created
April 18, 2016 21:00
-
-
Save matiasgualino/eb5d077174c94b8a911bce4b3e3cc1ee 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 tipos a excluir | |
List<String> excludedPaymenTypesIds = new ArrayList<String>(){{ | |
add(PaymentType.BANK_TRANSFER); | |
}}; | |
// 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") | |
.setExcludedPaymentTypes(excludedPaymenTypesIds); | |
.startPaymentVaultActivity(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment