sasapay_sdk 0.0.1
sasapay_sdk: ^0.0.1 copied to clipboard
wrapper around sasapay API'S, The Apis facilitate in collection and disbursement of funds, covers endpoints for C2B, B2C, B2B, Utilities and Wallet as a Service(WAAS).
SASAPAY C2B,B2C,B2B Package #
A flutter package that wraps around sasapay payments gateway.
Features #
Ready Methods/APIs
- [√] C2B
- [√] B2C
- [√] B2B
- [√] VERIFY TRANSACTION
- [√] TRANSACTION STATUS
- [√] GET MERCHANT ACCOUNT BALANCE.
- [√] INSTANT PAYMENT NOTIFICATION (IPN).
- ✅ UTILITIES PAYMENT.
Getting Started #
SDK IN ACTION #
![]() |
![]() |
![]() |
Credentials #
- Create an account on the SasaPay Developer Portal
- Create a sandbox application (C2B / B2C / B2B scope)
- Click view to see more details on your application.
- Get your keys ->
CLIENT ID
andCLIENT SECRET
For detailed tutorial visit Sasapay docs
Usage #
To run the sample application, cd into the example folder cd example/
.Remember to change MERCHANT_CODE
and CALLBACK_URL
Add dependency in pubspec.yaml
dependencies:
sasapay_sdk: [ADD_LATEST_VERSION_HERE]
STEP ONE. #
Initialize the sdk with your CLIENT ID
and CLIENT SECRET
final sasaPay = SasaPay(
clientId: CLIENT ID,
clientSecret:CLIENT SECRET,
environment: EnvironmentSasaPay.Testing,
);
OR Using Getx for state management.
Get.lazyPut(
() => SasaPay(
clientId: CLIENT ID,
clientSecret:CLIENT SECRET,
environment: EnvironmentSasaPay.Testing,
),
);
BUSINESS TO CUSTOMER. #
var resp = await sasaPay.business2Customer(
merchantCode: MERCHANT_CODE,
amount:"1729",
receiverNumber:"0701234567",
channelCode: "0",
callBackURL: CALL_BACK_URL,
transactionDesc: "stock payment",
accountReference:"071234",
);
PROCESS B2C PAYMENT. #
var res = await sasapay.processC2Bpayment(
merchantCode: MERCHANT_CODE,
checkoutRequestID: "4040359-0f8****1-4779-85b3-44e575166f7a",
verificationCode: "123456",
);
CUSTOMER TO BUSINESS #
var resp = await sasaPay.customer2BusinessPhoneNumber(
merchantCode: MERCHANT_CODE,
networkCode: "0",
transactionDesc:"Pay for groceries",
phoneNumber:"2547******280",
accountReference:"07******0",
amount: 1,
callBackURL: CALL_BACK_URL
);
BUSINESS TO BUSINESS #
var resp = await sasaPay.business2Business(
merchantCode: MERCHANT_CODE,
amount: 1,
receiverMerchantCode:"3209"
transactionreason: "Payment of transportation fee",
transactiontReference:"87065"
callBackURL: CALL_BACK_URL,
);
GET MERCHANT BALANCE #
var resp = await sasaPay.queryMerchantAccountBalance(
merchantCode: MERCHANT_CODE
);
GET BANK CODES. #
List<BanksChannelCode?> result =SasaPay.getBanksCodes();
SDK IN ACTION #
![]() |
![]() |
![]() |
Contributing #
- Fork the project then clone the forked project
- Create your feature branch:
git checkout -b my-new-feature
- Make your changes and add name to Contributors list below and in authors in pubspec.yaml
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
Maintainers |
---|
DANCHE |
For help getting started with Flutter, view their online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.