Giter VIP home page Giter VIP logo

Comments (7)

Aziz-cs avatar Aziz-cs commented on August 27, 2024 1

Yes it worked after getting Mobile SDK keys from customer service, Thank you very much!

from flutter-sdk-bridge.

mohamedkhairy953 avatar mohamedkhairy953 commented on August 27, 2024

Please contact [email protected] to make sure that you're using the valid sdk client and server key.

from flutter-sdk-bridge.

Aziz-cs avatar Aziz-cs commented on August 27, 2024

I am sure that I've copied the right valid keys (Server & Client keys) from this page:
https://merchant.paytabs.com/merchant/developers/keys
And I think this message "Request must be in JSON format with content type application/json" have nothing to deal with the entered client & server keys as long they are strings.
I am testing on Android real device by the way. I think it's a bug.
This is the console log when this message appears:
I/System.out(16488): payment_sdk_Logs : {"callback":"none","card_details":{"cvv":"111","expiry_month":11,"expiry_year":2021,"pan":"4111111111111111"},"cart_amount":42.0,"cart_currency":"AED","cart_description":"Premium membership","cart_id":"12433","customer_details":{"city":"Egypt","country":"eg","email":"[email protected]","ip":"255.255.255.255","name":"Muhammad Aziz","phone":"+01067984002","state":"Cairo","street1":"st. 20","zip":"12345"},"paypage_lang":"EN","profile_id":"57141","return":"https://ptsdk-return.paytabs.com/1634726415191","shipping_details":{"city":"Egypt","country":"eg","email":"[email protected]","ip":"","name":"","phone":"+01067984002","state":"Cairo","street1":"st. 20","zip":"12345"},"tran_class":"ecom","tran_type":"sale","device_info":{"device_id":"","app_id":"com.example.wein","platform":"Android","brand":"Xiaomi","model":"M2007J20CG","carrier":"","os":"11","version":"11","app_version":"1.0.0","sdk_version":"6.1.2","timestamp":"1634726400029","screen_width":"1080","screen_height":"2400","app_lang":"en","device_lang":"ar","connection":"wifi"}} D/CompatibilityChangeReporter(16488): Compat change id reported: 147798919; UID 10410; state: ENABLED

from flutter-sdk-bridge.

Aziz-cs avatar Aziz-cs commented on August 27, 2024
    var configuration = PaymentSdkConfigurationDetails(
      profileId: "*MY PROFILE ID*",
      serverKey: "*MY SERVER KEY*",
      clientKey: "*MY CLIENT KEY*",
      cartId: "12433",
      cartDescription: "Premium membership",
      merchantName: "Biative FZCO",
      screentTitle: "Wein\nPay with credit card",
      billingDetails: billingDetails,
      shippingDetails: shippingDetails,
      amount: amount,
      currencyCode: "AED",
      locale: PaymentSdkLocale.EN,
      merchantCountryCode: "AE",
    );
    return configuration;
  }

Then I call this method:

FlutterPaytabsBridge.startCardPayment(configuration, (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 events here.
        }
      });
    });

When I click (PAY NOW) button after filling details, this message appears "Request must be in JSON format with content type application/json".

from flutter-sdk-bridge.

mohamedkhairy953 avatar mohamedkhairy953 commented on August 27, 2024

from flutter-sdk-bridge.

MuhamedAdly avatar MuhamedAdly commented on August 27, 2024

Dear @Aziz-cs, please contact the customer support team they will add the Mobile SDK keys to your profile.

from flutter-sdk-bridge.

Aziz-cs avatar Aziz-cs commented on August 27, 2024

Ok thanks for your fast response, I've contacted customer support and waiting for them to add the Mobile SDK.
Thanks Mohamed Adly and Mohamed Khairy,

from flutter-sdk-bridge.

Related Issues (20)

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.