How to integrate PayPal in a C# application? - c#

I am confused by PayPal's developer info. I have a website. I want the User to be able to click the PayPal icon and when they made a payment the payment notification is sent to my URL.
I have created a button for this but I want the notification of payment to be sent to one of my URLs.
I also want to test this using a sandbox account. But after creating the sandbox account and I click 'create button' on the developers website it redirects me to the 'live' PayPal website where the construct of the button is as it was before.
I created a sandbox account and I have the criteria details.
Yet, despite much research I cannot find a simple easy to understand C# example of what I want to do. One minute I am looking at their developers' BETA web site, the next I am looking at an example code on CodeProject that is four years old and not replicated in any of the examples I can see elsewhere.

Related

Login to Google using windows form c#

Hi everyone I have a problem I wanna create app for generate account google drive with api google drive and I don't know how can I login with account from application not navigator C# windows form.
enter image description here
and how can i edit this credential with exist user
Try following these steps:
https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/google-logins?view=aspnetcore-3.1
I have used those steps and worked perfectly for me. You don't have a choice than to be redirected to the Google authentication page.
After entering your Google credentials, you are redirected back to the your site.
My understanding is that you are trying to use Google Drive API from a console application. Or for that matter a fully desktop application.
Take one thing in consideration, if you don't use Service account you must let the user authenticate to google and allow your application to work in his/her behalf. There is no way around this.
What you can do is after the user has already signed in, is to save the tokens and refresh them whenever necessary.
Of course OAuth may be complicated, but you use the .NET library everything will be managed for you. And you can look at a real example in the .NET Drive Quickstart

Post to my page from my facebook App using c#

I designed a contest application for my Facebook page.
The application is a web application (MVC / C#), using Facebook connect to authenticate users.
I would like that when a person wins in the game, the application publishes on my Facebook page (not on the profile of the user, only on my page) a message like "Georges B just won a Bluetooth headset."
I have no problem with development or code. But Facebook is a gas plant and it is very difficult to find up-to-date documentation. I tried with Token users, but it does not work anymore. I do not know how to do it because the majority of tutorials on the web use this solution.
Thanks.
OK, negative notes without any explanation. This forum becomes anything. I understand the basics of respect but still, it is not with repression that people are advanced ... Explanations would be a minimum.
I'm going to fend for myself and I'll only read the existing posts without participating in the future.

Paypal payment processing

I've checked out the resources on PayPal's site, but I'm having trouble figuring out how to setup recurring payments from a "create account" form I've created in C#.
My goals is to have a text field called "username" that's disabled and enables when the user processes their payment through Paypal by clicking on a link that opens the payment page in their browser. I want to then save some kind of ID associated with that transaction that my application can look up when the user logs in to make sure they still have an active subscription.
All that being said, I have two questions. One, is there a good walk though for someone who doesn't know much about SOAP or anything of the sort? Possibly geared toward Paypal? Second, does Paypal give some kind of static transaction ID that I can look up via Paypal when the user logs in?
I'm also open to other payment processing methods, but I want to stick with WinForms for a while.
You can use the CreateRecurringPaymentsProfile to create the subscription with PayPal. If you don't like working with SOAP you can use their basic NVP API, which is what that link points to.
When you make that call to create the profile you'll get back a PROFILEID. This profile ID can be passed into GetRecurringPaymentsProfileDetails to check the current status upon login.
Since you're using C# I'd recommend taking a look at this .NET SDK for PayPal. It makes the calls very simple for you.

Creating a hook into my facebook app from another site

new to facebook dev and I have read the basics to get a site up and running using the canvas setup. Nice and simple, I have also got the integration with users working ok (i.e. the signed_request).
I was wondering how it works with "sending/posting" data from one site that is anonymous (my own external to facebook) to the facebook site.
The flow I'm after is a user is looking at some content my site A (my own external site) and then clicks the "share on facebook" button (or whatever), which sends the user (and the data they were looking at) to the site B (my facebook app) to which they authenticate and then (and this is the part I dont get) can see that content on their personalised homepage within site B.
So is there a way to POST some kind of data to the facebook site? Or do I need to do something else here?
Thanks a lot.
You use the facebook API located here:
http://github.com/facebook/csharp-sdk
The .zip download includes the api that you can compile, as well as a sample project that uses it.
Reference: http://developers.facebook.com/blog/post/395/
EDIT
Here is some more info regarding the facebook graph api. I think you'll find everything you need in here: http://developers.facebook.com/docs/reference/api/

automatic login to facebook

I'm creating a desktop application in C#.
one of the things that this application should do is to publish things to the status of the user in facebook (like: "dave just won 3 gold medals" ). this should happen whether the user is logged in now to facebook or not. I want the user to give me all the needed permissions once and then everything would happen automatically (I would save whatever is needed on my DB).
I tried using facebook developer toolkit 2.0 for .net but didn't see anything there that could help me.
ANY help would be appreciated.
For you question:
you need to use the Facebook Connect API
there is a Feature called offline_access - its an extended permission.
In FB Connect you need to toggle the correct popup :
The workflow will be like that:
User uses FB Connect to confirm the fact he wants to connect your app to his facebook account.
You trigger the popup.
You can then call all calls on his permission even if he is offline (or not using facebook connect)
For the sake of understanding: FB Connect is meant that way that you can easily log the user into his app and do everything on his behalf. offline_access is actually meant for cronjob work.
Iv'e got some answers here. I think it answers other questions I saw in the web lately:
My answer is related to desktop applications that works outside of facebook (facebook connect).
+ I'm using the facebook developer toolkit 2.1:
Here is how to get the special permission, needed to for offline access. and how to get the session key:
facebook.Components.FacebookService FS = new facebook.Components.FacebookService();
FS.GetExtendedPermission(facebook.Types.Enums.Extended_Permissions.offline_access);
The second line will force you to login and afterwards would ask for the permission after the user choose to grant the permission, you are given in the post URL - the fb_si_session_key. BUT the toolkit developers didn't do enough to bring it to you :-(
So you have few options. the simple one is to do:
FS.Logoff();
FS.ConnectToFacebook();
What will happen is that you'll see the login screen for a second and before youll be able to click anything it would vanish. but this time you'll have the right session key. you can get it like that:
string myPermanentSessionKey = FS.API.SessionKey;
If you dont want to show that annoying screen again you have few options, all of them are related to changing the source files of the toolkit. I'm not gonna get into it here, but just tell you a simple option: in the facebookconnect() function I changed it to receive a parameter (isShow) when I send true to it, it behaves normal, when I send false to it - it skips on the formLogin.ShowDialog();
It's working.

Categories