UNAUTHORIZED_PAYMENT ERROR - paypal

While I am using my sandbox credential with test card my code is working fine and response.Status is coming as "approved" but when I try live credential with my real card its throwing "UNAUTHORIZED_PAYMENT" error.
This is the error I got:
{"name":"UNAUTHORIZED_PAYMENT","message":"Unauthorized payment.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"c446507b37b6c"}\"https://developer.paypal.com/docs/api/payments/#errors\",\"debug_id\":\"c0d38fae9eade\"}"
The difference between my sandbox account and live accounts are,
Someone please help me to overcome this issue.

I got the same issue. It is not said load enough while playing with the sandbox, although Paypal knows exactly my Locality.
Anyway, only US and UK developer can use REST API for vaulted credit cards payments.
From that link:
https://developer.paypal.com/docs/faq/#international-developer-questions
"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."

Related

BrainTree & Paypal Account Linking

I am using Paypal for payments in my software. According to recent announcements from Paypal, /payments end point is deprecated and will not be working anymore. So they have mentioned in their API docs to use BrainTree for payments.
So I created a sandbox account for Braintree and link my Paypal account with it. Both accounts are in Sandbox mode.
According to following documentation, these accounts will not share data because these are in sandbox mode.
https://developers.braintreepayments.com/guides/paypal/testing-go-live/ruby
I have some queries regarding this, which are mentioned below:
Will these accounts share data with each other in live mode ?
If they share data in live mode then,
On Braintree, customer creation is required but on Paypal there is no requirement of creating a customer to make payment through card. So how they will share this data ?
Will they share cards details also? If yes, then Paypal returns card id which is used for transaction and Braintree returns Payment method token for each card to be used for transaction later. Will these details will also be shared ?
How amount can be refunded from Braintree ? Is there any end point for this ? Or for refund I need to use Paypal refund api ?
So, these are some questions which are striking my mind. If anybody can answer these queries, it will be very helpful for me work on Braintree.
Thanks!

Paypal Rest API Payment or Braintree Payments

I used the Paypal NVP API (Express checkout) for a long time and it worked fine. I'm now developing a new project and wanted to use the 'new' Rest API that Paypal recommends for new projects. I, however, find the documentation rather imprecise at some points and often contradictory.
I'm using their sandbox to test the payments and I noticed that the payments work fine, except that once I log in to the Paypal Buyer account, I can only select the PayPal balance to pay.
Is this a limitation of the Rest API? I want to clarify that I am based outside the US and I do not want to accept credit card payments on my own website (well, if there is no other solution, I would accept it). I'd rather have the user get redirected to the PayPal page and provide his credit card information over there. I do, however, want to give the option to the user to at least select from PayPal balance or credit card. (As I'm used to from the NVP API)
UPDATE
In the meantime, I've done a lot of additional research. On the PHP SDK page, they've added the following notice:
Important: The PayPal REST API no longer supports new direct credit card integrations. Please instead consider Braintree Direct; which is, PayPal's preferred integration solution for accepting direct credit card payments in your mobile app or website. Braintree, a PayPal service, is the easiest way to accept credit cards, PayPal, and many other payment methods.
How should I understand the direct credit card integration? Is that the credit card payment on the PayPal website after being redirected onto that page or do they mean credit card payments where the card number is provided on ones own website?
I've got the impression, PayPal is entirely shifting to Braintree Payments. Even on the official PayPal Developer website, they propose Express Checkout for quick (client side only) integrations and Braintree Direct for other payments.
This is what I need:
PHP integration of the API calls
Payment methods: PayPal balance, Different Credit Cards
eventually recurring payments
I do not need:
Third party invoicing
client management
shipping address management
So my concrete questions would be:
What's the difference between Braintree and PayPal payment methods (since they belong to the same organisation)?
Should I use PayPal Rest API or Braintree solutions in my case?
What are those PayPal limitations that they list on their website?
Has nobody got any experience in this domain? Even partial answers are welcome!
I have partial answer, as I am also in the process of choosing between BrainTree, PayPal Rest API, and Express checkout.
I'm here to answer "How should I understand the direct credit card integration?"
I'm no expert on the subject, but during my recent work at the area of integration with checkout systems, I've learned this:
One of the types of credit-cards is called "direct credit card". It means that it is directly connected with a bank account - when it is billed, the money is instantly transfered from the connected bank-account to the merchant. This is different than how most credit-cards work - most will only charge the bank-acoount at the beginninng of the next month.
I've come accross situations where direct cards behave differently than regular credit-cards.
For instance - the checkout-system I integrate with doesn't allow to monthly-bill a direct card. direct card on a monthly payment plan have to be billed manually.
So for me, the PayPal announcement you qouted means a lot - I need to support direct credit cards, hence I'm choosing BrainTree. Thanks!
Note to moderators:
I originally wanted to post this as a comment to the question, becuase I thought it would help the OP. I don't have enough reputation to comment, so I posted an Answer.

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/

Braintree sandbox accepts non-existent PayPal accounts?

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.

Credit Card payments not working Paypal

Hi I am implementing paypal API on my website where different vendors come and sell their products.Currently I am using sandbox environment.Payments are working perfectly using paypal account but payments are not working using Credit Card.Getting following error:
We are sorry, we are experiencing temporary difficulties. Please try again later. If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment.
For some browsers, this problem can be resolved by clearing or
deleting cookies.
Message 6838
Any ideas?
If this is an issue that is happening with every transaction, make certain that you are using live credentials with live endpoints.
If you are using Express Checkout make certain you have the correct API Signature credentials.
Below are two links for going live and correct API Endpoints:
PayPal Developer Site, Going Live
API Endpoints
If this is happening on only a handful of transactions it may be a technical issue.You can submit a ticket to PayPal Merchant Technical Support