Omer Raviv
Omer Raviv

Reputation: 11827

PayPal Adaptive Payments - retrieving sender's billing address via IPN / API?

I'm using the Adaptive Payments API to redirect the user from my web-site to a PayPal page to finish the payment. I've hooked this up with a 3rd party Invoicing service which listens via IPN.

For some reason, the Billing Address does not appear in the IPN data, and so does not appear on the invoice. Is there any flag I need to pass to the Adaptive Payments API to tell it to pass along the Billing Address?

Here's how I'm currently using the API:

    var receiverList = new ReceiverList
    {
        receiver = new List<Receiver>
                {
                    new Receiver(purchase.TotalPrice)
                        {                                   
                            email = _configurationReader.GetStringValue("PayPalEmail")
                        }
                }, 

    };

    var envelope = new RequestEnvelope("en_US");
    var payRequest = new PayRequest(envelope, ActionType.Pay.GetApiString(), cancelUrl, CurrencyCode.USDollar.GetApiString(), receiverList, returnUrl);

    var service = new AdaptivePaymentsService();
    var response = service.Pay(payRequest);
    purchase.PayPalPaymentId = response.payKey;

    return CreatePayPalRedirectUrl(response);

Upvotes: 3

Views: 292

Answers (1)

Drew Angell
Drew Angell

Reputation: 26056

PayPal does not send billing addresses to sellers. That's one of the advantages for buyers using the system...they don't have to share any billing info with all the different sellers they buy from.

The only address you would ever get from PayPal (in an API response, IPN notification, etc.) would be a shipping address, and that would only be provided if included in the original transaction.

Upvotes: 1

Related Questions