Last active
April 29, 2016 05:25
-
-
Save matiasgualino/4a169219fc874a3bc90b0b0f666a8d17 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
public void submit() { | |
// Envia la información a tu servidor como desees | |
Map<String, Object> preferenceParams = new HashMap<String, Object>(); | |
// Identifica qué estas cobrando | |
preferenceParams.put("item_id", "123456"); | |
// Envia la info a tu servidor para crear la preferencia | |
MerchantServer.createPreference(activity, TU_URL_BASE, | |
TU_CREACION_PREFERENCIAS_URI, preferenceParams, new Callback() { | |
@Override | |
public void success(CheckoutPreference checkoutPreference, | |
Response response) { | |
// La preferencia se creó correctamente. | |
// Aquí puedes iniciar el Checkout de MercadoPago. | |
} | |
@Override | |
public void failure(RetrofitError error) { | |
// Ups, ocurrió un error | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment