PayPal IPN Adding your own data onto IPN message - paypal

I have integrated PayPal into my website and have the IPN system working successfully. The problem I have now is that unless the PayPal email is the same as the one they used to register on my site, I have no idea who the person is.
I would like to add on my own data to the IPN message such as AccountID=10 or AccountName="SomeName" so that I can identify who the person is for my own user base since it is selling of virtual goods and privileges and not shipping to some address. Can this be done?

You certainly can send many parameters such as invoice parameter with your Paypal IPN request and get it returned with IPN response.
Full parameters list is available here:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/

You could also make this a non-issue by setting it up so your customers use their PayPal login credentials to log into your site. Have a look at the following documentation:
https://developer.paypal.com/webapps/developer/docs/integration/direct/identity/log-in-with-paypal/

Related

Payout with PayPal

I am generating a payout with PayPal to different people. These people provide access to us to their PayPal information to retrieve the necessary information to make the payout. So I am using two different things from PayPal:
Payouts.
Log in with PayPal.
To avoid problems when the user change their PayPal email address I am trying to use the recipient type "PAYPAL_ID" when I make the payout. But I have problem to retrieve this information when the user log in with PayPal.
I see the field "PAYER_ID" in this web site from PayPal but in the list of scopes to retrieve each field I don't found the scope for this field.
How can I retrieve this field from PayPal?
Thanks!!!
The problem was in PayPal, for some reason the Sandbox didn't return the PAYER_ID. They updated something in their systems.

Not Receiving PayPal IPN With Invoicing API

On the introduction of PayPal Invoicing API documentation it states that.
PayPal sends IPN messages for invoice payments and for invoices
cancelled by the buyer.
But I've found this is not the case. IPN for invoice payment, cancel or other operation never get sent from PayPal (I have checked and confirmed it from IPN history page).
Worth Mentioning
Invoices are being created via Invoicing API successfully without any warning.
I am working on Sandbox and Creating for Third Party Merchant.
I do understand that paypal doesn't send IPN for api operation changes.
The IPN listener is working fine and I have successful implementation for subscription api with IPN.
Update
Today I tried the whole process with Live PayPal account other than sandbox account and I still not getting any IPN. So, I guess I am doing something wrong or Invoicing API is broken (which I highly doubt).
Which also makes me wonder about some additional questions:
I (merchant #1) has the permission information form merchant #2 for sending invoice to their behalf.
I have setup IPN to my IPN listener URL.
merchant #2 do not have IPN setup to my listener URL.
So, when Invoice that I created for merchant #2, Do I get IPN?
OR, merchant #2 also needs to setup their IPN url pointing to my listener URL?
IPN is get send from the account that receiving payment as #effone mentioned in comment. So, it seems I was confused from paypal documentation.
Answer: The IPN url from merchant #2 will need to setup in order to get notification about invoice payment. merchant #1 account who sending the invoice behalf of merchant #2 will not send any IPN as the payment isn't involves merchant #1
Way I see it, this is not a proper solution to create an invoice management system. As if I have 1000's of user they all need to set their IPN url to mine in order to get the application work correctly (aka, setting invoices as paid when they gets paid)
Your question reads strangely, because you say the IPN is working fine, then in your update, you say you're trying it in your live PayPal account. It sounds like it's working on the Sandbox, but not in production?
If this is the case:
Did you activate the IPN under your Production (Live) Paypal account?
Do you have the IPN URL for this?
Are you seeing the IPN being logged under the Production (Live) PayPal site?
If No -> it's been a while since I've worked with this, but there used to be an interface where you could send an IPN test- have you tried that?
If Yes -> make a bare bones listener- just a page that logs that it was hit, then add logic to it.
hth

Paypal Get Subscription Details

My website is using subscriptions payments and the old programmer did not used ipn, to activate the account he used a custom return url (ya, very stupid).
The issue here, is that old subscription does not have any custom information attached to the ipn (new subscriptions are ok).
Is there a way to find out the return url used in the initial payment?
Thanks
There isn't a way to view this information from the PayPal account. However, the account holder can contact PayPal and have them check the transaction details of one of these old transactions, and they can tell him what the redirect/return URL was for that transaction. If you have any trouble getting this information from customer support, the account hold can also open up a ticket with PayPal MTS at www.paypal.com/mts requesting the information. He would need to use the email address registered on his PayPal account and he would need to provide a transaction id for one of the transactions that the client wants the return URL for. If you have any trouble after that just let me know, send me a PM with the ticket number.

Paypal Payments - What to store from them?

I was wondering, if you have coded a website which uses paypal payments as a payment method (the kind of payments where you get redirected to their site for payment, not web payment pro).
What kind of details can I store? Is it just their paypal email address that can get supplied to me or do other details regarding their paypal account also get sent to me via their API which can be stored on my site?
As already mentioned, you get the details of the transaction, so email address, name, delivery address and the contents of the shopping cart.
You can send custom parameters from your form though, such as phone number.
Paypal, by default doesn't ask users to provide a phone number and therefore usually doesn't send you one. However, it's often useful for retailers to have a customers phone number.
If your shopping cart is populated by your website and then customers are asked to complete a brief, name, phone number, email form before submitting to Paypals site you can send these extra form fields to Paypal and have them come back to your server for storage/checking.
However... I found it very erratic! There seemed to be a problem with my account when I did this and the PP technical team couldn't explain why it was only sometimes working! I gave up in the end and found a Payment gateway with credit card and Paypal integration, now all my payments come through the same channel and callback methods regardless of type.
http://www.securehosting.com I use now.
Mostly only the details pertaining to the transaction can be retrieved in the usual procedure, as it appears even when you see the transaction details in your paypal account when you receive payments. However, it would be helpful for you if you can provide more information on what you wish to look for.

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