sb_payment_sdk

Last updated:

0 purchases

sb_payment_sdk Image
sb_payment_sdk Images
Add to Cart

Description:

sb payment sdk

Payment sdk for StartButton
will need feedback before proceeding to convert to a package
Release Notes for StartButton Payment SDK
Version 0.1.0
Features #
Getting started #
Enhanced payment flow to provide a smoother user experience.
Optimized error handling for more informative feedback.
Improved compatibility with various payment gateways.
Bug fixes #
Transaction Response Updates #
Transaction Response Updates:
The response from successful transactions now includes detailed transaction data.
Transaction data includes reference, amount, email, currency, bank details (name, account number, account name), payment status, payment type, and payment date.
Improved error handling and messages for failed transactions.
Usage #
Usage Guide: #
Imports: #
import 'package:sb_payment_sdk/sb_payment_sdk.dart';
import 'package:sb_payment_sdk/models/charge_model.dart';
import 'package:sb_payment_sdk/models/api_response.dart';
copied to clipboard
Initialization: #
StartButtonPlugin _paymentPlugin = StartButtonPlugin();
_paymentPlugin.initialize(isLive: false, publicKey: "sb_e73bc345*************2bc08442957****8db719f*******12c0");
copied to clipboard
Making a Payment: #
const _reference = ""; //Generate any random string
num _amount = 2000;
APIResponse response = await _paymentPlugin.makePayment(
context,
charge: Payment(amount: _amount, email: "[email protected]", currencyType: CurrencyType.NGN, reference: _reference)
);
copied to clipboard
Upon successful transaction, the response will contain detailed transaction data.
Example response data for successful transaction: #
var data = { "reference": "reference", "amount": 2000, "email": "[email protected]", "currency": "NGN", "bankName": "", "accountName": "", "accountNumber": "", "paymentStatus": "successful", "paymentType": "Paystack", "paymentDate": "2024-03-19T18:42:51.757Z" };
copied to clipboard
Additional information #
For more information and detailed usage instructions, please refer to the updated documentation or contact our support team.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.