PayPal on Mobile - mobile

I am using Applicationcraft.com (AC) for a mobile native app. This will run on iOS and Android. I need to post transaction details to PayPal and get an authorization back.
AC is based on jQuery and built with Phonegap. Has anyone got a simplified example on how to achieve this? I have looked at the PayPal docs and they are overwhelming for a newcomer.
AC allows http requests so I feel this would be the simplest route.

Related

oAuth 2 implementation in react js

I need a little guidance. I am trying to implement oAuth2 authentication in my React JS application. Backend is in service now. In react on login button click, service now popup will open to authenticate user and will provide access token at redirect uri.
I am having client id, client secret, access token uri, authorization uri, redirect uri.
But couldn't find any specific library for react js that gives oauth2 implementation. Please give me pointers so I can use any existing/implement oauth2 authentication for my Login page(using react).
I was trying to use ClientOAuth2, but I am not sure if this is correct to use with react js. Also, I am getting CORS error on using this library on my localhost.
Please share how to implement it properly.
I have a couple of tutorials you may find useful, which use the oidc-client library.
The design patterns used are technology neutral and can be implemented in any JavaScript tech stack.
TUTORIAL 1 : PLAIN TYPESCRIPT
This focuses on the basics of Authorization Code Flow (PKCE) and a productive developer setup:
Blog post
Code Sample
FINAL TUTORIAL: REACTJS
This focuses on some more advanced aspects, and includes an update to ReactJS:
Blog post
Code sample
I have used react-oauth2-auth-code-flow nom package to implement AUth2 flow in my react js application. The napm package has samples to help your implementation. Check this https://www.npmjs.com/package/react-oauth2-auth-code-flow

React Native Upload to YouTube

I am trying to upload a video that I take locally using react native camera and then send it to youtube for processing and then want to display that video on a react.js web dashboard.
We have tried using fetch-blob to upload the video and cloud firestore to store the video. We are not sure at a high level on how to go about the uploading to youtube. I know there is upload docs, however can we physically go about uploading straight from our react-native project to youtube, or would we have to upload to a database such as firebase and then use a cloud function to send it to youtube? Has anyone attempted this? The other alternative is that we can upload to S3 and then use AWS cloudstream to play back but that seems like overkill if there is a simple youtube upload that we can use. Do we have to authenticate a user to youtube before it would work? We do not want anyone having to log into a google account. We are hoping just to have an application created with youtube that we can upload to our channel.
Thank you!
Answer
You can absolutely upload a video to YouTube in many different ways. You mentioned a few options and I will line out how those could work for you.
Do we have to authenticate a user to youtube before it would work?
You will have to authenticate to YouTube in order to upload to a YouTube account. You could very well have one account for your app to use and when your users make videos the app could upload them directly to that account. I do highly advise against that though. Google is not very forgiving and the second someone uploads something to violate Google Policies I suspect you will be banned.
That leaves me to believe the best way here would be to use Auth0 to authenticate users and upload to their accounts. Otherwise maybe look into other options.
Possible Options
Option 1
It might be possible to upload all the videos to one YouTube account and make them all private. Then retrieve those videos and play them on your own site. Possibly something like that could work but it is probably a long shot. That could at least keep you from getting banned because of a user violating Google Policies.
Option 2
Another option would be to make one YouTube account. Save the videos to your server when the users creates them from your mobile application. Then have a waiting period for the video to post to YouTube in order for you and your team to have time to approve them.
At least this way you can use YouTube and have one account, but not take the chance of any repercussions from the videos people are posting.
Problem
How to upload a video from your mobile app using React Native to youtube.com
Solution 1
Upload straight from React Native. You can Use the Google APIs to upload directly to youtube. Google has an extensive API. You will have to create a Google API account and make sure to activate the APIs you want to use. Here is some information I found using the Google Javascript API to work with Youtube.
If you go to this link you can see some information on the scopes of this API.
Here is one scope mentioned on that page.
https://www.googleapis.com/auth/youtube.upload
Using Gogoles APIs you can upload videos directly to the youtube account.
Solution 2
The second solution is to post the video to your server, then once it hits the server use some other server side language to interact with Google's API. This could come in handy for other reasons. Like if you are better with a language other than JavaScript. For example Python might be your favorite language. In that case here is a Python Github repo that does just what your trying to do.
You could very well implement the repo mentioned above to your server and post the video you create from your phone to the server. Allowing the Python script to handle posting the video to YouTube.
Side Note
I do not think Firebase or really any database is necessary for the task you are trying to accomplish. Unless there are other requirements to your problem you have not mentioned.

Parallel Payment through mobile native app

I am trying to find a parallel payment implementation for my mobile app, where the payment should happen with in my application and not redirected to any browser.
I have seen few options like paypal parallel payment, but this doesn't provide native app purchase support.
Can some one please point me to right direction. I am wondering am I only one trying for this option? :)
Your help is greatly appreciated.
Thanks,
Ramesh.V
You are looking for an API payment gateway rather than a checkout page solution. There are numerous services such as Stripe, BrainTree, BlueSnap and even PayPal that offer this.
The reason this is not popular for apps is that you'll need to become PCI compliant for that, which is a pain. Non of the above services will grant you access to the API without it, but they will be happy to give you a checkout page (browser) to drop the PCI compliance requirement.
I've successfully used a service called Zooz for my mobile checkout and it works nicely.
You can goto www.zwitch.co . This is an Indian payment startup which offers in-app payment natively.They have mobile SDK with which you can accept payments in your app.You can design your own payment page.They say you will be reduced from the PCI Scope

A mobile web friendly payment gateway?

Can anyone recommend a payment gateway that has been optimised for a mobile?.. I have just checked out paypal on a mobile devise and although it doesn't have a heavy amount of data to be downloaded, it is far from optimised for mobile user experience... i.e. you have to pinch zoom to fill in forms etc... Does anyone know of a payment gateway that is mobile friendly?... Kind regards J
PayPal has a great mobile experience and it will automatically switch to that if using a mobile device. How do you have PayPal integrated now? Are you just using a standard button? How long ago did you create it?
If you take a look at www.givemobiley.org you'll see a good example of PayPal in a mobile experience. I developed that with jQuery Mobile, and I used the Express Checkout API with PayPal.
If you load the demo on your computer you'll see the experience you expect there, and if you load it on your mobile device you'll see the experience you'd expect there.

Send status to Facebook from Windows phone 7 silverlight application. What do I need?

How do I perform this?
I'm making a funny little notepad application where you should be able to send your notes to your Facebook account, as a status.
My question more directly is: Where do I find code so I login to "Facebook-write status page"?
And how do I implement it in this silverlight application? Can I use html/Javascript for this maybe?
There is a project at http://facebooksdk.codeplex.com/ which lots of people have used to integrate Facebook functionality into their Windows Phone 7 apps.
You don't need to use javascript or html for this.
Facebook has an API that you can use by sending web requests from your application to facebooks servers. The process is not straight forward, so you should check out the documentation here: https://developers.facebook.com/search?q=API
There is an open source C# based API available here: https://developers.facebook.com/blog/post/395 It may be easier to use than doing web requests yourself.

Resources