Braintree sandbox accepts non-existent PayPal accounts? - paypal

It seems to me that you can type in any random username/password combination and both the drop-in UI widget and the backend will accept it as a valid PayPal account. The payment will go through and everything.
Is there a way I can set Braintree sandbox to only accept real PayPal accounts?

Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.
The Braintree Sandbox allows you to pass any email address and password you like into the PayPal dialog, as mentioned in Braintree's documentation. You can test with the fake PayPal nonces found on the Testing and Go-Live page, but keep in mind, Braintree didn't actually design the PayPal sandbox for handling end-to-end tests. All PayPal transactions made in the sandbox use the same, fake PayPal account. Because of that, there's no way to configure your Sandbox account to accept real PayPal accounts. We recommend that when you go live, you perform a few low-value sale transactions with each of the payment methods you plan to accept, including PayPal.
You can test cases where the information in a PayPal account is bad in the same way you would test a bad credit card: use one of the fake invalid nonces from our Testing and Go-Live page. If your code is handling those cases correctly, you can be confident that it will be able to handle a PayPal account with bad information as well.

Related

PayPal adaptive guest payment requirements

We are using the adaptive payment API to setup a payment between 2 of our users. The receiver user has a paypal account, the source (the one who pays) doesn't. We don't use any chained or parallel payments just simple tranffer from A to B.
We'd like to allow the source to pay with credit/debit card. The problem is that in some cases its allowed, and in some it isn't.
We found this document about the subject but it looks outdated, since in the limitations section it says:
Cannot be made to a personal or un-registered PayPal account
I have a personal account and it works with that but with my colleague's personal account (different country) it doesn't.
Not available if the API caller passes an email address in the request
envelope.
This is very vague. Pass where? We use the email address in the pay request but it works in some cases.
Could anyone give some up-to-date info about this subject?
Guest payments are only made available to certain countries no matter which PayPal product you are using (PayPal Payments Standard, PayPal Express Checkout, Adaptive Payments). So if a buyer is in a country that requires a PayPal account, then they will only see the option to "Login to PayPal" or "Create Account" when they land of the PayPal checkout page. Unfortunately there is not a list of countires in our documentation to show which countries allow guest payments and which don't.
Here are my findings together with PP_MSI_Colin's answer:
Documentations
Guest payment - integration guide (UI is different now)
Guest payment - adaptive payment
Account optional settings
Requirements
Upgrade to business or premium account.
Make sure the email address is verified.
Make sure that on this settings page the Paypal account optional setting is ON.
Limitations, exceptions
In EU, this option is limited to 10 payments/card
In some countries (tested in Hungary) a personal account can also receive guest payments.
In some countries it is always disabled. No official list found.
Logic
Even if it is enabled for a user, it is up to Paypal if they show it or not. Where its enabled it also depends on the paying user. If Paypal finds (from cookies, etc) that the user has a paypal account they don't show credit card option. To test it try to pay in an incognito window. PayPal’s fraud prevention measures can also cause the guest checkout to not be displayed in certain scenarios
Limitations for making guest payments via PayPal adaptive payments are documented here:
Guest payments cannot be made to a personal or un-registered PayPal account

Integration tests with PayPal

I would like to be able to test our integration with PayPal. We have sandbox accounts set up, etc, and I can even create payments. However, I'd like to be able to also issue refunds, query for refunds, and all the other APIs, all via integration tests and without human or even browser involvement. The difficult part seems to be that, of course, the PayPal flow requires someone to interact with a PayPal URL and approve the purchase.
Some more detail : We use the standard e-commerce flow on our site. User shows up, puts a product in a cart, proceeds to buy flow, selects a payment method, in this case PayPal. Of course, in PayPal's case, we create the Payment in PayPal and then simply show the embedded popup of palpal's flow where the user logs into their PayPal account and approves the purchase. PayPal does all this work. We simply get the response that 'yes, the purchase has been approved'.
So.. in an integration test environment, we can create the Payment entity in PayPal but.. how do we, in a sandbox environment integration test, get that payment approved? Is there a developer API available on the sandbox environment that says 'hey, this PayPal user approves this payment' or 'hey, this PayPal user rejects this payment', so that in test code we can simulate the buyer's flow. Or is there a way to set up a sandbox account to just 'auto approve' purchases or 'auto reject' purchases, simply for a test environment?
Yes, you can do anything in the sandbox that you can do on the live servers. This is a very broad question, though, so it's tough to answer.
For example, if you want to process payments without the need for any browser flow you'll need to have a billing agreement setup or a Pro transaction so you can run reference transactions. This would involve Express Checkout APIs and/or Payments Pro APIs, and reference transactions APIs. Depending on whether you're using Classic or REST, though, the API calls would be different.
In any case, once a transaction exists in the PayPal sandbox system you could then use the API to refund it. Same thing, though...you'd either be using REST APIs or Classic.
If you can provide more specifics in your question I can update this answer to be more specific as well.

Paypal - Sandbox - Open Test Account

After X hours of searching and lost-ing inside documentation and this community, I understand that, if :
I'm non US developer
my client is not a US company
I want integrate Paypal in market-place
sending several emails to Paypal support
I need to:
register as Business Account US in paypal.com ( and not in sandbox )
find an US user because I'm not, otherwise I need to fake my address, zip code and state
enter in developer.paypal.com
Someone can answer me YES ? or the right procedure ?
Thanks
from https://developer.paypal.com/docs/faq/#international-developer-questions
"I'm a non-U.S. developer. What products are available to me?
The REST API supports a number of countries and currencies. The REST API provides simple payment processing for common business needs, including PayPal payments, direct credit card payments, authorization and capture, and refunds. For more advanced payment solutions such as parallel and recurring payments, you can use the NVP/SOAP APIs.
If you've previously used our NVP/SOAP APIs, you can continue to use them. Using your old Sandbox email address and password, you can import existing Sandbox accounts on the Sandbox Accounts page."
I started on this page:
https://developer.paypal.com/developer/accounts/

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.

How do I verify my receiver for paypal adaptive payments

I have what seems to be an uncommon situation. I need to accept payments on my website and send them to various merchants that do their business though my app.
So the payment flow is:
Payer -> My App -> My Customer
This flow seems to be exactly facilitated by paypal's adaptive payments api and while I have pored over all their integration guides, there doesn't seem to be any documentation for even simple email to account verification.
My question is, how can I verify that an email belongs to a verified paypal business account, or perform some other hand shake verification? Is there a way to do that, or even a good workaround? Thanks!
Found this API endpoint today:
https://developer.paypal.com/webapps/developer/docs/classic/api/adaptive-accounts/GetVerifiedStatus_API_Operation/
It seems to do what I wanted, and it at least indirectly test account existence and definitely tests the verified status.
One caveat that I would add for posterity is that in sandbox mode, you may only test against sandbox accounts that you have created for your app.