Creating a registration key - paypal

I am selling my software on line, and using PayPal for payment processing. Every time someone buys my software, I get notified by PayPal, at which point I take the purchaser's name and encrypt it onto a unique password with which they can unlock the software. I e-mail this password to the user.
I'd like to automate this step, so that every time PayPal processes the payment, the user name is used to create an unique password, and the email is sent directly to the user. Is that possible from PayPal's side?

You have many options. For example:
PayPal - Instant Payment Notification. Basically, everytime one of
your clients buys your software PayPal will notify you using the url
you set in your button for IPN. Please check the documentation
HERE
Express Checkout. DOCUMENTATION

Related

Require a linked e-mail before approved purchase?

Basically what I want to do is make sure that the user has an e-mail tied to their account before allowing a payment to take place. I will allow users to add emails to their account via the user account panel. The plan is to make it so that any purchases can be handled automatically. (Obviously the IPN handles a lot of this, but there's still some "Manual work" that needs to be done to poll the database). If I could require accounts to have an email linked before making a purchase I could eliminate that manual step.
tl;dr - is it possible to require a user to have their paypal email linked to their account before approving the payment? This certainly isn't possible using the IPN, because it takes place after the payment is completed. I want to be able to display a custom message as to why the payment was declined and the steps to resolve it if at all possible.

Paypal canceling recurring profile buyer email notification

I am useing paypal exprees checkout API. I want to cancel recurring profile. I add a note for reason of canceling. The recurring profile cancel successfully and note setup to buyer profile history page. But The note does show buyer email notification.
Can you tell anyone how can I show user reason of cancellation in email notification?
Thanks advance
That note is considered an internal use sort of thing, and isn't meant to be shown to the buyer.
What you can do, though, is setup an Instant Payment Notification (IPN) solution which would get hit when the profile is canceled. Within this you can generate a custom, branded email notification, update your database, hit 3rd party web services, etc. It's a very useful tool that allows you to automate all sorts of things based on different transaction types.

How to link username in site to PayPal information email?

It's not a problem but i don't know how to do this; let's say that I have a sign up form with some fields: username, password, email, as you know the user clicks on the BUY BUTTON and pay's up.
Well, how can I know the username that just made the payment, I mean how can I link those two things together, one idea it's to use the email address, but mose of the people sign up with different email addresses, mabe they have a different paypal address...you know...I need this information because I need a way to activate the account.
And I also need to know, if the user canceled a subscription will paypal post a message to my IPN link?
I suggest you use the following PHP script for easy integration with PayPal's service (assuming you're using PHP): http://www.micahcarrick.com/04-19-2005/php-paypal-ipn-integration-class.html
If you do, the e-mail you will be looking for will be supplied in
$paypal->ipn_data['payer_email']
(again, assuming that $paypal is your object of the paypal_class class)
Obviously you have to follow the setup steps first. I suggest using the example script. It is really easy to do - in only four steps.
I suggest you read the official paypal documentation about IPN and recurring payments.
PayPal issues a IPN for every event that occurs to the user subscription, for example:
subscr_signup
subscr_eot
subscr_cancel
subscr_failed
About the parameter, you can use a parameter named "custom" to pass a value, for example the user id or email, and that parameter will be sent you in every IPN.
Here are implementations of the PayPal IPN in both C# and VB:
http://www.xdevsoftware.com/PPIPNDesc.aspx
Here's an account of how I incorporated it into a PayPal subscriptions scenario:
http://www.codersbarn.com/post/2008/07/10/ASPNET-PayPal-Subscriptions-IPN.aspx

Triggering an action after Paypal Buy-Now purchase is complete

I've got a web application with a form where users can sign up for a seminar. The process is currently as follows:
Register for seminar
Registration success page with Paypal Buy-Now button to make payment
Paypal payment
Registration completion page
At present, emails are sent to the admin and the user at step 2 after registering confirming their registration. This needs to be changed so that the emails are actually sent in step 4, after payment has been made.
The application is built in ASP.NET, and all of the code to send emails, etc is all done. I'm curious as to what is the best way to trigger a process on the main website using the users details after they have completed the Paypal payment process.
From what I can see, there are the following options:
Store the data in the session. When the user returns to the registration completion page, retrieve the information and send the emails. My concern with this is that I've worked on a project in the past implementing this and it never worked very well, with the session getting lost.
Store the data in the database. Have the Paypal redirect include the transaction details in the querystring to the return page, which can retrieve the registration details using the email address and send the emails. However, this may not work if the email address used on Paypal is different from the one used to register (which is quite likely in this scenario).
Post all the details to Paypal, so that they are included in the transaction. Downsides: Won't send confirmation email to the user, only the admin (and assuming that the Paypal email address is the same as the email to which payment notifications should be sent). Also not sure if this can be used with hosted buttons.
I'm sure this is a common problem, and any advice would be appreciated. Thanks.
Use paypal instant payment notification
When the order is placed on your site, put it into a db table, with whatever you need to record. I then have an OrderId (from the db table) that I pass to paypal as an 'invoice' field, this gets passed back via ipn with a payment status etc.

How do you connect a Paypal IPN confirmation to a user?

I wanted to use Paypal's IPN service to verify payments for a recurring subscription charge for my website. How do you tie the IPN confirmations to a user in your site?
The IPN confirmation message has a name, email, paypal ID, recurring payment ID, but it seems to not give a unique identifier since I don't know where the paypal ID or recurring payment id comes from and it may not be trivial to uniquely match up the name/email that a user has on their paypal account (or entered there) with the name/email I have for them on my site (there may be many John Smith's and the person may choose to use a different email.)
1) When I send the initial payment request to Paypal, I can attach a unique UUID in the URL I ask them to send back to me, so if I save that unique ID for that user I can match that payment confirmation to the user who initiated it. Am I making that harder than it is? Is there an easier way?
2) Also, for a recurring/subscription charge, does paypal always use the URL I specified with the initial payment initiation? Does anyone have practical experience using the recurring Paypal payments with IPN's, does it reuse that unique URL? Or do I have to associate the Paypal ID's with the user after the first recurring payment is received?
Attaching unique data to the payment request is pretty much the accepted way to do it.
I don't have any experience with recurring charges.
I recently also set up some reoccurring payments with Paypal.
I actually wanted people to register as members after paying for the subscription, if they wanted to. As having to sign up as a member could add some friction to the sale process. So I don't send any user info along with the Subscribe button.
What my IPN script does is generate a unique activation code tied to the Paypal subscriptionID in the Activations table, then it sends this code to whoever paid for the subscription, with instructions on how to activate.
At the point of activation, you need to register or login. At this point the userID is added to the relevant row in the Activations table.
When the EndOfTerm IPN notification comes in the IPN script looks up the userID from the Activations table based on the SubscriberID given in the IPN. Then I can do whatever I need to do to that user to disable their subscription.
At all time the URL of the IPN script remains the same.
1) You can send an 'item_number' parameter with the initial subscription setup, which will get passed back to you. I'd suggest embedding an identification token in it.
2) If you mean the 'return' parameter, no, that's for sending the user to at the conclusion of the subscription setup. The renewal is automatic and doesn't 'ping' that page.
1) You want to be using the item_number parameter. Set this in your HTML form shown to the customer, and it will be returned to you by the paypal IPN, so you can put a database row ID in here, and use it to match up to the right person later.