I have to integrate simple paypal into my app.
I am using following url as tutorial.
paypal tutorial link
before directing to paypal page I print its url in logs, which is
https://www.sandbox.paypal.com/cgi-bin/webscr?amount=12&cmd=_xclick&invoice=19&item_name=testing&item_number=19&personal=omairr.azam-facilitator%40gmail.com&quantity=1&return=http%3A%2F%2Four_ngrok_url%23%3CUser%3A0x0000010a4e1528%3E&upload=1
But when I am redirected to paypal sandbox, the url that i see in my browser is
https://www.paypal.com/myaccount/home
and I cannot see checkout form that will take credentials from buyer and show details about transaction.
NOTE: I am on localhost at this stage and have not deployed my app
Please help me in this, Thanks.
I think this is due to your return url, which may be improperly set. It seems to be appending a User instance to your ngrok url. Changing the url to something else takes me to: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_flow&SESSION=GcW-vpSKb2wALSTAyNuU29ltNqKyVjVwIuNy3mqgKDM_Df2abfo9PWP6KXm&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198163eee001d8a5bd337af8e5197b2a388 where I was informed that there's a problem with your email
Related
I'm new in ios sdk and English. Therefore, sorry for my Eng.
I try to do authentication through github using OAuthSwift.
In the registration of the application (https://github.com/settings/apps), there is need a redirect URL. In the tutorial from raywenderlich.com was an example, they did authorization through Google. They wrote a unique domain in this line that does not work: com.raywenderlich.Incognito. And in Info.plist, we added a Scheme URL with com.raywenderlich.Incognito, so that (as I understood it) when we go to this address after authentication, we’ve got into our application. But if you try to add in the application settings (https://github.com/settings/apps) the Redirect URL: something like com.raywenderlich.Incognito, will generate an error, because github wants the URL to have to be valid. If we put the Valid URL there, then when we will be redirected to this address, we will simply go to it and will not return to the application.
I would be grateful for any help.
Sorry for my English.
Redirect url in OAuth is the url that the authentication provider navigates to when authentication is successful.
For mobile apps it is the link that launches the app (a sort of deep linking)
For websites it is the website home screen
I would like to know what this is for (return url)? Is this some kind of deep linking to my app? I don't have any deep links to my app. I've been doing sandboxed paypal transactions in my iOS app, the user is just notified by a modal screen and then redirected to the home page of the iOS app.
Any tutorial about this or step to step guide for this? I need to go live today and I couldn't find a guide for this. thanks.
There are multiple "return urls" for PayPal, it could be for the link the user is redirected to after a purchase (which the hint seems to indicate), or in this case for the "Log In with PayPal" feature (which the "Oauth return url is invalid" seems to indicate).
Quoting the this doc:
You must specify all return URLs for an application in the Developer Dashboard before you can use that return URL in an application. For example, if you develop a REST application and you configure Log In with PayPal (LIPP), you must configure the return URL for the application in the Developer Dashboard for it to work in you LIPP configuration.
A starting point for more information on LIPP is: https://developer.paypal.com/docs/integration/direct/identity/
Or, if you're looking for information on a specific API call:
https://developer.paypal.com/docs/api/identity/#tokenservice_createFromAuthorizationCode ... quoting that:
Application return URL where the authorization code is sent. The specified redirect_uri must match the return URL registered for your app on the My Apps & Credentials page of the PayPal Developer site.
I have been trying to integrate PayPal payment with a test application I am developing. If successful, I am thinking of leveraging this on my other projects.
So far, I have been able to add the plugin, configure it for Test environment and able to complete a transaction end to end. However, I have a small issue that I want some help or clarification about. Please follow the series of images below for more details:
Button on merchant application (grails application)
Payment page on PayPal test site
Here is the paypal confirmation page for transaction:
After making the payment above, I got a successful message on paypal test site. But when I check the logs and database, there is no notification sent to the grails application at this stage. The payment transaction is still in PENDING state:
Now, when I click on the "Return to merchant" link on the paypal confirmation page, then I redirected to my grails application with a SUCCESS message:
So, the PayPal "SUCCESS" response is sent to the grails/merchant application only after the user hits that link "Return to merchant site". In real life, the users might not want to return to the merchant site everytime. Seeing the confirmation message on PayPal site, they might assume that the transaction is done and may be PayPal does the payment too. But, how do we let the merchant site i.e the grails application know that the PayPal has already shown the user a confirmation message? So that, the user doesn't have to return to merchant site after seeing the Successful message?
UPDATE:
I have tried the IPN simulator upon your advice. I am not quite sure and able to understand how I can send an IPN message to my localhost application. When I tried giving my localhost or 127.0.0.1 on the IPN simulator configuration on my sandbox account, it throws error saying unable to reach the server. I am sure many developers must have tried this using local development machine, but unable to find any resource which gives the steps to use IPN simulator or IPN sandbox response for a localhost development instancE.
You cannot rely on PDT
you have to use IPN
where PayPal send a notification to a page on your website where you have to authenticate, verify several possible issues and save the transaction details
See here fore more info
IPN
Not sure if it written at that link, but you have also to enable such function from your Paypal account indicating the target page on your website.
I'm trying to register my App on Venmo's developer site so that I can properly use their API, but I'm stuck trying to figure out what the required "Web Redirect URL" field is for. According to the docs, it says it is the following:
Venmo will redirect your users to this address. Must be formatted like
http(s)://www.example.com/example_redirect_url
As far as I could gather this was a URL scheme that would allow Venmo to redirect you back to your app after payment processing was completed on their side, but in researching how to set up a URL scheme the format is something like "[scheme-name]://", not "http://...."
The other thought I had was that this was just a url that contained a server-side or javascript redirect to that aforementioned URL scheme, but that seems like an unnecessary extra step. I also have a few other theories on what it could be, so I'm really just not sure which one it is...
I was running into the same problem. If your website is deployed you can use the redirect that your hosting service provides you. If you're not deployed then you can set it localhost.
Example: http://localhost:8000/auth/venmo/callback
I'm trying to integrate Paypal login within my Rails app and I can't make it work.
I was following the guide: http://cristianobetta.com/blog/2013/09/27/integrating-login-with-paypal-into-rails/
I created an application from the paypal developer site, and set the followings:
App return URL (test): http:/ /localhost:3000/auth/paypal/callback
App return URL (live): http:/ /localhost:3000/auth/paypal/callback
and I get the error:
"Relying Party Validation error: redirect_uri provided in the request does not match with the registered redirect_uri. Please check the request."
when I try to visit the URL:
http:/ /localhost:3000/auth/paypal
Interesting enough, I get the same error if I input my application credential in the official Paypal API integration tool:
https://devtools-paypal.com/guide/openid/ruby?interactive=ON&env=sandbox
Any ideas?
Thanks
This has changed a bit since the accepted answer, and will presumably change again soon... but here's how you do this now.
Log into developer.paypal.com
Click on Dashboard (https://developer.paypal.com/developer/applications)
Click your app name under "Rest API Apps"
Scroll to the box at the bottom of the screen labeled "Sandbox (or Live) App Settings
Set the Return URL (Where users will be redirected after test transactions)
Click save
NOTE
This Return URL must exactly match the redirect_uri that you pass in via querystring (so it's confusing as to why you'd need to pass it in in the first place)
GOTCHA
At this point in time, the Return URL can seemingly never be updated. In my recent experience, if you don't type it correctly the first time you save it, you will have to create a new app.
You need to set this value inside of your sandbox application on the developer website.
Log into developer.paypal.com
Click Applications
Under My Rest Apps click your App name
Click Edit next to App redirect URLs
Set the return URLs for live or test
Save
I resolved it by setting both the live and test redirect URLs to the same thing.
Plus, I ensured that I ticked to get Personal Information from the advanced settings panel, also adding URLs for privacy and agreement links.
The portal hung when set to localhost addresses for those links, so possibly PayPal tried to dereference them, so I put in real fake URLs.
I was encountering this issue myself, albeit in a Sinatra rather than Rails app - like you, I was using http://localhost:4567/auth/paypal/callback as the return URL - changing it to http://127.0.0.1:4567/auth/paypal/callback on the PayPal dev portal and accessing my app from 127.0.0.1 rather than localhost fixed it for me.