intram_sdk_flutter 0.0.3 copy "intram_sdk_flutter: ^0.0.3" to clipboard
intram_sdk_flutter: ^0.0.3 copied to clipboard

We are accelerating the digitalization of businesses in Africa through digital solutions to sell, receive payments, issue payments and ensure better management.

intram_sdk_flutter #

pub package build codecov style: effective dart License: MIT Awesome Flutter

Intram SDK Flutter is a Flutter package that simplifies the implementation of mobile payment with Intram. With it, you can make a full or simple payment Full payment consists in asking the user to enter all his or her personal personal information

The simple payment consists in asking the user only for the mobile payment number.

Installation #

Add this line to your pubspec.yaml:

dependencies:
    intram_sdk_flutter: ^0.0.1

Usage #

Import #

import 'package:intram_sdk_flutter/intram_sdk_flutter.dart';

Setting #

API GENERATE YOUR KEYS

API keys are your digital references to Intram systems. We use them to identify your account and the applications you create. These keys are necessary for any integration of Intram's payment payment APIs. Here are the steps to follow:

  • First, you must have an active Intram Business account. Create one if you don't yet.
  • Login](https://app.intram.org/login) to your account and click on Developers in the left-hand menu. menu on the left.
  • Then click on API, and you'll see all your API keys.
  • You can switch to SANDBOX mode or activate LIVE mode. Login to your Intram account, click on Developer, then on API. API keys and give them as arguments to the controller. Initialize Intram by entering, in order: PUBLIC_KEY, PRIVATE_KEY, INTRAM_SECRET, INTRAM_MARCHAND_KEY, MODE The mode: true for live mode and false for test mode.

Settings keys #

String public_key =
    "6a695a2def2ba8e68c773a260f95c0a081e05e79fa6f55a815ef815244e8083a";
String private_key =
    "tpk_6296f02e367ddee79462671b54dbe568e12f4f41b0bf6b8f758de56cd1ccc68d";
String secret_key =
    "tsk_e29b25acdef149504854a5dc8c63ff472598c865b38e0829ebb984f3c93b8d16";
String merchant_key = "5ef22f1df84ed86d57b17519";

Full Implementation #

 bool required_user_information = true;
  dynamic custom_user_information = {};

Simple Implementation #

bool required_user_information = false;
dynamic custom_user_information = {
  "message":"Bienvenue sur Hangbé Store, veuillez éffectuer votre paiement pour faire cette commande",
  "firstname": "Client",
  "lastname": "Hangbé",
  "email": "contact@hangbe.com"
};

Implementation #

 IntramSdkPayment intramSdkPayment = IntramSdkPayment(
    public_key, private_key, secret_key, merchant_key, 
  required_user_information, custom_user_information);
  • public_key - merchant account public key
  • private_key - private merchant account key
  • secret_key - secret merchant account key
  • merchant_key - merchant account key
  • required_user_information - this variable is set to true when full and false if the mode is is simple
  • custom_user_information - contains default values if required_user_information is false.
  • message - the default message to be displayed on payment to the user
  • firstname - a default name (your company)
  • lastname - a default name (your company)
  • email - a default email (your contact email)

Make Payment #

int amount = 5000;
bool sandbox = true;
String store_name = "Hangbé Store";
String color = "#08a0cf";
String logo = "https://img-prod-cms-rt-microsoft-com.akamaized.net";

dynamic init_payment_result = await intramSdkPayment.makePayment(
    context, amount, sandbox, store_name, color, logo);
  • amount - the amount paid by the user
  • sandbox - true or false mode
  • store_name - company name
  • color - color used for template
  • logo - logo link

Make Payment Return #

{success: true, transaction: PJ2flG2YVc}

Get transaction #

dynamic transaction = await intramSdkPayment.getTransaction(init_payment_result["transaction"]);

Contributions #

All contributions are welcome!

0
likes
110
pub points
1%
popularity

Publisher

unverified uploader

We are accelerating the digitalization of businesses in Africa through digital solutions to sell, receive payments, issue payments and ensure better management.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

cached_network_image, dio, flutter, flutter_multi_formatter, flutter_svg, http, rounded_loading_button

More

Packages that depend on intram_sdk_flutter