Closed Hussain-AlBayyat closed 2 years ago
GoSellSdkFlutter.configureApp( bundleId: "YOUR_BUNDLE_ID", productionSecreteKey:"YOUR_PRODUCTION_SECRETE_KEY", // if you don't have keep it empty sandBoxsecretKey: "YOUR_SANDBOX_SECRETE_KEY", lang: "en"); }
GoSellSdkFlutter.configureApp( bundleId: Platform.isAndroid? "YOUR_ANNDROID_BUNDLE_ID":"YOUR_iOS_BUNDLE_ID", productionSecreteKey: Platform.isAndroid? "YOUR_ANDROID_PRODUCTION_KEY":"YOUR_iOS_PRODUCTION_KEY", // pass empty string if not exist sandBoxsecretKey: Platform.isAndroid? "YOUR_ANDROID_SANDBOX_KEY":"YOUR_iOS_SANDBOX_KEY", lang: "en"); }
I have made sure that the sandbox secrete_key is correct as well as bundleID.
However, according to your code:
if (appCredentials["production_secrete_key"] == "" || appCredentials["production_secrete_key"] == "null" || appCredentials["production_secrete_key"] == null) { _prepareConfigurationsErrorMap( errorCode: ERROR_CODE_INVALID_APP_CONFIGURATION, errorMsg: 'Invalid secrete Key', errorDescription: 'Production Secrete key can not empty or null'); return false; }
productionSecreteKey -> Can't be empty.
Another thing:
appCredentials = <String, dynamic>{ "production_secrete_key": productionSecreteKey, "sandbox_secrete_key": sandBoxsecretKey, "bundleID": bundleId, <---------------- "language": lang };
But when you check for the bundleId in here:
if(appCredentials["bundleId"] == "" || appCredentials["bundleId"] == "null" || appCredentials["bundleId"] == null) {}
you are using "bundleId" not "bundleID" as used in appCredentials
Same here:
if (appCredentials["lang"] == "" || appCredentials["lang"] == "null" || appCredentials["lang"] == null) {}
you are using "lang" not "language" as used in appCredentials
Futhermore, I think this line:
if (!_validateSessionArge() || _validateAppConfig()) return _tapSDKResult;
should be:
if (!_validateSessionArge() || !_validateAppConfig()) return _tapSDKResult;
After all this, I am getting same error:
{"errors":[{"code":"2104","description":"Invalid API Key"}]}
Please let me know how to proceed. Thanks
Any updates?
I'm having the same issue, and apart from the fact that the code itself contains many magic strings... the above issue still persists.
Even when cloning your repo and trying your example code, it still gives the issue with the api key.
Edit: Flutter version is 1.22, platform is Android.
I'm having the same issue, and apart from the fact that the code itself contains many magic strings... the above issue still persists.
Even when cloning your repo and trying your example code, it still gives the issue with the api key.
Edit: Flutter version is 1.22, platform is Android.
NVM, there was an issue with the bundle id registered with TAP, issue is resolved.
@Hussain-AlBayyat @6h4n3m You need to contact our support team to register your BundleID and generate the sandbox and production key, so you can be able to use our SDK.
I have contact Tap support team and i face same issue right now @kareemTap
i still have same issue here , any suggestion??
Hello,
I am getting this error
{"errors":[{"code":"2104","description":"Invalid API Key"}]}
Please help