pay_with_paystack 1.0.8 copy "pay_with_paystack: ^1.0.8" to clipboard
pay_with_paystack: ^1.0.8 copied to clipboard

Flutter Plugin that enable users make Paystack payment with either Mobile Money or Card on the fly provided you use the secret key provided to you from Paystack

Features #

🎉Mobile Money🎉

🎉VISA🎉

🎉Bank🎉

🎉Bank Transfer🎉

🎉USSD🎉

🎉QR🎉

🎉EFT🎉

Getting started #

Before you run, do the following in your android/app/build.gradle

Update your compileSDKVersion to 32

android {
    compileSdkVersion 32
    }

Update your minSDKVersion to 19

  defaultConfig {
        minSdkVersion 19
    }

Usage #

Simply call the PayWithPayStack class to start making payments with paystack. As simple as that

Example

 PayWithPayStack().now(
    context: context
    secretKey:
    "sk_live_XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    customerEmail: "popekabu@gmail.com",
    reference:
    DateTime.now().microsecondsSinceEpoch.toString(),
    callbackUrl: "setup in your paystack dashboard"
    currency: "GHS",
    paymentChannel:["mobile_money", "card"],
    amount: "20000",
    transactionCompleted: () {
        print("Transaction Successful");
    },
    transactionNotCompleted: () {
        print("Transaction Not Successful!");
    });

Definitions #

secretKey Provided by Paystack

customerEmail Email address of the user/customer trying to make payment for receipt purpose

reference Unique ID, usually alphanumneric and/or number, to recognise this particular transaction

currency Currency user/customer should be charged in

amount Amount or value user/customer should be charged

callbackUrl URL to redirect to after payment is successful, this helps close the session. This is setup in the Dashboard of paystack and the same URL setup is then provided here by you again. This is very important for successful or failed transactions

paymentChannels [Optional] Payment Channels are provided to you by Paystack and some may not be available based on your country and preferences set in your paystack dashbord. Example; ["card", "bank", "ussd", "qr", "mobile_money", "bank_transfer", "eft"]

transactionCompleted Execute a function when transaction is completed or is successful

transactionNotCompleted Execute a function when transaction is not completed or is successful

metadata [Optional] Extra data for development purposes. Example:

 "metadata": {
             "custom_fields": [
               {
                "name": "Daniel Kabu Asare",
                "phone": "+2330267268224"
               }
             ]
           }

Screenshots #

Additional information #

For more information and bug reports, Contact me on github @popekabu

📝 Contributing, 😞 Issues and 🐛 Bug Reports #

The project is open to public contribution. Please feel very free to contribute. Experienced an issue or want to report a bug? Please, report it here. Remember to be as descriptive as possible.

Thank you!! #

34
likes
140
pub points
91%
popularity

Publisher

unverified uploader

Flutter Plugin that enable users make Paystack payment with either Mobile Money or Card on the fly provided you use the secret key provided to you from Paystack

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, http, webview_flutter

More

Packages that depend on pay_with_paystack