mercado_pago_integration 0.0.5 copy "mercado_pago_integration: ^0.0.5" to clipboard
mercado_pago_integration: ^0.0.5 copied to clipboard

outdated

MercadoPago Mobile Checkout Integration for android and ios. Easy to install, Easy to integrate, PCI compliance, Android Support, IOS Support. This project includes an example project using Mercado Pa [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:mercado_pago_integration/mercado_pago_integration.dart';

final Map<String, Object> preference = {
  'items': [
    {
      'title': 'Test Product',
      'description': 'Description',
      'quantity': 3,
      'currency_id': 'ARS',
      'unit_price': 1500,
    }
  ],
  'payer': {'name': 'Buyer G.', 'email': 'test@gmail.com'},
};
void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Mercado Pago Integration Example'),
        ),
        body: Center(
          child: RaisedButton(
            onPressed: () async {
              String platformVersion =
                  await MercadoPagoIntegration.startCheckout(
                publicKey: "[Your_Mercado_Pago_Public_Key]",
                preference: preference,
                accessToken: "[Your_Mercado_Pago_Access_Token]",
              );
              debugPrint('RESULTADO$platformVersion');
            },
            child: Text('Test Integration'),
          ),
        ),
      ),
    );
  }
}
20
likes
30
pub points
37%
popularity

Publisher

unverified uploader

MercadoPago Mobile Checkout Integration for android and ios. Easy to install, Easy to integrate, PCI compliance, Android Support, IOS Support. This project includes an example project using Mercado Pago Integration, checkout example folder. In case you need support contact the Caramel Point Developers Site.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, mercadopago_sdk

More

Packages that depend on mercado_pago_integration