Get the email of my PayPal customer - paypal

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.

Related

Paypal API don't want a Delivery Address

I'm using secure-hosting as a middleman to process payments from my website which accepts credit card details and has an automatic paypal feature which essentially uses the paypal-api.
It processes payments fine and dandy, however our product isn't supposed to be delivered to the person who purchased it, it is sent to another (or many hundreds of) person(s) whose details are entered on our site by the purchaser.
The problem is that PayPal displays the purchaser's address as the delivery address both when the purchaser is signing into paypal and when they receive an invoice from paypal.
Does anyone know if there is an option to turn off this display of the delivery address/in the email? I've tried adding the no_shipping: '1' and NOSHIPPING=1 field when communicating with paypal but I believe this is to specify that the user doesn't have to supply an address because paypal will have a record of their address.
The ADDROVERRIDE variable determines whether or not the PayPal pages should display the shipping address set by you in this SetExpressCheckout request, not the shipping address on file with PayPal for this buyer. This would allow you to pass in a shipping address that your buyer enters into a form on your website, for example.

PayPal IPN Adding your own data onto IPN message

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/

PayPal Invoicing. SandBox. How to "pay" the invoice?

I'm building Invoicing system.
My client wants to send PayPal invoices without loggin to PayPal account.
I managed to make CreateInvoice() and CreateAndSendInvoice() functions to work (thanks to #Andrew Angell again!!!).
But now I need to "pay" the order. How do I act as a buyer, and pay the invoice?
There was no actually email sent to my box. I do see related record in 'notifications': "You've received an invoice XXX from YYY". But how, how do I "pay" it?
If you login to http://sandbox.paypal.com using the email address of the account that you sent the invoice to you'll see the invoice in the history just like a regular receiver would. You can pay it directly from there.

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.

DNN and PayPal, how to sent email to customer after payment has been made

In my DNN website, using Paypal's Checkout button, when user has click the buy button and sent to Paypal. Make a payment and then redirect back to my site.
Question:
How can I get that customer email address (from Paypal) so that i can sent a conformation email to him/her from my DNN website?
thanks.
Two ways; you can either call the GetTransactionDetails API and supply the TRANSACTIONID as a parameter. 'EMAIL' will contain the buyer's (PayPal) email address.
Or you can use PayPal IPN to get notified through POST whenever a payment / action has been made.
GetTransactionDetails API doc is at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetTransactionDetails
You can also have a look at TransactionSearch for past transactions.
In case you want to use IPN, just supply NOTIFYURL in your SetExpressCheckout and DoExpressCheckoutPayment call if you're using Express Checkout, or if you're using Website Payments Standard.
Remember to send the POST back to PayPal for validation at paypal.com/cgi-bin/webscr?cmd=_notify-validate and check for a VERIFIED / INVALID response.
Some sample code and docs for IPN is available at https://www.paypal.com/ipn/