PayPal smart button - how to preselect users country for billing - paypal

I have a PayPal smart button on my website, with buttons for "PayPal" and "Debit or Credit Card"
When clicking on the card button, it expands fields for the card and billing info
In billing info, it preselects USA as the default country. Users find just having the flag there not intuitive and can't seem to work out how to change the country.
Is there a way in these smart buttons for it to detect the user's country based on IP or whatever, and preselect that country as the default billing country when it first loads the credit card form?

For the black debit/credit card button, a default billing country is set based on the locale. When not set on the SDK line, this comes from the browser (e.g. top of chrome://settings/languages )
If you want to pass a prefilled billing address, you can do so using the payer -> address keys in the createOrder object.
For the PayPal.com checkout, the country is set based on GeoIP.

Related

Common Paypal Button to accept payments

I have e-book selling website where I used a paypal button to accept the payment. The button is created from paypal website and its code snippet is added in the form to show the button(not via api). When I set the currency of the button to USD then indian paypal users are not able to use the button. It says "Merchant Does bot accept payment in your currency". If I change it to INR then it only accepts the indian customers only.
Is there any way to accept all currencies via a common button. I means Indians could pay me in INR and Others in USD.
Thanks in advance.
No, separate currencies are needed due to Indian regulations, and there is no support for combining multiple currencies (and their respective amounts) within a single button, other than coding it yourself.
If you generate buttons at PayPal, you need one button for domestic payments in INR, and another button for international payments in a currency such as USD.
It's possible to make something like a dropdown or radio buttons that switch a single PayPal button between the configurations for amount1/USD and amount2/INR -- i.e., give the buyer a way to select their country and change the amount/currency based on that -- but to do that you will need to write some custom JavaScript code to make the switch.

Magento 2 - preselect automatically customer billing address on checkout - when default is not set

When customer has set default billing and shipping address in his profile then on checkout shipping and billing address is automatically checked to default and customer is able to place order. In the case when customer didnt set up default addresses in his profile then customer needs to select address on checkout and then click update. After that he will be able to place order.
How to programatically preselect first billing address in dropdown on checkout so the customer does not need to do that, and to be able to click on place order without clicking update button?

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.

Requesting VAT in PayPal checkout

I'm using a PayPal BuyNow button on a website.
Is there any way the user also gets to enter his European VAT-ID (if he has one) when he enters his address data on checkout ? Or do I have to create my own form, just to get the VAT-ID ?
Also, since the website is selling digital goods, I don't need a shipping address, but only a billing address. Is there a way to change the label on the address form the user gets from PayPal ?

Paypal - how to restrict receiving payments only from debit and credit cards with indian address

I'm trying to use a Paypal "Pay Now" button on my website here: www.karmayog.in
When I click the "pay now" button on the right side, it takes me to a paypal page where there are options to enter details about the debit or credit card.
Is there a way on this page, by which I can only allow users who have an address in India to make a payment here. The website where this "Pay Now" button has been setup has certain legal restriction due to which it can accept payments only from Indian debit and credit cards. Hence, in the country drop-down field I would like to give only India as an option.
Is this possible?
Will greatly appreciate any inputs that can be provided!
Thank you.
Since user fills the card information on PayPal's payment page, you can not check if the details are of India or outside. However you should be able to achieve this by asking PayPal to do this check (if you have customization allowed in your agreement.)
One approach would be to ask the user's country before redirecting to paypal payment page. But there is a chance that user will select India on your page and United States on PayPal's page.