Giter VIP home page Giter VIP logo

flutter-sdk-bridge's Introduction

Flutter PayTabs Bridge

Version

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

Plugin Support:

  • iOS
  • Android

Installation

dependencies:
   flutter_paytabs_bridge: ^2.6.13

Usage

import 'package:flutter_paytabs_bridge/BaseBillingShippingInfo.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkConfigurationDetails.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkLocale.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkTokenFormat.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkTokeniseType.dart';
import 'package:flutter_paytabs_bridge/flutter_paytabs_bridge.dart';
import 'package:flutter_paytabs_bridge/IOSThemeConfiguration.dart';
import 'package:flutter_paytabs_bridge/PaymentSDKSavedCardInfo.dart';
import 'package:flutter_paytabs_bridge/PaymentSdkTransactionClass.dart';
import 'package:flutter_paytabs_bridge/PaymentSDKQueryConfiguration.dart';

Pay with Card

  1. Configure the billing & shipping info, the shipping info is optional
  var billingDetails = new BillingDetails("billing name", 
    "billing email", 
    "billing phone",
        "address line", 
        "country", 
        "city", 
        "state", 
        "zip code");
        
var shippingDetails = new ShippingDetails("shipping name", 
     "shipping email", 
     "shipping phone",
     "address line", 
     "country", 
     "city", 
     "state", 
     "zip code");
                                              
  1. Create object of PaymentSDKConfiguration and fill it with your credentials and payment details.
 var configuration = PaymentSdkConfigurationDetails(
        profileId: "profile id",
        serverKey: "your server key",
        clientKey: "your client key",
        cartId: "cart id",
        cartDescription: "cart desc",
        merchantName: "merchant name",
        screentTitle: "Pay with Card",
        billingDetails: billingDetails,
        shippingDetails: shippingDetails,
        locale: PaymentSdkLocale.EN, //PaymentSdkLocale.AR or PaymentSdkLocale.DEFAULT 
        amount: "amount in double",
        currencyCode: "Currency code",
        merchantCountryCode: "2 chars iso country code");

Options to show billing and shipping info

	configuration.showBillingInfo = true;
	configuration.showShippingInfo = true;

Options to set expiry timeout for the card payment screen

/** To establish a timeout of 2 minutes.
 * Set to zero to deactivate the timeout feature.
 * Note that the expiryTime cannot be set to less than 60 seconds.
 * */
PaymentSdkConfigurationDetails(...,expiryTime:120);

You have the option to close the payment screen if there are no ongoing transactions.

 FlutterPaytabsBridge.cancelPayment((_) {});
  1. Set merchant logo from the project assets:
  • create 'assets' directory and put the image inside it.
  • be sure you add in the Runner iOS Project in the infor.plist the image usage description. NSPhotoLibraryUsageDescription Get Logo From Assets
  • under flutter section in the pubspec.yaml declare your logo.
flutter:
  assets:
   - assets/logo.png
  • be sure you pass the image path like this:-
var configuration = PaymentSdkConfigurationDetails();
var theme = IOSThemeConfigurations();
theme.logoImage = "assets/logo.png";
configuration.iOSThemeConfigurations = theme;

1-Pay with Card

Start payment by calling startCardPayment method and handle the transaction details

FlutterPaytabsBridge.startCardPayment(configuration, (event) {
      setState(() {
        if (event["status"] == "success") {
          // Handle transaction details here.
          var transactionDetails = event["data"];
          print(transactionDetails);
          
          if (transactionDetails["isSuccess"]) {
            print("successful transaction");
          } else {
            print("failed transaction");
          }
        } else if (event["status"] == "error") {
          // Handle error here.
        } else if (event["status"] == "event") {
          // Handle cancel events here.
        }
      });
    });
     

card

2-Pay with Token

To enable tokenization please follow the below instructions.

 // to request token and transaction reference pass tokeniseType and Format
 tokeniseType: PaymentSdkTokeniseType.MERCHANT_MANDATORY,
 tokenFormat: PaymentSdkTokenFormat.AlphaNum20Format,

 // you will receive token and reference after the first transaction       
 // to pass the token and transaction reference returned from sdk 
 token: "token returned from the last trx",
 transactionReference: "last trx reference returned",

Then payment by calling startTokenizedCardPayment method and handle the transaction details

FlutterPaytabsBridge.startTokenizedCardPayment(configuration, "Token", "TransactionReference", (event) {
      setState(() {
        if (event["status"] == "success") {
          // Handle transaction details here.
          var transactionDetails = event["data"];
          print(transactionDetails);
          
          if (transactionDetails["isSuccess"]) {
            print("successful transaction");
          } else {
            print("failed transaction");
          }
        } else if (event["status"] == "error") {
          // Handle error here.
        } else if (event["status"] == "event") {
          // Handle cancel events here.
        }
      });
    });
     

3-Pay with 3ds secure Token

Start payment by calling start3DSecureTokenizedCardPayment method and handle the transaction details

var savedCardInfo = PaymentSDKSavedCardInfo("Card Mask", "card type");
FlutterPaytabsBridge.start3DSecureTokenizedCardPayment(configuration, savedCardInfo, "Token", (event) {
      setState(() {
        if (event["status"] == "success") {
          // Handle transaction details here.
          var transactionDetails = event["data"];
          print(transactionDetails);
          
          if (transactionDetails["isSuccess"]) {
            print("successful transaction");
          } else {
            print("failed transaction");
          }
        } else if (event["status"] == "error") {
          // Handle error here.
        } else if (event["status"] == "event") {
          // Handle cancel events here.
        }
      });
    });
     

rec 3ds

4-Pay with Saved Card

Start payment by calling startPaymentWithSavedCards method and handle the transaction details

FlutterPaytabsBridge.startPaymentWithSavedCards(configuration, support3DsBoolean, (event) {
      setState(() {
        if (event["status"] == "success") {
          // Handle transaction details here.
          var transactionDetails = event["data"];
          print(transactionDetails);
          
          if (transactionDetails["isSuccess"]) {
            print("successful transaction");
          } else {
            print("failed transaction");
          }
        } else if (event["status"] == "error") {
          // Handle error here.
        } else if (event["status"] == "event") {
          // Handle cancel events here.
        }
      });
    });
     

rec 3ds

Pay with Apple Pay

  1. Follow the guide Steps to configure Apple Pay to learn how to configure ApplePay with PayTabs.

  2. Do the steps 1 and 2 from Pay with Card although you can ignore Billing & Shipping details and Apple Pay will handle it, also you must pass the merchant name and merchant identifier.

 var configuration = PaymentSdkConfigurationDetails(
        profileId: "profile id",
        serverKey: "your server key",
        clientKey: "your client key",
        cartId: "cart id",
        cartDescription: "cart desc",
        merchantName: "merchant name",
        screentTitle: "Pay with Card",
        locale: PaymentSdkLocale.AR, //PaymentSdkLocale.EN or PaymentSdkLocale.DEFAULT 
        amount: "amount in double",
        currencyCode: "Currency code",
        merchantCountryCode: "2 chars iso country code",
        merchantApplePayIndentifier: "merchant.com.bundleID",
        linkBillingNameWithCardHolderName: true
        );
  1. To simplify ApplePay validation on all user's billing info, pass simplifyApplePayValidation parameter in the configuration with true.
configuration.simplifyApplePayValidation = true;
  1. Call startApplePayPayment to start payment
FlutterPaytabsBridge.startApplePayPayment(configuration, (event) {
      setState(() {
        setState(() {
        if (event["status"] == "success") {
          // Handle transaction details here.
          var transactionDetails = event["data"];
          print(transactionDetails);
        } else if (event["status"] == "error") {
          // Handle error here.
        } else if (event["status"] == "event") {
          // Handle cancel events here.
        }
      });
      });
    });

Pay with Samsung Pay

Pass Samsung Pay token to the configuration and call startSamsungPayPayment

configuration.samsungToken = "{Json token returned from the samsung pay payment}"

Pay with Alternative Payment Methods

It becomes easy to integrate with other payment methods in your region like STCPay, OmanNet, KNet, Valu, Fawry, UnionPay, and Meeza, to serve a large sector of customers.

  1. Do the steps 1 and 2 from Pay with Card
  2. Choose one or more of the payment methods you want to support, check the available APMs in the enum section.
 List<PaymentSdkAPms> apms = [];
 apms.add(PaymentSdkAPms.STC_PAY);
 
 var configuration = PaymentSdkConfigurationDetails(
     * Your configuration *
     alternativePaymentMethods: apms); // add the Payment Methods here
  1. Call startAlternativePaymentMethod to start payment
FlutterPaytabsBridge.startAlternativePaymentMethod(await generateConfig(),

        (event) {

      setState(() {

        if (event["status"] == "success") {

          // Handle transaction details here.

          var transactionDetails = event["data"];

          print(transactionDetails);

        } else if (event["status"] == "error") {

          // Handle error here.

        } else if (event["status"] == "event") {

          // Handle cancel events here.

        }

      });

    });
    

Discounts

You can add discounts to the payment by passing the discount amount and the discount type to the configuration.

 configuration.cardDiscounts = [
      PaymentSDKCardDiscount(
          discountCards: ["4111"],
          discountValue: 50,
          discountTitle: "50% discount on cards starting with 4111",
          isPercentage: true),
      PaymentSDKCardDiscount(
          discountCards: ["4000", "41111"],
          discountValue: 2,
          discountTitle: "2 EGP discount on cards starting with 4000 and 41111",
          isPercentage: false)
    ];

Clear saved cards

You can clear the saved cards using the following method call.

FlutterPaytabsBridge.clearSavedCards()

Query transaction

You can check the status of a transaction

1- first create PaymentSDKQueryConfiguration

var queryConfig = PaymentSDKQueryConfiguration(
    "ServerKey",
    "ClientKey",
    "Country Iso 2",
    "Profile Id",
    "Transaction Reference"
);

2- Call QuerySdkActivity.queryTransaction and pass the needed arguments

FlutterPaytabsBridge.queryTransaction(
    generateConfig(), queryConfig,
    (event) {
        setState(() {
            if (event["status"] == "success") {
                // Handle transaction details here.
                var transactionDetails = event["data"];
                print(transactionDetails);
            } else if (event["status"] == "error") {
                // Handle error here.
            } else if (event["status"] == "event") {
                // Handle cancel events here.
            }
        });
    });

Handling Transaction response

you can use event["data"]["isSuccess"] to ensure a successful transaction ..

if the transaction is not successful you should check for the corresponding failure code you will receive the code in responseCode .. all codes can be found in Payment Response Codes

Link billing name with card holder name

By default, the billing name is linked with card holder name, if you set its flag to false the billing name and the card holder name will be seperated

 var configuration = PaymentSdkConfigurationDetails(
        ...
        ...
        linkBillingNameWithCardHolderName: true
        );

Customize the Theme:

UI guide

iOS Theme

Use the following guide to cusomize the colors, font, and logo by configuring the theme and pass it to the payment configuration.

	var theme = IOSThemeConfigurations();
	theme.backgroundColor = "e0556e"; // Color hex value
	theme.backgroundColorDark = "520f3a"; // Dark Mode Color hex value
	configuration.iOSThemeConfigurations = theme;

Android Theme

Use the following guide to customize the colors, font, and logo by configuring the theme and pass it to the payment configuration.

# edit file
android/src/main/res/values/colors.xml
<resources>
    // to override colors
    <color name="payment_sdk_primary_color">#000000</color>
    <color name="payment_sdk_secondary_color">#1B1B1B</color>
    <color name="payment_sdk_background_color">#292929</color>
    <color name="payment_sdk_button_background_color">#45444A</color>
    <color name="payment_sdk_input_field_background_color">#8E8E8D</color>
    <color name="payment_sdk_stroke_color">#90918F</color>

    <color name="payment_sdk_title_text_color">#FFFFFF</color>

    <color name="payment_sdk_primary_font_color">#FFFFFF</color>
    <color name="payment_sdk_secondary_font_color">#0094F1</color>
    <color name="payment_sdk_button_text_color">#FFF</color>
    <color name="payment_sdk_hint_font_color">#D8D8D8</color>
    <color name="payment_sdk_error_text_color">#650303</color>

    // to override dimens
    <dimen name="payment_sdk_primary_font_size">17sp</dimen>
    <dimen name="payment_sdk_secondary_font_size">15sp</dimen>
    <dimen name="payment_sdk_separator_thickness">1dp</dimen>
    <dimen name="payment_sdk_stroke_thickness">.5dp</dimen>
    <dimen name="payment_sdk_input_corner_radius">8dp</dimen>
    <dimen name="payment_sdk_button_corner_radius">8dp</dimen>

</resources>

-- Override strings To override string you can find the keys with the default values here English, Arabic.

Enums

Those enums will help you in customizing your configuration.

  • Tokenise types

The default type is none

enum PaymentSdkTokeniseType {
  NONE,
  USER_OPTIONAL,
  USER_MANDATORY,
  MERCHANT_MANDATORY,
  USER_OPTIONAL_DEFAULT_ON
}
configuration.tokeniseType = PaymentSdkTokeniseType.USER_OPTIONAL;
  • Token formats

The default format is hex32

enum PaymentSdkTokenFormat {
  Hex32Format,
  NoneFormat,
  AlphaNum20Format,
  Digit22Format,
  Digit16Format,
  AlphaNum32Format
}
  • Transaction Type

The default type is PaymentSdkTransactionType.SALE

enum PaymentSdkTransactionType {
  SALE,
  AUTH
}
configuration.tokenFormat = PaymentSdkTokenFormat.Hex32Format
  • Alternative Payment Methods
enum PaymentSdkAPms {
  UNION_PAY,
  STC_PAY,
  VALU,
  MEEZA_QR,
  OMAN_NET,
  KNET_CREDIT,
  FAWRY,
  KNET_DEBIT,
  URPAY,
  AMAN,
  SAMSUNG_PAY,
  APPLE_PAY,
  SOUHOOLA,
  TABBY
}

Demo application

Check our complete example here https://github.com/paytabscom/flutter-sdk-bridge/tree/master/example.

License

See LICENSE.

Paytabs

Support | Terms of Use | Privacy Policy

flutter-sdk-bridge's People

Contributors

adlypaytabs avatar amr-magdy-pt avatar khader-1 avatar khaledalramam avatar mohamedkhairy953 avatar muhamedadly avatar muhammadalkady avatar mustafaanan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-sdk-bridge's Issues

Error: Request must be in json format with content type application/json

I/System.out(18856): payment_sdk_Logs : {"callback":"none","card_details":{"cvv":"---","expiry_month":2,"expiry_year":2027,"pan":"54983838********"},"cart_amount":20.0,"cart_currency":"SAR","cart_description":"Flowers","cart_id":"12433","customer_details":{"city":"jeddah","country":"sa","email":"[email protected]","ip":"255.255.255.255","name":"John Smithes","phone":"0522222222","state":"jeddah","street1":"st. 12","zip":"12345"},"paypage_lang":"DEFAULT","profile_id":"-----","return":"https://ptsdk-return.paytabs.com/----------","shipping_details":{"city":"jeddah","country":"sa","email":"[email protected]","ip":"","name":"John Smith","phone":"0522222222","state":"jeddah","street1":"st. 12","zip":"12345"},"tran_class":"recurring","tran_type":"sale","device_info":{"device_id":"","app_id":"com.example.payments","platform":"Android","brand":"samsung","model":"SM-M515F","carrier":"","os":"12","version":"12","app_version":"1.0.0","sdk_version":"6.2.10","timestamp":"1654420211918","screen_width":"1080","screen_height":"2400","app_lang":"en","device_lang":"en","connection":"wifi"}}

ReadMe has typos

image

must be updated to ->
Also the guide is kind of misleading the file that you should update to override the theme is not specified.

How Can I found pt_secret_key

Hi, dear Developers, I want to thank you for this plugin.
My question how to get pt_secret_key: from the Pay Tabs dashboard after registration I generate secret key and server key but pt_secret_key: not found, how can I get it.

@mohamedkhairy953
@mustafaanan

When locale is AR the first focused input is card number

When calling startCardPayment while locale is EN the first field "Name on card" has the focus, but if locale is AR the focus is with the card number field instead and the user has to tap the name on card field to fill it.

Can't build ios build

When trying to create ios build i found this issue

Swift Compiler Error (Xcode): No such module '_StringProcessing'
/Users/amerelsayed/work/FreeLancing/flutter_wechat/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/PayTabsSDK/PaymentSDK.framework/Modules/PaymentSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface:17:7

Swift Compiler Error (Xcode): Failed to build module 'PaymentSDK'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)'). Please select a toolchain which matches the SDK.
/Users/amerelsayed/.pub-cache/hosted/pub.dev/flutter_paytabs_bridge-2.3.4/ios/Classes/SwiftFlutterPaytabsBridgePlugin.swift:2:7

Uncategorized (Xcode): Command EmitSwiftModule failed with a nonzero exit code

Getting error after add flutter_paytabs_bridge on flutter version 2.2.3

i am getting error when add the pulgin in the project
Note: C:\Users\admin\flutter.pub-cache\hosted\pub.dartlang.org\flutter_paytabs_bridge-2.1.5\android\src\main\java\com\paytabs\flutter_paytabs_bridge\FlutterPaytabsBridgePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugNativeLibs'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
More than one file was found with OS independent path 'lib/x86/libc++_shared.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 38s
Exception: Gradle task assembleDebug failed with exit code 1

Authentication failed

I am getting this error many times even check all the parameters.

{trace: PMNT0101.6620B596.00009E69, code: 1, message: Authentication failed. Check authentication header., status: error}

can't initiate any payment

I'm trying to initiate a payment with test SDK credentials but i keep getting this issue:


- D/FirebasePerformance( 9015): Fetched value: 'true' for key: 'fpr_enabled' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: '' for key: 'fpr_disabled_android_versions' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: 'true' for key: 'fpr_enabled' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: '' for key: 'fpr_disabled_android_versions' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: 'true' for key: 'fpr_enabled' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: '' for key: 'fpr_disabled_android_versions' from Firebase Remote Config.
- D/EGL_emulation( 9015): app_time_stats: avg=1233.54ms min=1233.54ms max=1233.54ms count=1
- D/FirebasePerformance( 9015): Screen trace: _st_PaymentSdkActivity _fr_tot:0 _fr_slo:0 _fr_fzn:0
- D/EGL_emulation( 9015): app_time_stats: avg=79315.16ms min=79315.16ms max=79315.16ms count=1
- D/FirebasePerformance( 9015): Fetched value: 'true' for key: 'fpr_enabled' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: '' for key: 'fpr_disabled_android_versions' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: 'true' for key: 'fpr_enabled' from Firebase Remote Config.
- D/FirebasePerformance( 9015): Fetched value: '' for key: 'fpr_disabled_android_versions' from Firebase Remote Config.
- W/FirebasePerformance( 9015): non-positive totalFrames in screen trace _st_PaymentSdkActivity
- W/FirebasePerformance( 9015): Invalid Trace:_st_PaymentSdkActivity
- W/FirebasePerformance( 9015): Unable to process the PerfMetric (trace metric: _st_PaymentSdkActivity (duration: 57.425ms)) due to missing or invalid values. See earlier log statements for additional information on the specific missing/invalid values.

this is my configs:

 
        var billingDetails = new BillingDetails("billing name",
                      "[email protected]",
                      "+962777777777",
                      "address line",
                      "Jordan",
                      "Amman",
                      "Amman",
                      "11941");

                  var shippingDetails = new ShippingDetails("shipping name",
                      "[email protected]",
                      "+96277777777",
                      "address line",
                      "Jordan",
                      "Amman",
                      "Amman",
                      "11941");
                  var configuration = PaymentSdkConfigurationDetails(
                      profileId: "~~~~~~~~~~",
                      serverKey: "~~~~~~~~~",
                      clientKey: "~~~~~~~~~",
                      tokeniseType: PaymentSdkTokeniseType.MERCHANT_MANDATORY,

                      tokenFormat: PaymentSdkTokenFormat.AlphaNum20Format,
                      merchantName: "PadelMe Club International",
                      screentTitle: "Pay with Card",
                      cartDescription: "padel shop",
                      billingDetails: billingDetails,
                      shippingDetails: shippingDetails,
                      showBillingInfo: false,
                      showShippingInfo: false,
                      transactionType: PaymentSdkTransactionType.SALE,
                      transactionClass: PaymentSdkTransactionClass.ECOM,
                      isDigitalProduct: false,cartId: "123",
                      linkBillingNameWithCardHolderName: true,
                      forceShippingInfo: false,

                      locale: PaymentSdkLocale.EN, //PaymentSdkLocale.AR or PaymentSdkLocale.DEFAULT
                      amount: 599.0,
                      currencyCode: "JOD",
                      merchantCountryCode: "JO");

 

flutter version 3.13.5
PayTabs Flutter package: 2.6.0

Allow billing address to be null for digital products like hosted page

The hosted page settings in dashboard allows an option "Digital Products Mode" which turns off both billing address and shipping address completely. This needs to be replicated for mobile SDK and flutter bridge. Currently billing address is mandatory and there is no option to remove it for digital products. Moreover shipping address is required for ValU.

Clicked on scan card icon and app crashed on android

When I go to pay tabs and click on the scan card icon the app crashes and gives back this error message:
P.s. I have replaced my app application name with the variable => ${package}

D/AndroidRuntime(21829): Shutting down VM
E/AndroidRuntime(21829): FATAL EXCEPTION: main
E/AndroidRuntime(21829): Process: ${package}, PID: 21829
E/AndroidRuntime(21829): java.lang.RuntimeException: Unable to start activity ComponentInfo{${package}/com.paytabs.paytabscardrecognizer.cards.pay.paycardsrecognizer.sdk.ui.ScanCardActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(21829): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3835)
E/AndroidRuntime(21829): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4011)
E/AndroidRuntime(21829): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
E/AndroidRuntime(21829): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(21829): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(21829): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
E/AndroidRuntime(21829): 	at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(21829): 	at android.os.Looper.loop(Looper.java:246)
E/AndroidRuntime(21829): 	at android.app.ActivityThread.main(ActivityThread.java:8633)
E/AndroidRuntime(21829): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(21829): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/AndroidRuntime(21829): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/AndroidRuntime(21829): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(21829): 	at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:852)
E/AndroidRuntime(21829): 	at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:815)
E/AndroidRuntime(21829): 	at androidx.appcompat.app.AppCompatDelegateImpl.onPostCreate(AppCompatDelegateImpl.java:536)
E/AndroidRuntime(21829): 	at com.paytabs.paytabscardrecognizer.cards.pay.paycardsrecognizer.sdk.ui.ScanCardActivity.onCreate(ScanCardActivity.java:30)
E/AndroidRuntime(21829): 	at android.app.Activity.performCreate(Activity.java:8207)
E/AndroidRuntime(21829): 	at android.app.Activity.performCreate(Activity.java:8191)
E/AndroidRuntime(21829): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
E/AndroidRuntime(21829): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3808)
E/AndroidRuntime(21829): 	... 11 more
I/Process (21829): Sending signal. PID: 21829 SIG: 9
Lost connection to device.

I have had a look at the themes in my android/app/src/main/AndroidManifest.xml as well as android/app/src/main/res/values/styles.xml: Here are the files

android/app/src/main/AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="****************">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
   <application
        android:label="****************"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user0..0.0
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
       <activity
           android:name="com.yalantis.ucrop.UCropActivity"
           android:screenOrientation="portrait"
           android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>

android/app/src/main/res/values/styles.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             the Flutter engine draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
    <!-- Theme applied to the Android Window as soon as the process has started.
         This theme determines the color of the Android Window while your
         Flutter UI initializes, as well as behind your Flutter UI while its
         running.

         This Theme is only used starting with V2 of Flutter's Android embedding. -->
    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
        <item name="android:windowBackground">?android:colorBackground</item>
    </style>
</resources>

android/app/src/main/res/values-night/styles.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <!-- Show a splash screen on the activity. Automatically removed when
             the Flutter engine draws its first frame -->
        <item name="android:windowBackground">@drawable/launch_background</item>
    </style>
    <!-- Theme applied to the Android Window as soon as the process has started.
         This theme determines the color of the Android Window while your
         Flutter UI initializes, as well as behind your Flutter UI while its
         running.

         This Theme is only used starting with V2 of Flutter's Android embedding. -->
    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
        <item name="android:windowBackground">?android:colorBackground</item>
    </style>
</resources>

All I know is that it has something to do with the theme but I cant figure out what the problem is, please help.

Direct local .aar file dependencies are not supported when building an AAR.

What went wrong:
Execution failed for task ':flutter_paytabs_bridge_emulator:bundleDebugAar'.

Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :flutter_paytabs_bridge_emulator project caused this error: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_paytabs_bridge_emulator-1.0.8\android\paytabs_sdk\paytabs_sdk.aar

Paytabs it is giving “Duplicate Request” Error

We are Paytabs payment-gateway, while test credentials, it worked pretty well,

We are Paytabs payment-gateway, (flutter-sdk-bridge) while using test credentials, it worked pretty well,

but on LIVE account of Paytabs it is giving “Duplicate Request” Error

{trace: PMNT0201.663851C3.00064259, code: 4, message: Duplicate Request, status: error}

app dosn't run when add plugins in dependencies

After add plugins in dependencies flutter project not run and give below error

ERROR:/Users/amir/.gradle/caches/transforms-3/f59d0fe8a4989db0778358dd7ee2dcf1/transformed/lifecycle-livedata-core-2.8.0-runtime.jar: D8: java.lang.NullPointerException

Unable to test apple pay in Egypt (or any region not supported by apple pay)

Minimal reproduceable code
TextButton( onPressed: _applePay, child: 'Pay'.toSubTitle(), ),

final configuration = PaymentSdkConfigurationDetails(profileId: ApiConstants.profileId,serverKey: ApiConstants.serverKey, clientKey: ApiConstants.clientKey, cartId: "11", cartDescription: "cart desc", merchantName: "someString", merchantName: "someString", screentTitle: "Pay with Card", locale: context.isArabic ? PaymentSdkLocale.AR : PaymentSdkLocale.EN, amount: 1.0, currencyCode: 'SAR', merchantCountryCode: "SA", merchantApplePayIndentifier: 'validMerchantIdentifier' , linkBillingNameWithCardHolderName: true,

void _applePay(){ FlutterPaytabsBridge.startApplePayPayment(configuration , (_){}); }

when clicking on the button on iOS simulator nothing happens, but when clicking on my real device, it open apple wallet app but I am unable to add my credit card as apple pay is not supported in my country yet, I tried changing region to united states, I am able to enter my credit card info, it is still refused as my bank blocked it

Attempt to present which is already presenting <PKPaymentAuthorizationViewController: 0x11e1f6a50>

Hi team

I'm trying to use the package to enable Apple Pay in our flutter app. Most of the time it works great, but usually an issue comes up where the Apple Pay dialogue is not presented, and the following error message is shown in the debug terminal:

Attempt to present <PKPaymentAuthorizationViewController: 0x12f0a2aa0> on <FlutterViewController: 0x109824400> (from <FlutterViewController: 0x109824400>) which is already presenting <PKPaymentAuthorizationViewController: 0x11e1f6a50>.

Is there a quick fix that we can use to force the view controller to close and re-open again?

Thanks

I can make the payment only once, I need to close the application to do it again.

If the user pays for the first time the payment works and it takes the user to the next screen, but if the user go through this process again the app only charges the user the amount but it shows an error and doesn't go to the next screen:

EROOR:
[VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: setState() called after dispose(): _BodyState#91ce6(lifecycle state: defunct, not mounted) This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback. The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree. This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().

I tried adding dispose() but it did nothing,
Also I tried adding if(mounted): The problem with this is it doesn't tell me if the payment was successful or not, it charges the user the amount without doing anything

Authentication Failed. Check authentication header

I am having the issue on PAY NOW.

Error says: Authentication Failed. Check authentication header

Following is the issue:

payment_sdk_Logs : {"callback":"none","card_details":{"cvv":"","expiry_month":11,"expiry_year":2023,"pan":"4649*****1892"},"cart_amount":1.0,"cart_currency":"AED","cart_description":"Flowers","cart_id":"12433","customer_details":{"city":"dubai","country":"ae","email":"[email protected]","ip":"255.255.255.255","name":"Hafiz Muhammad Mujahid","phone":"+923028845163","state":"dubai","street1":"st. 12","zip":"12345"},"paypage_lang":"DEFAULT","profile_id":"94851","return":"https://ptsdk-return.paytabs.com/1652086831726","tran_class":"ecom","tran_type":"sale","device_info":{"device_id":"","app_id":"com.geekybugs.laparlour","platform":"Android","brand":"Xiaomi","model":"Mi Note 10 Lite","carrier":"","os":"11","version":"11","app_version":"1.0.0","sdk_version":"6.2.10","timestamp":"1652086964293","screen_width":"1080","screen_height":"2340","app_lang":"en","device_lang":"en","connection":"wifi"}}

Payment screen not opening

I'm trying to integrate flutter_paytabs_bridge: ^2.0.1-beta into my Flutter app.

I added the config parameters as described in the documentation, but when I try to start the payment nothing happens in the app!

P.S.

  • The library requested phone permissions
  • I'm running on Android 10
  • These lines get printed in the terminal

I/System.out( 728): PaymentSdkFragment onCreateView: PaymentSdkConfigurationDetails(profileId=63854, serverKey=****-****-****, clientKey=****-****-****-****, billingDetails=PaymentSdkBillingDetails(city=city, countryCode=country, email=billing email, name=billing name, phone=billing phone, state=state, addressLine=address line, zip=zip code), shippingDetails=com.payment.paymentsdk.integrationmodels.PaymentSdkShippingDetails@726ec3a, locale=AR, cartId=25, currencyCode=SAR, cartDescription=cart desc, transactionType=sale, transactionClass=ecom, amount=20.0, screenTitle=Pay with Card, customerIp=255.255.255.255, tokeniseType=NONE, tokenFormat=null, token=, transactionReference=, logo=null, showBillingInfo=false, showShippingInfo=false, forceShippingInfoValidation=false, merchantCountry=SA, hideCardScanner=false) D/ForceDarkHelper( 728): updateByCheckExcludeList: pkg: com.rqwah.user activity: com.payment.paymentsdk.PaymentSdkActivity@31a32e7

Thanks in advance!

Request must be in JSON format with content type application/json

Hello again!

I'm trying to submit a test payment (using the test cards provided in Paytabs documentation) but whenever I hit the 'Pay Now' button a toast is being displayed with the message (Request must be in JSON format with content-type application/json).

Could you please resolve the issue asap?

Library version: flutter_paytabs_bridge: ^2.0.3-beta

Primary Font Color does not change in Ios.

I am using flutter_paytabs_bridge: ^2.1.1 as my project is old and other packages in my project do not support null safety. I can not change the primary font color in IOS. Whatever the value i give the color remains the same

ApplePay Show [General] Connection to remote alert view service failed

When I try to pay with ApplePay it shows the following error:

[General] Connection to remote alert view service failed

ApplePay is Active on PayTabs:
paytabs_applepay

Also, Apple Pay works on the website but not on the app

startApplePayPayment method:

FlutterPaytabsBridge.startApplePayPayment(configuration, (event) {

        if (event["status"] == "success") {
          successPayment();
        } else if (event["status"] == "error") {
          // Handle error here.
          _Result =  'An Error Has Occurred, Please try again later';
        } else if (event["status"] == "event") {
          // Handle events here.
          _Result = "Something went wrong";
        }
    });

Note: I removed setState because it shows another error #10

Invalid Merchant Token

Got an Invalid Merchant token while making a payment. The status code is 209. Is there any solution?

App crashes in release mode

After cloning the example project and building the apk using flutter build apk command the app crashed.

Steps to reproduce
1- Clone the example project
2- Run flutter build apk
3- Open the app and click the Pay with PayTabs

PaymentSdkTransactionType doesn't have all cases

the REGISTER case is not available in the Enum of
`enum PaymentSdkTransactionType { SALE, AUTH }

extension PaymentSdkTransactionTypeExtension on PaymentSdkTransactionType {
String get name {
switch (this) {
case PaymentSdkTransactionType.AUTH:
return "auth";

  default:
    return "sale";
}

}
}
`

Authentication failed. Check authentication header

Issue: {message: Authentication failed. Check authentication header., code: 0, status: error}

Payment Type: Card Payment

Payment Body:
{pt_profile_id: 107706, pt_client_key: CMKMVG-M7QQ6T-KDD7KG-6QRBVT, pt_server_key: STJN6T9W9J-JGKDDTK6M2-MMZDDGBNMN, pt_screen_title: Pay with Card, pt_merchant_name: Feni Foodies, pt_amount: 100.0, pt_currency_code: EGP, pt_tokenise_type: merchantMandatory, pt_token_format: null, pt_token: null, pt_transaction_reference: null, pt_cart_id: 12433, pt_cart_description: My Product, pt_merchant_country_code: EG, pt_samsung_pay_token: null, pt_billing_details: {pt_name_billing: Ashek Elahe, pt_email_billing: [email protected], pt_phone_billing: +97311111111, pt_address_billing: Feni, Bangladesh, pt_country_billing: EG, pt_city_billing: dubai, pt_state_billing: dubai, pt_zip_billing: 12345}, pt_shipping_details: {pt_name_shipping: Ashek Elahe, pt_email_shipping: [email protected], pt_phone_shipping: +97311111111, pt_address_shipping: Feni, Bangladesh, pt_country_shipping: EG, pt_city_shipping: dubai, pt_state_shipping: dubai, pt_zip_shipping: 12345}, pt_language: null, pt_show_billing_info: true, pt_show_shipping_info: null, pt_force_validate_shipping: false, pt_ios_theme: {pt_ios_logo: /Users/ashek/Library/Developer/CoreSimulator/Devices/CC8F8181-D3EF-4C82-900F-8DBED495E2A6/data/Containers/Data/Application/B2BEDAF6-8664-45C2-A0CB-2C3DF31782F2/Documents/logo.png, pt_ios_primary_color: null, pt_ios_primary_font_color: null, pt_ios_secondary_color: null, pt_ios_secondary_font_color: null, pt_ios_stroke_color: null, pt_ios_button_color: null, pt_ios_button_font_color: null, pt_ios_title_font_color: null, pt_ios_background_color: null, pt_ios_placeholder_color: null, pt_ios_primary_font: null, pt_ios_secondary_font: null, pt_ios_stroke_thinckness: null, pt_ios_inputs_corner_radius: null, pt_ios_button_font: null, pt_ios_title_font: null}, pt_merchant_id: null, pt_simplify_apple_pay_validation: null, pt_hide_card_scanner: null, pt_transaction_class: null, pt_transaction_type: null, pt_apms: aman, pt_link_billing_name: true}

When add package to pubspec.yaml, project crash while build and return this error

WhatsApp Image 2024-05-25 at 1 01 17 PM

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.4, on Microsoft Windows [Version 10.0.19045.4412], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2023.3)
[√] Connected device (4 available)
[√] Network resources

! Doctor found issues in 1 category.

app crash in android Caused by: java.security.UnrecoverableKeyException: Failed to obtain information about key

the app was working fine in testing but unforsunatly stoped
Process: com.cityart.e_health_doctor, PID: 12453
E/AndroidRuntime(12453): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cityart.e_health_doctor/com.payment.paymentsdk.PaymentSdkActivity}: java.security.KeyStoreException: the master key android-keystore://androidx_security_master_key exists but is unusable
E/AndroidRuntime(12453): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
E/AndroidRuntime(12453): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
E/AndroidRuntime(12453): at android.app.ActivityThread.-wrap11(Unknown Source:0)
E/AndroidRuntime(12453): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
E/AndroidRuntime(12453): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(12453): at android.os.Looper.loop(Looper.java:164)
E/AndroidRuntime(12453): at android.app.ActivityThread.main(ActivityThread.java:6494)
E/AndroidRuntime(12453): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(12453): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/AndroidRuntime(12453): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
E/AndroidRuntime(12453): Caused by: java.security.KeyStoreException: the master key android-keystore://androidx_security_master_key exists but is unusable
E/AndroidRuntime(12453): at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:275)
E/AndroidRuntime(12453): at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:236)
E/AndroidRuntime(12453): at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:123)
E/AndroidRuntime(12453): at c0.a.(Unknown Source:53)
E/AndroidRuntime(12453): at k0.a.(Unknown Source:20)
E/AndroidRuntime(12453): at com.payment.paymentsdk.b.(Unknown Source:19)
E/AndroidRuntime(12453): at com.payment.paymentsdk.c.create(Unknown Source:19)
E/AndroidRuntime(12453): at androidx.lifecycle.ViewModelProvider$Factory$-CC.$default$create(ViewModelProvider.kt:83)
E/AndroidRuntime(12453): at com.payment.paymentsdk.c.create(Unknown Source:0)
E/AndroidRuntime(12453): at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187)
E/AndroidRuntime(12453): at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153)
E/AndroidRuntime(12453): at com.payment.paymentsdk.a$f.a(Unknown Source:38)
E/AndroidRuntime(12453): at com.payment.paymentsdk.a$f.invoke(Unknown Source:0)
E/AndroidRuntime(12453): at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
E/AndroidRuntime(12453): at com.payment.paymentsdk.a.f(Unknown Source:2)
E/AndroidRuntime(12453): at com.payment.paymentsdk.a.onCreateView(Unknown Source:5)
E/AndroidRuntime(12453): at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3104)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:524)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1890)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1808)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1751)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2976)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2886)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:263)
E/AndroidRuntime(12453): at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:351)
E/AndroidRuntime(12453): at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246)
E/AndroidRuntime(12453): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1334)
E/AndroidRuntime(12453): at android.app.Activity.performStart(Activity.java:7029)
E/AndroidRuntime(12453): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2741)
E/AndroidRuntime(12453): ... 9 more
E/AndroidRuntime(12453): Caused by: java.security.UnrecoverableKeyException: Failed to obtain information about key
E/AndroidRuntime(12453): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreSecretKeyFromKeystore(AndroidKeyStoreProvider.java:282)
E/AndroidRuntime(12453): at android.security.keystore.AndroidKeyStoreSpi.engineGetKey(AndroidKeyStoreSpi.java:98)
E/AndroidRuntime(12453): at java.security.KeyStore.getKey(KeyStore.java:1062)
E/AndroidRuntime(12453): at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.(AndroidKeystoreAesGcm.java:58)
E/AndroidRuntime(12453): at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:164)
E/AndroidRuntime(12453): at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:267)
E/AndroidRuntime(12453): ... 38 more
E/AndroidRuntime(12453): Caused by: android.security.KeyStoreException: Unknown error
E/AndroidRuntime(12453): at android.security.KeyStore.getKeyStoreException(KeyStore.java:697)
E/AndroidRuntime(12453): at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreSecretKeyFromKeystore(AndroidKeyStoreProvider.java:283)
E/AndroidRuntime(12453): ... 43 more

No Mada card payment option

i was about to implement Mada card but I see no option in PaymentSdkAPms for Mada card. There is STCpay, UnionPay but no Mada Card.

if there is a way Kindly let me know.

Kindly check screenshot from SDK file
Screenshot 2021-06-28 at 12 43 04 PM

Validation in iOS ?

Why don't you have any validation features for the input data, if a user clicks pay now and some info is missing or incorrect there is no validation or feedback such as a red border around the field with the issue or a pop up.

This is very confusing and not considered a good practice.

Also, the way you have implemented the FlutterPaytabsBridge.startCardPayment method is not convenient as it does not return a future with the payment result.

Thanks,

Apple MetaData Rejected

Hi Dears
My Greetings!!
After finished integrate PayTabs Flutter SDK Payment into my Project, Apple Team make it was pending or Metadata Rejected, The reason this is they required more information about NFC features, I do not have properties or other features using the NFC only ApplePay, And I didn't activate this feature at the moment, Is there any way to make the NFC false or not Active?! To show Apple Team that it is inactive?!
👇👇👇👇 this Snapshot from their message
Screen Shot 2021-09-11 at 10 26 00 AM

Paytab is not allowing me to perform other functions on second payment

Hello when the app is restart the payment and other function after payment working correctly but when i do the second payment after one payment successful and after successful payment the function after one payment work perfectly but when i want to initiate the second payment the second payment is done but the event call back function is not performing the flutter give dispose the timer issue
[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: setState() called after dispose(): _ServiceDetailsScreenState#74407(lifecycle state: defunct, not mounted)
E/flutter (23070): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
E/flutter (23070): The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
E/flutter (23070): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.