flutter_paytabs_bridge_emulator 1.0.14 copy "flutter_paytabs_bridge_emulator: ^1.0.14" to clipboard
flutter_paytabs_bridge_emulator: ^1.0.14 copied to clipboard

PayTabs plugin, Flutter paytabs plugin is a wrapper for the native PayTabs Android and iOS SDKs, It helps you integrate with PayTabs payment gateway.

pub package

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

Pay now #

Import flutter_paytabs_bridge_emulator

import 'package:flutter_paytabs_bridge_emulator/flutter_paytabs_bridge_emulator.dart';

Pay with PayTabs #

  1. Configure arguments
var args = {
      pt_merchant_email: "test@example.com",
      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: "test@example.com",
      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
    };
  1. 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
    }
    });

Pay with Apple Pay #

  1. Configure arguments
var args = {
  pt_merchant_email: "test@example.com",
  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: "test@example.com",
  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
};
  1. 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
    }
    });

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>

Demo application #

Check our complete example.

License #

See LICENSE.

Paytabs #

Support | Terms of Use | Privacy Policy

6
likes
120
pub points
42%
popularity

Publisher

unverified uploader

PayTabs plugin, Flutter paytabs plugin is a wrapper for the native PayTabs Android and iOS SDKs, It helps you integrate with PayTabs payment gateway.

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_paytabs_bridge_emulator