mercadopago_sdk_dart icon indicating copy to clipboard operation
mercadopago_sdk_dart copied to clipboard

Basic Payment Flow Example?

Open searzh opened this issue 5 years ago • 1 comments

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.

searzh avatar Dec 16 '19 18:12 searzh

https://www.youtube.com/watch?v=jumlRs29sEM

msilvamolina avatar Mar 29 '20 15:03 msilvamolina