flutter_squad_sdk 0.0.4 copy "flutter_squad_sdk: ^0.0.4" to clipboard
flutter_squad_sdk: ^0.0.4 copied to clipboard

A Flutter package for that gives you the ability to integrate the power of Squad Payment Gateway to your Android and iOS Applications.

Introduction #

This is a Flutter package that gives you the ability to integrate the power of Squad Payment Gateway to your Android and iOS Applications. It is also suitable for developers using Firebase or Supabase for backend. You can initiate payment and also checkout right from your Flutter app.

iOS Preview #

Screenshot 2024-03-12 at 7 50 13 PM Screenshot 2024-03-12 at 7 50 45 PM

Android Preview #

Screenshot 2024-03-12 at 7 47 23 PM Screenshot 2024-03-12 at 7 46 45 PM

Features #

Initiate payment and checkout, If you do not want to generate from your back end server Checkout only if you initiate payment from your backend server Verify payment with transaction Reference

Getting started #

To get started make sure you have created an account on https://squadco.com/ . If you want a test account you can create an account on https://sandbox.squadco.com/login just for development

Usage #

To initiate a payment and also checkout you need to call the initializeAndCheckout() function in SquadPay class.



//Initiate payment and checkout
    SquadPay.initializeAndCheckout(
    context, 
    Environment.test, 
    "<-Enter your Secret Key here->",     //your secret key ca be found on your squadco.com dashboard
    InitialPayload(
        amount: 55000,
        email: "nalz@gmail.com",
        currency: "NGN",
        initiateType: "inline",
        transactionRef: SquadPay.generateTransactionRef(16) , //Generate random transaction reference
        callbackUrl: "https://google.com",
        
    ));

To checkout after initializing payment from another source (i.e your backend server), call checkOut() function like so:

//Checkout only
    SquadPay.checkOut(
context,
    '<-Enter your checkout URL here->',
    '<-Enter your call-back URL here->'
    );    

To verify if a transaction is successful or not we use this code snippet below

//Verify transaction 
final transactionResponse = await SquadPay.verifyTransaction(
    Environment.test,
    "<-SECRET -KEY->",
    "yVJ2KXwvtc" // transaction Ref
);  

0
likes
150
points
44
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for that gives you the ability to integrate the power of Squad Payment Gateway to your Android and iOS Applications.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

dartz, dio, flutter, webview_flutter

More

Packages that depend on flutter_squad_sdk