paytabscom / flutter-sdk-bridge Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I want to add the call bak url to provide a response to the server side after transaction finishes, as provided in the official documentation.
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.
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}
i got this error despite i use test card with correct cvv
Save Card for Future payment button not working.
we cannot delete that button either.
flutter_paytabs_bridge: ^2.3.4
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.
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!
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().
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}
Hi dear Developers,
what is the deferent between Flutter PayTabs Bridge Emulator and flutter_paytabs_sdk?
what is the best choice For the Flutter mobile app?
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";
}
}
}
`
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
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 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.
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
[!] No podspec found for flutter_clickpay_bridge
in .symlinks/plugins/flutter_clickpay_bridge/ios
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.
Primary Font Color does not change in Ios
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
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
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
I have solved
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"}}
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.
Hi,
the sdk doesn't respond with the same data in the response
e.g "isAuthorized" , "isProcessed"
are missed in the iOS response
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
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
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.
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:
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
And the transaction is shown in API Debug Console-> (developer dashboard) with complete information !!!
Hello, I've followed the steps of the documentation and when I (startCardPayment) and click PAY NOW button, this toast message appears "Request must be in JSON format with content type application/json".
Got an Invalid Merchant token while making a payment. The status code is 209. Is there any solution?
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
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,
passing hideCardScanner: true, not working in android
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
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
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
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}
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
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"}}
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.