tolu360 / cordova-plugin-paystack

This plugin allows to add Paystack Payments to your application using Paystack Native Mobile SDKs for Android & iOS
Other
34 stars 16 forks source link

No Public key found, please set the Public key #13

Closed solomom399 closed 6 years ago

solomom399 commented 6 years ago

Please help me, i'm getting the response "No Public key found, please set the Public key" from cordova-plugin-paystack...i'm using a test mode Public key. I'll appreciate any idea of how to make it work successfully.

Thanks.

tolu360 commented 6 years ago

First off, ensure you are testing on an Android emulator/ iOS simulator - never in a web browser.

On which platform are you having this issue? Which version of the plugin are you working it? Did you remember to build (run cordova build android/ios) again after configuring your config.xml?

Cheers

solomom399 commented 6 years ago

Good day @tolu360, i'm actually testing the app on an android phone and i'm using the current version.

Thanks.

tolu360 commented 6 years ago

You should be fine Solomon, can't say why you are not.

For the version I asked earlier, I need you to supply actual version numbers - add your cordova version number in as well.

And after you run the build command, look in /platforms/android/AndroidManifest.xml, within the application tag, do you see the exact same line you added in your config.xml - a line like below?

<meta-data android:name="co.paystack.android.PublicKey" android:value="pk_test_aa65a1064hfhdjjdkdkdkdkeueyeyejek" />

If you see that line after running the build command, you shouldn't have that error.

NP: Don't manually edit that file - your changes get overwritten each time you build your app.

solomom399 commented 6 years ago

I'm building with the latest phonegap build https://build.phonegap.com...i checked the app AndroidManifest.xml on my phone but there's nothing like the code below in it

I'll appreciate any code example to guild me through.

Thank you so much sir for your support.

solomom399 commented 6 years ago

Here is the response from the app

img_20170928_113729_315

tolu360 commented 6 years ago

Hey, I don't know if PhoneGap Build service now supports Cordova build hooks (this plugin uses build hooks) - if it does not, that would break the plugin unless you can figure out a way to add the meta-data tag above to your app AndroidManifest.xml.

Unfortunately, I can't help any further. You can always try to set up and build on your local machine though. All the best

solomom399 commented 6 years ago

Ok sir, thanks so much.

tolu360 commented 6 years ago

U welcome, not a problem.