I am starting to implementating a RazorPayment Gateway in one of my cordova application. and I am using this
https://github.com/razorpay/razorpay-cordova plugin. According to Razor Docs.
Step1: Payment is created when a user (the customer) fills up and submits the payment information and it is sent to the Razorpay API. : Successfully Implementaed
Step2:Authorized payment Details: Not Done
How can it possible using ajax. kindly tell me. event I completed my first step.
Can anyone share with me any knowledge how can I successfully completed this implementation.
After successful step 1:
you will get a [token] from razorpay.
Send the [token] to your server via ajax and save it in database.
The step 2: is done via the server using their SDK in php, java, etc. using the [token]stored in database.
usually step 2 is done with background jobs by the server.
Hope this helps
Related
Greetings to fellow developers,
I am working on a project where I have to display a functional video call between two users. For reference, I have been following this video https://www.youtube.com/watch?v=v9ngriCV0J0
which has given a step-by-step explanation for establishing a video call between two users.
However, the only issue is that the video is having a Firebase backend. Hence, whenever a caller creates a call model with sender and recipient Ids, the recipient immediately receives the same data and a call is established. Whereas, I am using Node/Express backend (manual API calls for updating fetching data) which makes it extremely difficult to receive the required call data from the receiver's end as soon as the caller sends it to the backend. Also, it will be inefficient to listen for fetching the call data the whole time.
I will be very grateful to all of you if you can help me find a working approach so that the receiver can fetch the required call data as soon as the caller creates it in the backend for establishing a video call from separate devices.
Here's my code
https://pastebin.com/AurJnG27
/***pubspec.yaml dependencies***/
dependencies:
flutter:
sdk: flutter
http: ^0.12.0+2
provider: ^4.3.3
socket_io_client: ^0.9.9
permission_handler: ^3.0.0
agora_rtc_engine: ^1.0.8
/***pubspec.yaml dependencies***/
Please let me know if any further information is required from my side. Any feedback for code improvisation (if you feel like it) is also very appreciated.
You're getting that error because of an incorrect or expired token that you might be using. Firstly, I will suggest shifting to the latest version of the Agora SDK and then build your application.
Now, if you're just testing out the platform then from your Agora dashboard you can go ahead and generate a new App ID and select the testing mode which will disable token. So in your joinChannel() method you can pass null for the token value.
But if your application is live or is in production then go ahead and select the secured mode from your Agora dashboard. Then you will have to generate a token server from a deployed server, you can read more about it here.
Now, coming to the Firebase part. You can actually make this process much simpler by using the Agora RTM SDK. Which allows you to send messages, through this you can send peer message about the call details and hence refer it while making a call. You can have a look at this blog which shows how you can use the RTM SDK to do the same: https://www.agora.io/en/blog/building-your-own-audio-streaming-application-using-the-agora-flutter-sdk/
If you're interested you can have a look at this sample code given here which will help you setup a proper video calling application.
I will also recommend you to join the Agora Slack Channel where you can get help from other Agora developers.
I'm implementing Sofort payment gateway in Android by the help of Stripe and I need some direction. I'm following Stripe Doc
I've successfully done till Step 2 but I'm not understanding how to go with Point 3 to Charge the Source & webhooks. Will there be some backend coding to implement webhooks?
If someone has already implemented Sofort please post it. I'll be very thankful. Please I need attention on this.
You are correct that you need to do Steps 3 and 4 on the back end. You would pass the Source's 'id' to your backend server and start with the example code in Step 3:
https://stripe.com/docs/sources/sofort#make-a-charge-request-using-the-source
Then in Step 4 you implements a Webhook Endpoint that listens for the updated events:
https://stripe.com/docs/webhooks
I have a website which uses nodejs and passportjs for authentication. I now need to use this system to login with my android application. I am unsure as to the correct way to proceed. Do I simply use the website and load it in a web view itself? Is this the correct way to do ? Otherwise I would have to probably send the username and password for the first time and establish a token. Are there any libraries with android support which do this ? Could someone please help me out?
Follow the following steps and hopefully you will get your app to do what you want:
Step 1: Create a Login View in your android app that allows users to enter email/username and password.
Step 2: Secondly, get their username/email and password (encrypt the passwords) and then:
Step 3: Create an AsyncTask - you can learn how to do that using Android Documentation. In that AsyncTask,
Step 4: Using HttpRequest, make a POST request to your website by passing a long the user credentials.
Step 5: Since you already know how to handle login processes on the site, you can do the same using the http request from Android. Then if the user is successfully logged in,
Step 6: Simply return a JSON response to verify that a user was successfully logged in or not.
Once they are logged in, you can redirect them to their profile or protected resources as you wish.
I hope this helps.
I am creating a mobile app which connects to some jive based community using childbrowser.
I can easily open the community, login and do stuff.
But I also need to fetch session details in my app, so that I could use these to fetch JSON strings to show user image/info on my app showing that user is logged in.
I tried working on childbrowser, but couldn't investigate much.
It seems it won't work with my community URL. While using google url it shows popups on location changes, but not for my url.
Can any one help me in fetching the data I want ?
Here is the sample code I am using to detect location change:
function openURL() {
window.plugins.childBrowser.onLocationChange= function(loc){
alert('In index.html new loc = ' + loc);
};
window.plugins.childBrowser.showWebPage("https://communityName.jive-mobile.com/#jive-login", { showLocationBar: false });
}
I am getting my login page, but after login I can't see any alert coming !!
I need to get proof of user login and user session details.
Thanks
I have just updated the ChildBrowser plugin for my own use, following code given here: How do I get the web page contents from a WebView?
I am using this to log in on Google API oAuth2, watching for the right page to load. I am using the onPageLoaded(html) event that has the (computed) html source. You might want to use this to get the html that was loaded and check for "stuff". I don't use jive so I wouldn't know where to start, but I'll put up a sample Google oAuth2 project for you to try.
HTH
EDIT:
the code is at: https://code.google.com/p/filechunkreader/
Don't let yourself get fooled by the name, this project is the repo for my Java plugins experiments. It contains so far 2 plugins, FileChunkReader and a custom version of ChildBrowser.
See am doing an android application,it has a web back end,am using wordpress as the web back end,but how can i code web services in wordpress?suppose i need to fetch some contents from database and pass it as json to android phones.So where should i place the php script or how can i do this?Is it possible to do web services using wordpress?
Here is the code:
$select_qry="select * from admin_details where username='$uname' and password='$paswd'";
$result=mysql_query($select_qry);
$rows=mysql_num_rows($result);
if($rows>0)
$admin_arr=mysql_fetch_assoc($result);
json_encode($admin_arr);
How can i do this in wordpress?
Please help me..
Thanks
You can follow these steps:
Create a template with your PHP code
Create a page. Let's say the admin page is /my-service. Assign the template you created in step 1 to this page.
Your adroid application can now call your wordpress service via the URL . mydomain.com/my-service.
Notes:
I assumed you meant a REST service.
Creating web services in WP is possible, but not ideal because URL pathing would be very hard. i.e. Wordpress wouldn't know how to parse /player/id vs /player/id/status .. the first asks for all the player data, the second asks for a particular attribute of a player.