Invalid Public Key Passed
please am having issue during payment process, this is what i received
"invalid public key passed"
The api has been returning this error for days now, what is the problem? i am using the live pubkey and secret key from my dashboard.
this.rave.Card.charge(
{
"PBFPubKey":"FLWPUBK-33223e3cd910016924752a8373518225-X",
"cardno": "5438898014560229",
"cvv": "564",
"expirymonth": "10",
"expiryyear": "20",
"currency": "NGN",
"country": "NG",
"amount": "10",
"email": "user#gmail.com",
"phonenumber": "0902620185",
"firstname": "temi",
"lastname": "desola",
"IP": "355426087298442",
"txRef": "MC-" + Date.now(),// your unique merchant reference
"meta": [{ metaname: "flightID", metavalue: "123949494DC" }],
"redirect_url": "https://rave-webhook.herokuapp.com/receivepayment",
"device_fingerprint": "69e6b7f0b72037aa8428b70fbe03986c"
}
).then(resp => {
console.log(resp.body);
this.rave.Card.validate({
"transaction_reference": resp.body.data.flwRef,
"otp": 12345
}).then(response => {
console.log(response.body.data.tx);
console.log(response.body);
})
}).catch(err => {
console.log(err);
})
Step 1 : Get the Flutterwave-Angular-v3 here [https://github.com/Flutterwave/Flutterwave-Angular-v3]
run either of these commands depending on your runtime
environment
npm install flutterwave-angular-v3
or
yarn add flutterwave-angular-v3
step 2 : Import FlutterwaveModule to the app root module i.e. app.module.ts file and declare it in your imports array.
import { FlutterwaveModule } from "flutterwave-angular-v3"
#NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FlutterwaveModule
],
providers: [],
bootstrap: [AppComponent]
})
you have 2 options to either
use in code or use as a component, depending on
the architectural pattern of your application.
the README.md on the link is well explanatory.
step 3 : for the purpose of this question choose
Use in Code, Method 2 (Promise): Async Payment Response
import {Component} from '#angular/core';
import {Flutterwave, AsyncPaymentOptions} from "flutterwave-angular-v3"
(so you are able to get a promise back and do whatever you wish programmatically with your response data)..
Now fire up chrome and test your application, this should work fine on chrome when pay button is clicked prompting up the https://flutterwave.com/ng/ payment page modal,
P:S if you are building Natively (i.e. on device), you might encounter issues, worthy of note is running into an infinite loop when you click on the pay button, and you have a white blank screen that just keeps showing the loading icon.. resolve this by whitelisting https://cordova.apache.org/docs/en/9.x/reference/cordova-plugin-whitelist/ in your Config.xml file .....
Kindly ensure that these configs are included in the config.xml file :
<access origin="*" subdomains="true" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-navigation href="*" />
after this, delete your respective platform build folder and rebuild i.e.
ionic cordova build android
OR
ionic cordova build ios
now serve your project again and start testing, this should work fine on your device or simulator perfectly now. incase you get different error reach out on their forum https://developer.flutterwave.com/discuss, you sure will get an answer within record timing, their Engineers are doing an Amazing job..
if you get this working consider yourself approved the status of Jedi, and please mark this answer.
make sure you go to your dashboard and under settings->API the copy the public key.
Also note that the package was built for ionic 3 and not ionic 4.
you can use this package for ionic 4 [rave ionic 4] (https://www.npmjs.com/package/rave-ionic4).
I updated the current one for ionic 3 to work for ionic 4
Related
I'm implementing Amplify Flutter and want to connect it to our own custom GraphQL endpoint (i.e. non-AppSync). I am however having trouble getting it to work. The official documentation is not super-clear on this (at least not for those of us who are completely new to Amplify). What I have done:
In pubspec.yaml, I’ve added and installed the amplify_api package.
In main.dart, I’ve updated _configureAmplify() to add the AmplifyAPI() plugin.
In amplifyconfiguration.dart, I have manually added the following snippet:
"api": {
"plugins": {
"awsAPIPlugin": {
"xxxxxAPI": {
"endpointType": "GraphQL",
"endpoint": "http://xxxxxxxx.eba-fmuh2afu.eu-north-1.elasticbeanstalk.com/query",
"region": "[REGION]",
"authorizationType": "AMAZON_COGNITO_USER_POOLS"
}
}
}
}
But I keep getting the error "There is no API configured for this plugin with matching endpoint type." What am I doing wrong? (Note: I presume that I don't have to add any "region" value if I'm pointing to our own custom GraphQL endpoint).
I was able to fix this issue by closing the app and uninstalling it, then run again and log in to start fetching API
I integrated vue store front with magento 2, frontend works fine but product images not display in frontend. It throws error Unable to compile TypeScript:\nsrc/image/action/local/index.ts(27,18): error TS2339: Property 'query' does not exist on type 'Request<any, any, any, any>'. imagemagick is also installed and imgurl in local.json is also defined.
Anyone please know about this why error display.
It is about this.req which is typeof Request from express - it has query property. Please make sure you have yarn.lock from the original repo and reinstall dependencies.
If you are using docker, you might need to add:
- './yarn.lock/var/www/yarn.lock'
To volumes section in the docker-compose.nodejs.yml
i have found a simple solution you can try that
copy all your magento 2 pub/media data in vue-storefront-api/var/magento-folder/pub/media
Or
create a symlink if you are working on localhost
vue-storefront-api/config/local.json
"magento2": {
"imgUrl": "http://magento-domain/pub/media/catalog/product",
"assetPath": "/../var/magento-folder/pub/media",
}
vue-storefront/config/local.json
"images": {
"useExactUrlsNoProxy": false,
"baseUrl": "http://localhost:8080/img/",
"useSpecificImagePaths": false,
"paths": {
"product": "/catalog/product"
},
"productPlaceholder": "/assets/placeholder.jpg"
},
run command in vue-storefront and vue-storefront-api
Hello fellow ionic developer,
I use visual studio code (VSC) to develop an ionic 4 application.
Situation:
Usually I emulate an API 19 Android Phone but this has to be builded everytime ionic cordova run android and I can not get it running with the -livereload flag (this takes a lot of time for even little changes). That is when I tried run the app with the cordova plugin for VSC to get a live emulator for debugging and working on my app.
Problemcontext:
I added a database for local storage of patient information. Therefore, I added a seed which provides some patient data and a user. The userlogin works like a charm, during the login I immediatly load all patients for the user. And this is were the problem is:
Apparently, the underlying database / seed is in some old state since I just changed the user values and I can not login with the new seed values.
Unhandled Promise rejection: a statement error callback did not return false: Failed to import SQL; message=sqlite3_prepare_v2 failure: table patient has 14 columns but 27 values were supplied
This is the error that brought me here.
So my question is:
Is there an opportunity to rake/prebuild/... the seed file or where is the seed file located (for using the VSC emulator, since it works on the android studio emulator but also not on the physical device) for the emulator so I can delete or redesign it.
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Android on emulator",
"type": "cordova",
"request": "launch",
"platform": "android",
"target": "emulator",
"port": 8100,
"sourceMaps": true,
"cwd": "${workspaceFolder}",
"ionicLiveReload": true
}
]
}
Thank you in advance
I found a workaround:
//DELETE FOR DEPLOY
this.deleteDatabase("databasename.db");
deleteDatabase(databasename: string)
{
try{
this.sqlite.deleteDatabase(
{
name: databasename,
location: 'default'
}
)
}
catch(error){
console.error(error)
}
}
You should delete the current database and just populate the database again with the new seed.sql
From: https://stackoverflow.com/questions/52033237/how-to-delete-sqlite-database-in-ionic3
I followed all the steps necessary to deploy my create-react-app application (in conjunction with react-router-dom, redux, and react-redux) here, but my app is not displaying anything but the footer.
I went to check out the console, but the console is completely clean of errors. Here is the homepage code I put in my package.json file.
package.json
"name": "flags-of-the-world-redux",
"homepage": "https://bnikkhah.github.io/flags-of-the-world-redux/",
[...],
"scripts": {
[...],
"predeploy": "yarn run build",
"deploy": "gh-pages -d build"
},
Here is my router:
CountryRouter.jsx
export default () => (
<BrowserRouter>
<Switch>
<Route exact={ true } path="/" component={ CountriesPage } />
<Route path="/country/:name" component={ CountryPage } />
<Route path="/compare" component={ CompareCountryList } />
</Switch>
<Footer />
</BrowserRouter>
)
Note: my footer component displays correctly, but anything within the Switch are not displayed on my GitHub page.
Would anyone have any idea what other steps I need to follow in order to successfully deploy my React + Redux app?
Hey guys I decided to go with deploying on Heroku instead. I followed this YouTube video to get me started. If anybody would like to view my app, feel free here!
I've finally got user signed up with this cloud function:
const functions = require('firebase-functions');
const {
dialogflow,
Image,
} = require('actions-on-google')
// Create an app instance
const app = dialogflow()
// Register handlers for Actions SDK intents
app.intent('test', conv => {
conv.ask(new SignIn());
})
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app)
But right after that i'm getting the same error:
TypeError: Cannot read property 'client' of undefined
at Function.<anonymous> (/user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:120:71)
at next (native)
at /user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:22:71
at __awaiter (/user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:18:12)
at Function.handler (/user_code/node_modules/actions-on-google/dist/service/dialogflow/dialogflow.js:84:16)
at Object.<anonymous> (/user_code/node_modules/actions-on-google/dist/assistant.js:55:32)
at next (native)
at /user_code/node_modules/actions-on-google/dist/assistant.js:22:71
at __awaiter (/user_code/node_modules/actions-on-google/dist/assistant.js:18:12)
at standard (/user_code/node_modules/actions-on-google/dist/assistant.js:51:41)
It doesn't even get to the console.log('test'):
const functions = require('firebase-functions');
const {dialogflow} = require('actions-on-google')
// Create an app instance
const app = dialogflow()
// Register handlers for Actions SDK intents
app.intent('test', conv => {
console.log('test')
conv.ask(`response`)
})
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app)
Package.json:
{
"name": "dialogflowFirebaseFulfillment",
"description": "This is the default fulfillment for a Dialogflow agents using Cloud Functions for Firebase",
"version": "0.0.1",
"private": true,
"license": "Apache Version 2.0",
"author": "Google Inc.",
"engines": {
"node": "~6.0"
},
"scripts": {
"start": "firebase serve --only functions:dialogflowFirebaseFulfillment",
"deploy": "firebase deploy --only functions:dialogflowFirebaseFulfillment"
},
"dependencies": {
"actions-on-google": "2.1.3",
"firebase-admin": "5.12.1",
"firebase-functions": "1.0.3",
"dialogflow": "0.5.0",
"dialogflow-fulfillment": "0.4.0"
}
}
goto your action on google app Develop section, goto account linking, expand Google Sign In Client Information you will see Client ID issued by Google to your Actions copy that client id.
when initializing your app in
const app = dialogflow();
pass in an object with your actions on google account linking client id
your code should look like:
const app = dialogflow({
clientId : YOUR_APPS_CLIENT_ID
})
This will fix this issue.
To Get YOUR_APPS_CLIENT_ID, go to actions on google console, on the left nav menu, under advanced options, go to account linking and expand the third card to get your id.
Hope it helps.
Update for September 2019
If you can't find your Client ID (as it was for me, because it seems Google doesn't show it anymore within the "Google Sign In Client Information" card), then go to your Google Cloud Platform console and under APIs and Services menu, open the Credentials screen.
Then scroll to the OAuth 2.0 client IDs section and find "New Actions on Google App". The value in the last column is your Client ID for Actions on Google project.
Here is the screenshot:
I faced this issue when I didnt want to accountlink in a test project of mine, I had left accountlinking on from when I was testing something. When I connected a webhook without any clientID in the code I got the error. All I had to do was clear the accountlink settings from the Google project and then everything was solved.