0 purchases
flutter paytabs bridge emulator
Flutter PayTabs Bridge Emulator #
Flutter PayTabs Bridge Emulator is a wrapper for the native PayTabs Android and iOS SDKs, It helps you integrate with PayTabs payment gateway.
Flutter support:
✅ iOS - 10 or later
✅ Android - 16 or later
Usage #
Installation #
Add flutter_paytabs_bridge_emulator to your package's pubspec.yaml file:
dependencies:
flutter_paytabs_bridge_emulator: ^1.0.11
copied to clipboard
Pay now #
Import flutter_paytabs_bridge_emulator
import 'package:flutter_paytabs_bridge_emulator/flutter_paytabs_bridge_emulator.dart';
copied to clipboard
Pay with PayTabs #
Configure arguments
var args = {
pt_merchant_email: "[email protected]",
pt_secret_key: "BIueZNfPLblJnMmPYARDEoP5x1WqseI3XciX0yNLJ8v7URXTrOw6dmbKn8bQnTUk6ch6L5SudnC8fz2HozNBVZmh7w9uq4Pwg7D1",// Add your Secret Key Here
pt_transaction_title: "Mr. John Doe",
pt_amount: "2.0",
pt_currency_code: "USD",
pt_customer_email: "[email protected]",
pt_customer_phone_number: "+97333109781",
pt_order_id: "1234567",
product_name: "Tomato",
pt_timeout_in_seconds: "300", //Optional
pt_address_billing: "test test",
pt_city_billing: "Juffair",
pt_state_billing: "state",
pt_country_billing: "BHR",
pt_postal_code_billing: "00973", //Put Country Phone code if Postal code not available '00973'//
pt_address_shipping: "test test",
pt_city_shipping: "Juffair",
pt_state_shipping: "state",
pt_country_shipping: "BHR",
pt_postal_code_shipping: "00973", //Put Country Phone code if Postal
pt_color: "#cccccc",
pt_language: 'en', // 'en', 'ar'
pt_tokenization: true,
pt_preauth: false,
pt_merchant_region: 'emirates',
pt_force_validate_shipping: false
};
copied to clipboard
Start calling startPayment method and handle the transaction details
FlutterPaytabsSdk.startPayment(args, (event) {
List<dynamic> eventList = event;
Map firstEvent = eventList.first;
if(firstEvent.keys.first == "EventPreparePaypage") {
// TODO
// Here you can handle prepare events
} else {
// TODO
// Here you can handle transcation details
}
});
copied to clipboard
Pay with Apple Pay #
Configure arguments
var args = {
pt_merchant_email: "[email protected]",
pt_secret_key: "kuTEjyEMhpVSWTwXBSOSeiiDAeMCOdyeuFZKiXAlhzjSKqswUWAgbCaYFivjvYzCWaWJbRszhjZuEQqsUycVzLSyMIaZmhLlRqlp",// Add your Secret Key Here
pt_transaction_title: "Mr. John Doe",
pt_amount: "2.0",
pt_currency_code: "AED",
pt_customer_email: "[email protected]",
pt_order_id: "1234567",
pt_country_code: "AE",
pt_language: 'en',
pt_preauth: false,
pt_merchant_identifier: 'merchant.bundleId'
pt_tokenization: true,
pt_merchant_region: 'emirates',
pt_force_validate_shipping: false
};
copied to clipboard
Start calling startApplePayPayment method and handle the transaction details
FlutterPaytabsSdk.startApplePayPayment(args, (event) {
List<dynamic> eventList = event;
Map firstEvent = eventList.first;
if(firstEvent.keys.first == "EventPreparePaypage") {
// TODO
// Here you can handle prepare events
} else {
// TODO
// Here you can handle transcation details
}
});
copied to clipboard
Supported merchant region #
Pass the parameters pt_merchant_region with one value of the below list according to supported region.
UAE = emirates
Egypt = egypt
Saudi Arabia = saudi
Oman = oman
Jordan = jordan
Global =global
Demo = demo
Prerequisites (iOS) #
Disable the perfect forward secrecy (PFS) only for paytabs.com.
<key>NSAppTransportSecurity</key>
<dict
<key>NSExceptionDomains</key>
<dict>
<key>paytabs.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
copied to clipboard
Demo application #
Check our complete example.
License #
See LICENSE.
Paytabs #
Support | Terms of Use | Privacy Policy
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.