Facebook messenger payment error - facebook

I created a bot and I am trying to test Buy button following the instructions at https://developers.facebook.com/docs/messenger-platform/payments#test_payments and I did set is_test_payment to true. But I got the error “(#1158) No valid payment provider found. Please add a valid payment provider, it can be tokenized payment, stripe or paypal.” I understand the payment is currently only available to US, but I found no place to specify the location of my page is US. How should I fix this?

You have to set up a payment provider, even if you are going to be testing payments. Tokenized payments is the easiest way to go, just generate a key and add it with the Messenger Profile API.

Related

How to validate valid paypal id?

I am creating an android app which will be integrated to the paypal. I want to validate the email id provided by the user if its valid paypal id from the server side. I am unable to find any reference to validate valid paypal id. If their any REST api to achieve this or any function in the paypal android sdk, please tell me. Your help will be really appreciated.
The only way to validate whether an email corresponds to an existing PayPal account is to have the user "Log in with PayPal" and look at the response details you get back with that API.
Integration document: https://developer.paypal.com/docs/log-in-with-paypal/integrate/
Try the button generator in Step 4 as opposed to doing it manually.

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);

Paypal Payments Pro & Credit Card Subscriptions

I am developing a PHP site where you can sign up to a subscription with an initial amount.
I am using the PayPal NVP api as it seems the most comprehensive.
Setting this up with a PayPal user is fine. I am also trying to set this up for credit/debit cards.
When testing in the sandbox I keep getting the following response:
DPRP is disabled for this merchant
I have enabled BUSINESS-pro in the sandbox account as it suggests but I am still getting the error.
There seems to be lots of conflicting information in the developer documentation/ web searches that this functionality is still available for the NVP api service.
If not, can someone point me towards the correct solution or API reference to enable me to do this?
Many Thanks
If you want to use DPRP for sandbox account, you need to contact PayPal technical team to enable it, just submit a ticket at https://www.paypal-techsupport.com/ (click contact support at the bottom), someone will toggle the function for you.

Paypal sandbox showing wrong STORE name

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.

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.