Skip to content

Instantly share code, notes, and snippets.

@matiasgualino
Created April 18, 2016 21:00
Show Gist options
  • Save matiasgualino/eb5d077174c94b8a911bce4b3e3cc1ee to your computer and use it in GitHub Desktop.
Save matiasgualino/eb5d077174c94b8a911bce4b3e3cc1ee to your computer and use it in GitHub Desktop.
// 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