chargily_flutter 1.0.0 copy "chargily_flutter: ^1.0.0" to clipboard
chargily_flutter: ^1.0.0 copied to clipboard

Chargily Epay Gateway Flutter Package

chargily-epay-flutter #

Flutter Package for Chargily ePay Gateway

Chargily ePay Gateway

This Plugin is to integrate ePayment gateway with Chargily easily.

  • Currently support payment by CIB / EDAHABIA cards and soon by Visa / Mastercard
  • This repo is recently created for Flutter Package, If you are a developer and want to collaborate to the development of this package, you are welcomed!

Installation: #

Edit pubspec.yaml file to include chargily_flutter package:

dependencies:
  flutter:
    sdk: flutter
  chargily_flutter: any # <-- Add this

then run the command:

flutter pub get
# or
dart pub get

Usage: #

import 'package:chargily_flutter/chargily.dart'

void main(List<String> args) async {
    final chargilyClient = Chargily('[API_KEY]');

    final invoice = Invoice(
        client: 'ahmed',
        clientEmail: 'rainxh11@gmail.com',
        amount: 1500,
        discount: 20.0,
        webhookUrl: 'http://webhookurl.com/',
        backUrl: 'http://backurl.com/',
        comment: 'Purchace',
        mode: PaymentMethod.CIB,
        invoiceNumber: '12345');

    final response = await chargilyClient.createPayment(invoice);
}