Widget | Mechanism | Support |
PayTabGateway | Native library | ios, android |
PayTabGatewayWeb | Webview | ios, android, web |
Getting started
– Create an PayTab account to use PayTab’s services: https://merchant.paytabs.com/merchant/register
Usage
Follow this steps:
Woocommerce website:
Add PayTabs plugin to your Woocommerce:
- download this plugin at: https://merchant-global.paytabs.com/merchant/developers/plugins/woocommerce
- Go to WordPress Admin > Plugins > Add New from the left-hand menu > Upload plugin from the top menu
- Click on Install to install the plugin
- Config plugin according instructions
- Go to Woocommerce -> Setting -> Tab Payments: only enable Online payments powered by PayTabs ( don’t enable another method of PayTabs )
Open file wp_config.php
in your WordPress installation directory and add snip code below
define('PAYTABS_SERVER_KEY_FOR_MOBILE', 'YOUR_SERVER_MOBILE_KEY');
Noted: Change YOUR_SERVER_MOBILE_KEY
to your key, you can see it in key management page at your PayTab profile
Mobile app:
- Copy paytabs_gateway package and add to packages folder in cirilla project.
- Import package in
cirilla/pubspec.yaml
Example:
paytabs_gateway:
path: ./packages/paytabs_gateway
Then run flutter pub get in your project
- Add PayTabsGateway(native view) or PayTabsGatewayWeb(web view) to
cirilla/lib/payment_method.dart
file ( use only one of them and remember import package like example)
Example:
import 'package:paytabs_gateway/paytabs_gateway.dart';
final Map<String, PaymentBase> methods = {
PayTabsGateway.key: PayTabsGateway(
serverKeyForMobile: "YOUR_SERVER_MOBILE_KEY",
clientKeyForMobile: "YOUR_CLIENT_MOBILE_KEY",
merchantCountryCode: "US"
),
};
Note: when you add PayTabsGateway don’t forget add YOUR_SERVER_MOBILE_KEY
and YOUR_CLIENT_MOBILE_KEY
for mobile( not for web ), you can see it in key management page at your PayTab profile and merchantCountryCode is your country code
Or
import 'package:paytabs_gateway/paytabs_gateway_web.dart';
final Map<String, PaymentBase> methods = {
PayTabsGatewayWeb.key: PayTabsGatewayWeb(),
};
Available Currencies
Country | Available Currencies |
Kingdom of Saudi Arabia | SAR, USD |
UAE | AED, USD, EUR, GBP |
Oman | OMR |
Kuwait | KWD |
Egypt | EGP, USD, EUR, GBP |
Jordan | USD, JOD |
Iraq | USD, IQD |