kirya355 / cloudpayments_flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cloudpayments_flutter

A Flutter plugin for integrating Cloudpaymanets in Android and iOS (test) applications.

It is not an official plugin. It uses SDK-Android on Android and SDK-IOS on iOS.

See the official documentation:

Supports

  • Check the validity of the card's parameters.
  • Generate card cryptogram packet.
  • Show 3ds dialog.

Getting Started

Initializing for Android

If you want to show 3ds dialog on Android, make MainActivity implements FlutterFragmentActivity instead of FlutterActivity

android/app/src/main/.../MainActivity.kt:

import io.flutter.embedding.android.FlutterFragmentActivity

class MainActivity: FlutterFragmentActivity() {}

Usage

  • Check card number validity.
bool isValid = await CloudpaymentsFlutter.isValidNumber(cardNumber);
  • Check card expire date.
bool isValid = await CloudpaymentsFlutter.isValidExpireDate(cardNumber); // MM/yy
  • Generate card cryptogram packet. You need to get your publicId from your personal account.
final cryptogram = await CloudpaymentsFlutter.cardCryptogram(cardNumber, expireDate, cvcCode, publicId);
  • Showing 3DS form and get results of 3DS auth.
final result = await CloudpaymentsFlutter.show3ds(acsUrl, transactionId, paReq);

About

License:MIT License


Languages

Language:Objective-C 41.2%Language:Java 25.3%Language:Dart 19.0%Language:Kotlin 8.4%Language:Swift 5.1%Language:Ruby 1.1%