I am using paypal to verify users on my website by having them a .01$ payment and getting their IPN information.
To prevent double subscriptions therefore, I need a piece of information that is sent over the notification that is absolutely unique.
I have noticed that one can change their email over paypal so, email is not viable. Are there things in the IPN that are unique and do not change over time, like by making other payments or changing email address?
Thanks in advance.
PayPal provides a PayerID that is a unique identifier for PayPal accounts. It never changes regardless of what users do with their email address or anything else. It gets returned in IPN as payer_id.
Related
I need to read the email of the buyer that has completed a transaction on my eCommerce site. Paypal does send me an email of notification, but does not contain the email of the buyer (Instead, it returns just the transaction-id - which takes me to my account.)
I was looking through the PayPal for Developer API, but I can't find an example to get this level of detail. Is this even possible to retrieve, and if so, how?
Paypal ipn returns the address. When you post to PayPal, they request an address by default. (Source)
no_shipping =2 is the prompt for requiring an address.
Is there a way in PayPal Classic API (PayPal Payments Standard with the BuyNow button form) where I can turn off the sending of the customer receipt email?
See, there's a bug currently on the PayPal website where it won't let you add another primary account. So, this means the CEO's name and primary email account are going out on every customer receipt. I called PayPal tech support and they said it was down for now, but after 3 days of reattempting to add a replacement primary account, the bug still is there. So, I thought I'd go another route -- not sending the receipt at all. Is that possible?
Unfortunately there is not a way you can turn of the email notifications that go out to the buyer.
I am about to set up an IPN script after users make a purchase from my site but I just had a thought, what if the email address they signed up to my site with differs from the email address they signed up to PayPal with?
i.e. they sign up to my site with forename.surname#domain.com but their PayPal account login is surname.forename#domain.com.
The PayPal IPN will send back surname.forename#domain.com and I have no way to identify who has just made that purchase.
I realise in this simple case it may be possible to find an email address similar to that in the database but in the real world people have crazy email addresses and that isn't always going to be possible.
Has anyone solved this problem before?
It may be best to use a different identifier such as an invoice number or pass a custom value to PayPal for the payment. PayPal will return this via IPN and can be used to link the payment to the customer's account on your website.
This way you pass a value to PayPal that is linked back to that customer's account regardless of their PayPal account details.
Hope this helps!
I suggest that you should force the customers log in before placing an order, then you can get the email they used in Paypal from the return value, and combine the two emails in some way or even just leave them.
My PayPal IPN scripts runs very well. When I test with my sandbox account it, the payment is made instantly, however when I use my client's business email, I got payment_status as 'Pending', with pending_reason as 'unilateral' in the IPN log call.
My client's email is confirmed at PayPal. So can anyone tell me why I am getting this issue?
pending_reason=unilateral means that the email address of the payment recipient has not been registered with PayPal. For the full list of pending reasons, see the PayPal IPN documentation.
Check the email address for typos, and double-check with your client that they truly have registered their address with PayPal (they may not understand what this entails).
Only accounts made in www.sandbox.paypal.com exists when testing on www.sandbox.paypal.com. So you can't use live accounts for testing, because they don't exist within the sandbox site. You should create the accounts at developer.paypal.com
I had this problem - I was sending PayPal my "live" payer_email, when I changed it to the business email in the sandbox it worked. same as my live email with ****-facilitator#yoursite.com
Double-check if your Paypal primary email address has been confirmed. For me this error happened when my client's email wasn't confirmed yet, of all things!
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.