Let PayPal Express Checkout verify the Address - paypal

We are using PayPal Express checkout (it's API) to let customers checkout products in our shop and add the delivery address at the same time.
We only ship to Germany and when a customer checks out, returns to our page and we get to know vie the PayPal API his address is not in Germany, we don't capture the authorized payment. Sometimes however, customers try to trick us and write AT-1234 in the zip field, to indicate they want shipping to austria. They let the country field with the "Germany" value.
Is it possible to let PayPal validate the Address during Express Checkout, such that invalid zip codes cannot be added?

You could the AddressVerify API to check the postal code and postal address. You can find more on this in the developers guide at https://www.x.com/sites/default/files/pp_nvpapi_developerguide.pdf on page 25. Another option that I have seen merchants implement is the Callback API along with Express Checkout. Information on this is found in the same guide on page 55. This allows you to update the PayPal Review page with shipping options, insurance, and tax information during the checkout. You can also generate a message that gets displayed that states you do not ship to that location. Some merchants will also tie this in with 3rd party shipping provider API, so that they can calculate real time shipping charges based on the type of shipping the buyer selected.
Hope this helps you out!

Related

How to set paypal checkout to specific country for shipping?

customer pay my products from outside shipping address country, i cannot ship outside the country and only want ship within canada
I have to set paypal checkout only for canada address
This depends on how your PayPal Checkout flow is configured and which PayPal API and/or SDK you are using, but the general answer that applies to almost all PayPal Checkout integrations (except the old HTML payments standard) is that you can get the selected address before capturing or executing the payment. So if it's a non-CA address, simply refuse to do the final API step of capturing the order/payment and display an error.

PayPal Address_Override not working

I'm testing a PayPal integration on the sandbox using cmd=_express-checkout
(https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&=token=..)
The store I'm working on calcs shipping costs from delivery address before initialising the PayPal transaction, so we need to display the shipping address as entered on our client's site and not the default address held by PayPal for the buyer.
I've tried sending address_override=1 along with the address parameters specified here (https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/) but the [Ship To] displayed is still that of the test account default address.
address_override=1
useraction=commit
token=XXXX
address1=XXXX
city=XXXX
state=CA
country=US
zip=XXXXX
first_name=XXX
last_name=XXX
Am I missing something obvious or should I be doing it differently?
Thanks.
Looks like you have set NOSHIPPING=0.
Please change your request and set NOSHIPPING=2
NOSHIPPING
Determines whether PayPal displays shipping address fields on the PayPal pages. For digital goods, this field is required, and you must set it to 1. Value is:
0 — PayPal displays the shipping address on the PayPal pages.
1 — PayPal does not display shipping address fields and removes shipping information from the transaction.
2 — If you do not pass the shipping address, PayPal obtains it from the buyer's account profile.
Another one thing is for Express checkout integration you need to refer the documentation in here:
https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
The link that you have provided earlier is for paypal payment standard integration.
This will requires us to pull the log.
Kindly create an MTS ticket at our Technical Portal (https://www.paypal-techsupport.com/) and provide the EC token for further checking.

How can I limit the set of fields Paypal shows on express checkout?

Whenever our service initiates an express checkout and redirects the user to PayPal page the user sees the cart on the left and the following on the right:
Note that even the address and the phone number are required while we're an online service and don't need shipping information - once PayPal confirms the payment we'll happily "ship" over the Internet, so all we really need is a PayPal payment confirmation and I guess that requires just a credit card number, expiration date and the CSC.
Yes, I know that users who have already registered with PayPal can switch to "my PayPal account" option but that doesn't help people who don't have a PayPal account and those are forced to see this page with 12 fields.
Wait, that was the form for people who have their "country" identified as the USA. Here's what people tracked to Colombia see:
Even more fields and we only need a payment confirmation.
Is it possible to make PayPal limit the set of fields on that page?
Looks like you can avoid user to enter Billing and Contact information on guest checkout only if you properly transmit REAL shipping/contact data by your own in your SetExpressCheckout call.
&METHOD=SetExpressCheckout
&RETURNURL=https://...
&CANCELURL=https://...
&PAYMENTREQUEST_0_AMT=10.00
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&PAYMENTREQUEST_0_SHIPTOSTREET=1 Main Street
&PAYMENTREQUEST_0_SHIPTOCITY=San Jose
&PAYMENTREQUEST_0_SHIPTOSTATE=CA
&PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=US
&PAYMENTREQUEST_0_SHIPTOZIP=95131
&PAYMENTREQUEST_0_EMAIL=jsmith01#example.com
&PAYMENTREQUEST_0_SHIPTOPHONENUM=408-559-5948
If you set random data above with invalid city/state/zip PayPal will display Billing and Contact information inputs.

How do I prevent the user to change the shipping address? Or instant update callback for Payflow Pro Express Checkout

I'm using Payflowlink Pro Express Checkout
Flow:
User select items on merchant site.
User clicks buy and fill shipping address.
Server get rates from USPS and FedEx for selected items.
User selects desired postal service with defined rate.
Server calls paypal to setup transaction with selected shipping rate.
User on paypal where he or she able to change shipping address, but shipping rate is already calculated for address what he inputted on merchant site.
I've found a solution of my problem only for classic API (Instant update callback), but not for Payflow Pro Express Checkout
Like a part of solution, user'll be warned about this situation on merchant site, but.. How do I prevent the PP user to change the shipping address or tell me please if it is possible to use instant update callback for Payflow Pro Express Checkout?
Try using the ADDROVERIDE variable with a value of 1. Doing that tells PayPal to use the shipping address you provided and not the address the buyer has set in their PayPal account.
The ADDROVERIDE and the shipping variables are available in the Express Checkout for Payflow Pro guide.
Sorry, I wanted to add this as a comment to the above, but my reputation is < 50
For some reason I couldn't get NOSHIPPING=1 and ADDROVERIDE=1 to prevent paypal asking for the shipping address; It may be due to me not supplying the address to PayPal in the first place.
However, 'no_shipping=1' does prevents PayPal asking the user for the shipping address (for me at least)
I think there may be two different solutions based on certain scenarios, so if one is not working try the other.

Getting billing info express checkout

I would like to get User billing information from PayPal so that I can compare the billing information the user would have inputted in my site with those which the user has in PayPal.
I did try to access this information using the response which PayPal gives using
getECResponse.GetExpressCheckoutDetailsResponseDetails.PayerInfo.Address.Street1
but these are all null.
Is this possible? I am using Express checkout and these are digital goods so the user would not be inputting any shipping details himself.
Thanks
GetExpressCheckoutDetails returns Billing information if you had passed REQBILLINGADDRESS = 1 in SetExpressCheckout. Before doing this, you will need to get billing address enabled by contacting PayPal customer/Business Support.
A sample GETEC response :
TOKEN=EC-6CW49061US796703X
BILLINGAGREEMENTACCEPTEDSTATUS=0
CHECKOUTSTATUS=PaymentActionNotInitiated
TIMESTAMP=2014-11-06T09:29:59Z
CORRELATIONID=ac2e59af86d9c
ACK=Success
VERSION=109.0
BUILD=13630372
EMAIL=vimalbuyer#gmail.com
PAYERID=ZK5AUW8MWY9CW
PAYERSTATUS=verified
FIRSTNAME=vimalbuyer
LASTNAME=ravichandran
COUNTRYCODE=US
SHIPTONAME=J Smith
SHIPTOSTREET=1 Main St
SHIPTOCITY=San Jose
SHIPTOSTATE=CA
SHIPTOZIP=95131
SHIPTOCOUNTRYCODE=US
SHIPTOCOUNTRYNAME=United States
BILLINGNAME=vimalbuyer ravichandran //Billing information starts
STREET=1 Main St
CITY=San Jose
STATE=CA
ZIP=95131
COUNTRY=US
COUNTRYNAME=United States
ADDRESSID=PayPal
ADDRESSSTATUS=Confirmed
CURRENCYCODE=USD
AMT=0.01
SHIPPINGAMT=0.00
HANDLINGAMT=0.00
TAXAMT=0.00
INSURANCEAMT=0.00
SHIPDISCAMT=0.00
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_AMT=0.01
PAYMENTREQUEST_0_SHIPPINGAMT=0.00
PAYMENTREQUEST_0_HANDLINGAMT=0.00
PAYMENTREQUEST_0_TAXAMT=0.00
PAYMENTREQUEST_0_INSURANCEAMT=0.00
PAYMENTREQUEST_0_SHIPDISCAMT=0.00
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
PAYMENTREQUEST_0_SHIPTONAME=J Smith
PAYMENTREQUEST_0_SHIPTOSTREET=1 Main St
PAYMENTREQUEST_0_SHIPTOCITY=San Jose
PAYMENTREQUEST_0_SHIPTOSTATE=CA
PAYMENTREQUEST_0_SHIPTOZIP=95131
PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE=US
PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME=United States
PAYMENTREQUEST_0_ADDRESSSTATUS=Confirmed
PAYMENTREQUEST_0_ADDRESSNORMALIZATIONSTATUS=None
PAYMENTREQUESTINFO_0_ERRORCODE=0
The GetExpressCheckoutDetails API call is only going to return the shipping information, and you are correct that if the buyer is going through the flow for digital goods there are not going to be any shipping details. There are a few different ways to get some of the information that you are wanting.
You could use the AddressVerify API. This would need to be enabled on your account by PayPal. The AddressVerify API operation confirms whether a postal address and postal code match those of the specified PayPal account holder.
You could use PayPal Identity (formerly PayPal Access), to get some of the user's information back. The basic account information that will be returned is:
Name (First, Last or Full)
Email Address
Address (Street Address, City, State, Postal Code, Country)
Phone Number
Another option, is you can contact PayPal and request a feature to be enabled to return the billing address for Express Checkout. This is feature that does need to be approved before it can be turned on as well.