openpay_bbva 1.1.2 copy "openpay_bbva: ^1.1.2" to clipboard
openpay_bbva: ^1.1.2 copied to clipboard

This is a package that uses the Openpay iOS and Openpay Android libraries to tokenize payments through the BBVA Openpay Platform.

Openpay BBVA #

Get Started #

Android #

Add this permissions in your Android Manifest:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Languages #

Español

Libraries #

-Openpay iOS

-Openpay Android

-Openpay API to generate the card token used in Openpay payments

-Anti-Fraud System

-Card Token for the card payments through their app

-API.

Usage #

Initialize OpenpayBBVA instance #

        // Example MERCHANT_ID and PUBLIC_API_KEY
            final openpay = OpenpayBBVA(
           merchantId: "m2tmftuv5jao96rrezj2", // Replace this with your MERCHANT_ID
           publicApiKey: "pk_d5e9bff37db4468da3f80148bb94f263", // Replace this with your PUBLIC_API_KEY
            productionMode: false, // True if you want production mode on
            Country: Country.MX); // Mexico by default, also Colombia & Peru supported

Get your Device Session ID (iOS and Android only) #


        Future<void> initDeviceSession() async {
            String deviceID;
            try {
            deviceID =
                await openpay.getDeviceID() ?? 'Error getting the device session id';
            } catch (e) {
            rethrow;
            }

            setState(() {
            // THIS IS WHERE THE ID IS STORED
            _deviceID = deviceID;
            });
        }

Get your Card Token #


        Future<void> initCardToken() async {
            String token;
            try {
                token = await openpay.getCardToken(
                    CardInformation(
                    holderName: 'Jose Perez Cruz',
                    cardNumber: '5555555555554444',
                    expirationYear: '23',
                    expirationMonth: '8',
                    cvv2: '213',
                    ),
                );
            } catch (e) {
            rethrow;
            }

            setState(() {
            // THIS IS WHERE THE TOKEN IS STORED
            _token = token;
            });
        }

With this information, you can process card payments through Openpay.

8
likes
160
pub points
76%
popularity

Publisher

unverified uploader

This is a package that uses the Openpay iOS and Openpay Android libraries to tokenize payments through the BBVA Openpay Platform.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http

More

Packages that depend on openpay_bbva