Comments (7)
Yes it worked after getting Mobile SDK keys from customer service, Thank you very much!
from flutter-sdk-bridge.
Please contact [email protected] to make sure that you're using the valid sdk client and server key.
from flutter-sdk-bridge.
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.
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.
from flutter-sdk-bridge.
Dear @Aziz-cs, please contact the customer support team they will add the Mobile SDK keys to your profile.
from flutter-sdk-bridge.
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)
- Where to add the call back url? HOT 2
- Authentication Failed. Check authentication header HOT 1
- Error: Request must be in json format with content type application/json HOT 2
- Attempt to present which is already presenting <PKPaymentAuthorizationViewController: 0x11e1f6a50> HOT 2
- Change statusbar background color HOT 1
- [log] {message: Unable to process your request, status: error, code: 0} HOT 1
- When I add the package Getting error in Android release
- app crash in android Caused by: java.security.UnrecoverableKeyException: Failed to obtain information about key
- Clicked on scan card icon and app crashed on android HOT 2
- Primary Font Color does not change in Ios
- Save Card for Future payment button not working. HOT 1
- Can't build ios build HOT 1
- Unable to test apple pay in Egypt (or any region not supported by apple pay)
- Validation in iOS ? HOT 4
- Authentication failed. Check authentication header HOT 9
- 202 - Invalid card security code (CVV) HOT 2
- can't initiate any payment
- Invalid Merchant Token
- How to add STC pay with Card payment and Apple pay
- ReadMe has typos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-sdk-bridge.