Paypal sandbox showing wrong STORE name - paypal

I have tested my paypal payment with sandbox account using my API details. Now I want to use Clients API details for sandbox and changed code accordingly. But it still redirects me to the previous store.
Any idiea what is wrong i am doing.

it looks like your code didn't change the API credentials in some way. Try to check again the new APIs that you want to use and replace the previous one.
Usually, for example in ExpressCheckout, when you initially call the SetExpressCheckout you provide the API credentials of the seller so that when the checkout is displayed you can connect to the seller shop to pay and all the money will be directed there.

Related

Transaction description and app name not showing with PayPal REST API

I am using PayPal Payments REST API to accept payments on some website.
Just now I noticed that both the transaction description as well as the app name (which you configure in developer dashboard) are no longer displayed. Why is this? Some recent change? Or something with my account?
It is very bad as I have a single company PayPal account which I use for various websites and the app name & transaction description is to give the corresponding payment flows their own identity. Currently people abort payments because they don't understand why the details in the payment overview on PayPal are completely different/unrelated from where they initiated payment.
Please see image below for what I mean.
If anyone can confirm this is happening for everyone now and/or refer to some PayPal documentation/statement regarding this topic then please share. I could not find anything on PayPal developer resources.
To display a 'custom' name, you need to create a custom 'Web experience profile'.
I was utilising the PHP SDK so did so by following their sample code.
You can also create a 'Web experience profile' with a direct request to the relevant API endpoint.
Once you have created the profile you simply set the identifier on the Payment object (PHP) like so:
$payment->setIntent("sale")
->setPayer($payer)
->setRedirectUrls($redirectUrls)
->setTransactions(array($transaction))
->setExperienceProfileId($this->config->paypal->experienceId);

Verifying paypal account

I am building website which requires customer to update paypal account.
Is there anyway to check the reality of customer's account?
When my customer fill out their paypal account in my site, I want them to be directed to paypal login page to login and paypal will return the result.
Does paypal api support this situation?
Pretty much any implementation of PayPal you choose would follow the flow you mentioned.
Payments Standard would allow you to create basic buttons or create an HTML form and POST directly to PayPal to process. It would send the user to PayPal for login and approval to complete the payment. The transaction details would include the payer status (verified or unverified) as well as the address status (confirmed or unconfirmed) and lots of other details about the order.
Express Checkout is basically the API version of Standard, but it's much more advanced and open to integrate in the way that works best for your site or application. In this case, some of buyer/transaction data is available during the process within your app through API requests and responses, and then you can also get to it via transaction details after the fact just like payments standard provides.
Another option would be to use Adaptive Payments, but if you're doing a general payment of any kind you probably don't need that. That's what you would use if/when you start wanting to split payments among multiple receivers within the same transaction, setup preapproval profiles, etc.
If you happen to be working with PHP my class library for PayPal will make the API calls very simple for you.
You could do what PayPal itself does when you register. Send them a few cents and have them tell you how many when they get it. The payment itself will fail if the account doesn't exist, and telling you how many cents proves that they own the account.

PayPal IPN and live accounts

A user clicks on a buy now button on my website which takes them to PayPal where they can purchase my item. I then receive the relevant information through my IPN listener. This all works fine with sandbox accounts.
To implement this with my live business account, am I right in thinking I don't need to worry about creating live API certificates etc? I understand this is needed when making API calls to live accounts but I'm assuming a simple buy now button doesn't need this stuff setup.
Correct. You only need API credentials when you will make an API call. IPN is a push notice, so PayPal is sending the data to you instead. All you need to do is post the data back to PayPal to verify it and then process the POST data.

Check if paypal email address is a verified user

I would like to check if a paypal user who tries to buy something from my site has a verified account before he makes purchase.
Once the user isn't verified, any payment he/she makes would fail. Funds will be returned back to user automatically.
Is there any code I can add or edit to make this work due to fraud issues.
Well I found this
https://www.paypal.com/us/verified/pal=emailhere
where if i replace emailhere with any email i get verified or unverified.
I would like to add this to the code.
Thanks
If you're not already, I would recommend using the Express Checkout API. This will allow you to check the payer status prior to finalizing the payment.
The SetExpressCheckout API would generate your token that you use to redirect the user to PayPal with. They would then sign in, review the order, and click continue which would send them back to your site.
At that point, you can call GetExpressCheckoutDetails to obtain all the buyer details including their verified status.
To finalize the whole thing you would call DoExpressCheckoutPayment. In cases where the payer is not verified, though, you could simply stop the flow and leave this call out. No payment will have taken place so no refund would be necessary. You can simply display a message that they need to verify their account prior to making purchases from you.
If you happen to be working with PHP I would recommend taking a look at my class library for PayPal. It makes all of this very simple for you.

How to get paypal API credentials?

I am using Paypal recurring payments and direct payment.
I tested it using beta-sandbox and works fine.
Now I want to make to real paypal account.
I have been given real paypal account, and I login with it on https://www.paypal.com/, but I don't know how can I generate API Credentials ?
this looks completely different from sandbox environment.
Check out this guide to Obtaining API Credentials from PayPal. You will find how to create/view/remove your API signature/certificate in PayPal's live setting.
Update
As per the comment, the previously held answer is out of date. To obtain your API credentials, log in here.
If you want to retrieve the api user name, api password and api signature for live then you can get it directly by log in to this url from Paypal.
Log in to Paypal. Click Tools or hover over Tools and click All Tools from the drop down menu. Sort alphabetically and API Credentials will be the first one.
Login to PayPal, go to Profile and then Selling tools. Click the update link on API access and request API credentials. Refer to this link for a detailed step by step guide.