flutter_hesabe_payment 1.0.1 flutter_hesabe_payment: ^1.0.1 copied to clipboard
A new flutter plugin project.
Hesabe Payment Gateway Plugin #
A flutter plugin for integrating Hesabe payment gateway. Supports Android and iOS.
Installing #
Add this in pubspec.yaml
dependencies:
flutter_hesabe_payment: ^1.0.1
iOS 9+ Specific #
iOS developers should add the following to their plist
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PluginProject' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'CryptoSwift', '~> 1.0'
pod 'Alamofire', '~> 5.1'
# Pods for PluginProject
end
Using #
import 'package:flutter_hesabe_payment/flutter_hesabe_payment.dart';
startpayment() async {
//Testing Credentials
String credUrl = "http://api.hesbstck.com";
String name = "JP";
double price = 111.0;
var response ;
Map<dynamic, dynamic> map = {"cred_url":credUrl,
"name":name,
"price":price,
};
try {
response = await FlutterMyfatoorah.payment(map);
} on PlatformException {
print('error');
}
}
See the example
directory for a complete sample app.
Responses : #
Sucess Response:
all data about payment done in json string format
Error Response:
cancelled by user: {"Error":"Payment Cancelled"}
Gateway Errors: {"Error":"ssl error","responseCode":"500"}