i have a big Problem.
I build my own Shop and now i'm trying to integrate Paypal.
I successfully integrated Paypal with Sandbox. Now that I'm changing to the Live Mode an Error appears:
API Error 10411 - This Express Checkout session has expired. Token value is no longer valid.
It doesn't make any sense..
Normaly this Error appears if the client needs to much time to complete the transaction, but i don't need more than 30 seconds.
Actually everything works until reaching the return-Site, here comes the answer "FAILURE" and this error message.
The strange thing is, that everything works fine with Sandbox, but in the Live-mode my token is invalid. I checked the API Name, Password and Signature almost a hundred times and it should work.
Does anybody has any ideas why this Error appears?
Thanks for your help!
I had the same problem.
My mistake was :
- SetExpressCheckout was made toward paypal sandbox
- GetExpressCheckoutDetails was made toward real Prod Paypal
So double check that the Token you get from PaypalSandBox is used with PaypalSandbox (and same thing for real Paypal)
i had the same issue, and i was in sandbox mode when checking the token. so always be sure to test against the LIVE system and not the sandbox
Related
I'm trying to complete a transaction on paypal sandbox and my request always return timeout error.
I've look everywhere for this problem that seems to be pretty recurrent but no solutions seems to work for me.
Thanks!
Finally, I've found solutions to my problem.
as pointed out by ppmtscory on the php-Paypal-SKD github forum, you shoud not use credit card number 4111111111111111 because it as been overused and it is flagged as so in the system and cause this type of behavior.
https://github.com/paypal/PayPal-PHP-SDK/issues/519
#artisangang I will be closing this issue as it doesn't have to do with the SDK itself. This is due to the specific testing card number being overused in the system causing a timeout. #pp-randy has already filed the internal ticket to do a DB update to try and correct this for the sandbox environment but it's not something that will likely get very high priority. If you need test credit cards, please visit this page and utilize Step 4.
i've been using PayPal REST API since some months to handle sale payments programmatically without problems, both on live and sanbox platform. From a couple of days I figured that, only for sanbox, is impossible to finalize (execute) payments using resource POST https://api.sandbox.paypal.com/v1/payments/payment/PAY-xxxxxxxxxxxxxxxxxxxx/execute, indeed I get every time INTERNAL_SERVICE_ERROR response with status code 500.
Last response:
Got Http response code 500 when accessing https://api.sandbox.paypal.com/v1/payments/payment/PAY-xxxxxxxxxxxxxxxxxxxx/execute. {"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error has occurred","information_link":"https://developer.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"2205fb9528a0f"}
Any idea about what is happening?
full disclosure, I work at PayPal leading developer advocacy.
There was an issue with sandbox today and we escalated it through to try to have it resolved. I'm being told that the issue should now be resolved. In my tests on sandbox, the payments are going through. Can you please let me know if you're still encountering the 500 errors? If so, I'll send that back to the team.
Others are experiencing similar issues:
PayPal REST Sandbox API giving INTERNAL_SERVICE_ERROR
I'm experiencing the same only when using 'paypal' as the payment type. Submit a ticket to paypal at:
https://www.paypal-techsupport.com/app/home
Using PayPal NVP PHP API. When a payment is submitted $ACK response equals "FAILURE" with the long message "THIS TRANSACTION CANNOT BE PROCESSED. PLEASE ENTER A VALID CREDIT CARD NUMBER AND TYPE.".... however the payment does go through. I end up getting paid multiply times because of the Failure response error. Does anybody have any experience with this?
It sounds to me like you must somehow have duplicate API hits happening, where the first one includes all the correct details and processes the payment, but then you have one following that up which is empty and returning the error, and that's the result people are seeing on the site.
I would make sure you have logging setup of some kind so you can see all of the API requests and responses, and then when you run a test order check to see if you're getting more logs than you expect.
I'm using PayPal REST API v1 for handling payments and from time to time I get errors during payment execution (.../payments/PAY-XXXXXX/execute). Specifically I have run into TRANSACTION_REFUSED and PAYMENT_STATE_INVALID so far. What is the correct way to handle them? Documentation isn't very extensive about these.
From what I understand, TRANSACTION_REFUSED means a problem with Payer account such as rejected card transaction or insufficient funds. In that case I display an erro message that PayPal has refused the transacation and user should try again. Is this a way to go?
PAYMENT_STATE_INVALID is a mystery to me. I get that the payment should be in another state but how do I check if it has a correct state after creation? And how should I handle this error?
Thanks for any suggestions!
I'm using standard php sdk, version from 5. 5. 2014.
This is only a partial answer to the PAYMENT_STATE_INVALID question. You can get the current status of the payment by fetching the "self" URL you initially got from the payment. That way, you can confirm the state of the payment, and maybe try and deduce why it's in the wrong state.
In my judgment, you should need to "handle" this error, since if you do the preceding steps correctly, the payment should always be in the correct state when you try to execute it.
As for the TRANSACTION_REFUSED question, I too would very much like to know.
up the pay-pal advance in magento . I have fill all the credentials in magento admin . BUt when i go to frontend and click pay-pal button it gives
PayPal gateway has rejected request. Security header is not valid
(#10002: Security error
i have googled a lot and found some suggestions like
Remove API Username, API Password and API Signature from
Admin->configuration->Paypal->API/Integration Settings. clear cache
and test again
i have tried all these but it still gives the same error.
Please suggest me what can be the issue
The Security header is not valid error is only caused for two reasons:
Wrong credentials
Make sure that you've put your API Username, API Password and API Signature correctly. Sometimes it happens that during copy and paste there is accidently a space added, this would trigger this error.
Doublecheck this settings in the SDK or in the admin panel of your third party shopping cart.
Wrong Endpoint
This error would come up if you send the data to the wrong endpoint. Make sure that you sending the live credentials and data to our live endpoint. When you want to test your store make sure that you use our test endpoint and the credentials from your sandbox test account.
If you are using a third party shopping cart, make sure that your store is running in test or live mode, regarding which credentials you are using.
You can check for your credentials here too:
FOR LIVE
https://api-3t.paypal.com/nvp?&user=xxxxxxxxxx&pwd=xxxxxxxxxx&signature=xxxxxxxxxx&version=70.0&METHOD=SetExpressCheckout&RETURNURL=http://www.paypal.com/test.php&CANCELURL=http://www.paypal.com/test.php&PAYMENTACTION=Sale&AMT=50&CURRENCYCODE=USD
FOR SANDBOX
https://api-3t.sandbox.paypal.com/nvp?&user=xxxxxxxxxx&pwd=xxxxxxxxxx&signature=xxxxxxxxxx&version=70.0&METHOD=SetExpressCheckout&RETURNURL=http://www.paypal.com/test.php&CANCELURL=http://www.paypal.com/test.php&PAYMENTACTION=Sale&AMT=50&CURRENCYCODE=USD
Just Substitute the user, pwd and signature and enter in your browser.
You should get ACK = SUCCESS if you have input your credentials correctly.
You can also get your credentials here : https://www.paypal.com/cgi-bin/webscr?cmd=_get-api-signature&generic-flow=true
This error simply means your credentials are wrong.
Please check with the credentials. If you are using sandbox then you are supposed to provide facilitator related credentials.
Dont let the others fool you, they just type in stuff here they googled on the internet.
Look for the number you get here: https://developer.paypal.com/docs/classic/api/errors/
Because the information provided by these code is a delicate matter, they display this error message instead of you account is locked, account restricted, limit exceeded and so on.
Thats what they told me, at least.
We also get this code from time to time, after hundreds of paypal transactions, so wrong paypal credentials from the side of the shop owner is quite unlikely, isnt it? ;)
If you are using PayPal Payments Advanced with Magento, you should be using your PayPal Manager credentials, and not your API Credentials.
This could be the reason you are getting Security Banner Header not valid 10002.
Here is the integration steps from Magento:
PayPal Advanced Integration with Magento
You need to setup Layout C in PayPal Manager PayPal Manager Login.
Make certain that you include your error URL, cancel URL, and Return URL. Magento is very good about telling you what URL you should be using.
After you have setup Layout C in PayPal Manager you need to use your Manager Credentials in Magento.
Just in case you need it, here is the information on setting up your Hosted Checkout Pages in PayPal Manager:
PayPal Hosted Checkout Pages
Here is the information on where to find your PayPal Manager credentials:
Partner: Your PayPal Partner ID. Most direct Merchants have PayPal as the Partner
Vendor: Your PayPal user login name. Also known as Merchant Login
User: The ID of an additional user set up on your PayPal account. Same as Merchant login if you have not setup a separate user id in PayPal Manager.
Use your API Signature Credentials from your PayPal account for the Express Checkout setup.
In my case everything seemed fine at Magento level. I asked client questions about PayPal, at which point they tried to login to the paypal.com site and were unable to (authentication failed). Account had been locked. Client was able to resolve with PayPal tech support directly, no Magento issue after all.
I got the same problem and found the problem is
I type the API signature character by charter, the character "I" is similar to "l"
As there are multiple "I" in the signature, I have to tested one by one via the link mentioned by Vimalnath.
Then damn it, it works.
Therefore, copy is a better way while being careful about the spaces at the front or end.