I am getting the following error when trying to use paypal API
{"error":"invalid_client","error_description":"Client Authentication failed"}`
I have configured the paypal sdk REST API and successfully generated the live app id.
But in the my account page in account eligibiltity for debit credit card and rest of two option when i click enable it show me
Note: Live credentials are disabled for direct credit card processing
in your app. At the moment, we can't enable this based on the
information provided. You will be able to try again in 90 days. For
more information, please visit the PayPal Help Center.
Is this the problem. what can I do to figure it out ?
One more thing sandbox is working fine.
Yes, this error is going to be your problem. You are attempting to use Rest API to process direct credit card payments, but your account has not been approved to process direct credit card payments using Rest API. That error message means you were either declined for using PayPal Pro via Rest API(the ability to process direct credit card payments), or your Rest application is stuck and still needs to be reviewed. I would suggest contacting PayPal support to have the Rest application escalated for review.
Related
I integrated OmniPay in my project few days ago, and I wondered if there is any option coming with it to actually enable credit card payments.
https://github.com/thephpleague/omnipay
I want to understand how to enable the PayPal credit card payments (which do not require an paypal account) using it.
What PayPal API settings should I enable?
How can I code this?
Is there any option to do this using PayPal & PHP at all ?
I tried to document myself on this and I couldn't find any answer to this question. Neither on the https://github.com/thephpleague/omnipay nor on Stack.
The setting mentioned in comments, 'PayPal Account Optional' exists so you have the ability to only accept payments from people with an account (when set to 'No').
If set to 'Yes', payments without an account can be possible. But whether the option will be offered to a particular payer in a particular PayPal checkout attempt depends on very many factors, which you do not control.
The only way to have some guarantee of a guest method being offered is to show a credit card form on your own site, before the buyer reaches a PayPal.com page, using the black 'Debit or Credit Card' button that is part of the JS SDK. You can see an example demo here: https://developer.paypal.com/demo/checkout/#/pattern/server
That JS code used for payer approval can be paired with any backend to create and capture the order via API -- including Omnipay, which essentially acts as a proxy for the PayPal API. This JS replaces any redirect over to PayPal which you might be familiar with from oler legacy integrations; the JS SDK is a more modern way to get the payer's approval, via a small in-context window or open a credit card form iframe instead which is a better UX than redirecting away anyway.
Recently I visited Paypal Rest API page https://developer.paypal.com/docs/integration/direct/payments/. I noticed an IMPORTANT message there please find below screenshot:
If this API now restrict to process Card Payment then Is Billing Plan and Agreement API (for Recurring/Subscription Payment) also restrict Card payment?
Please help me
The ability to process direct credit card transactions via PayPal REST API for new integrations has been restricted. That means that the "payment_method":"credit_card" option is no longer allowed to be use with any new REST API integrations, including for the Billing Plan and Billing Agreement API's.
We apologize for any inconvenience.
I am getting the following error when I use this API:
{"error":"token_already_used","error_description":"Token already used.
Card tokens can only be used once, to create a charge or assign a card
to a customer"}
I have a card token card_4KDerBMsGjr0Rns3rNfwCQresult which I have used in the charge API for making payments.
My account is in test mode, but when I check the dashboard page of my account in the charges page it shows that the credit card has been charged, so why am I not getting any successful response?
I have followed the docs from the website only. I am novice, using this payment gateway for the first time.
I have fixed out this problem of mine . I called exec() function twice using curl , that was the reason this error was shown
I have integrated Paypal extensions (standard and express checkout) to my opencart. But I have few queries regarding the flow.
How can I enable direct credit card payments? I have already tried enabling it at accounts in developer console but I was shown this message:
Note: Direct credit card processing is not available for you when using REST APIs. Your live credentials are inoperable for direct credit card processing for your country but your test credentials are enabled for sandbox testing.
I am getting "security header invalid" error when I try to do a payment with expresscheckout. Not sure how where can I get exact API details
Is there any way I can implement paypal in-context flow in opencart?
1) Only US, UK, Canada and Australia countries merchant can apply direct credit card payment. Based on your error message, it looks like your PayPal account doesn't belong to these countries. please correct me if I'm wrong.
2)"security header invalid" means the API credential is incorrect. Please get your API credential at https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run after login.
3) Refer to http://forum.opencart.com/viewtopic.php?f=123&t=147345 , there are some preconditions before you use in-context flow in opencart. You can confirm with opencart support team directly.
Hope these information could help you.
I am aware of this recommendation How to send money to any paypal account but what I've tried so far seems unsatisfiable to me...
I am working on a social networking site on which I want to allow users to pay for services via paypal account. The actual payment should transfer money from a user's paypal account to my paypal account.
Here is what I came up so far. I tried to use adaptive api and PAY option and it works if I use my account and my credentials to send money to some other user. I have biz account and this is known as implicit approval. If some other user wants to pay me in this way he has to have business account and to allow my app to save his credentials like his paypal userid, password and signature which is not good.
Next thing I tried is to use permissions api for that purpose. As far as I understand this should work similar to generating token that allows my app to post on facebook on behalf of user. I've managed to create a signature as specified in the permissions api documentation for the following permissions:
$permissions = array('DIRECT_PAYMENT', 'MASS_PAY', 'TRANSACTION_DETAILS');
And now I don't know how to use this signature to transfer money to my paypal account from the paypal account that granted my app the above mentioned permissions.
Any suggestion on what I am doing wrong or better way to do this?
Um, correct me if I'm wrong here, but what you propose is a fairly regular checkout flow with one buyer and one seller (recipient).
You can use PayPal Express Checkout for this and simply set NOSHIPPING=2, which will turn shipping address collection off.
Alternatively, if you have a US PayPal account, sign up for PayPal Express Checkout for Digital Goods at https://www.paypal.com/digitalgoods and you'll be able to use a fancy JavaScript-based LightBox checkout experience (also referred to as 'inline checkout').
Express Checkout is fairly in that it only requires a minimum of two API calls; SetExpressCheckout and DoExpressCheckoutPayment.
SEND: SetExpressCheckout and supply a RETURNURL, CANCELURL, AMT (amount to be charged) and your API credentials.
RECEIVE: You'll receive a TOKEN back from PayPal. Append this token to the following link: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXX (where EC-XXXXX is your token).
Once the buyer agrees to the payment, he'll be redirected back to your RETURNURL, after which you can either automatically, or after showing a purchase summary, call DoExpressCheckoutPayment. Supply the TOKEN again and include the PayerID (returned in GET appended to RETURNURL, or available by calling GetExpressCheckoutDetails with the TOKEN).
Once DoExpressCheckoutPayment acknowledges with ACK=Success, the funds will have been transferred from the buyerÅ› PayPal account balance and/or card.
Take a look at https://www.x.com/ > Dev Tools as well for further documentation, sample code and their SDK's