mercadopago_sdk_dart
mercadopago_sdk_dart copied to clipboard
Basic Payment Flow Example?
Any chance we could get a basic payment flow as an example? I've read the doc but I think I'm missing a lot of information.
I have created this so far, but then I'm not sure what's next on the list.
Future<void> startMP() async {
MP mercadoPago = MP('6924219732628689', 'yd5kmBOBHhXE24GuOVK9iozt5D8vjyY2');
String token = await mercadoPago.getAccessToken();
var payer = {'email': '[email protected]'};
var preference = {
"items": [
{
"title": "Test01",
"quantity": 1,
"currency_id": "USD",
"unit_price": 0.01,
"payer": payer,
}
],
};
var result = await mercadoPago.createPreference(preference);
}
What's next? Thank you.
https://www.youtube.com/watch?v=jumlRs29sEM