To give you an overview of my platform, I am using Angular.js 1.5 and Laravel 5.1.
I am using the Paypal REST API SDK for PHP. I have followed the instuctions from this Medium article. On my front end Angular side, once I successfully call the first "postPayment" function, I receive the redirect url, which I redirect to. Once the user completes their payment successfully on the paypal side, the return url comes back to my confirmation page where I handle the "getPaymentStatus" function from the Medium article.
I am using a Sandbox account for testing purposes right now, but I am able to successfully complete the transaction when a user logs in on the Paypal side. However, when a user tries to go through as a guest "Debit/Credit card", enters their information, and completes the transaction, I receive this 400 error in the console:
POST sandbox.paypal.com/webapps/xoonboarding/api/onboard/guest 400 (Bad Request)
jquery.min.js:5
On my Paypal profile settings, I have activated the Account Optional in the My Selling Tools->Website Preferences. I have been looking for other instances of this, but I cannot find a solution. I have tried using the test credit cards with various phone numbers, but that does not resolve this issue.
Has anyone dealt with this issue before? I am in the dark and do not know how to handle this.
I would appreciate any help in this. Thanks in advance!
Related
I am using PayPal API of php. It was ok since 2 years but now its creating problems for some customers. Some of the orders are fine but for few users, the transaction is completed but API doesn't response (throw empty response).
I don't think it will be because of code issue. I am unable to track the issue. Anyone know, why it's showing the random behavior.
The interesting thing is, for the same customer, doing the second time transaction, it works fine. Totally random behavior. Please need expert suggestion.
Please contact PayPal Merchant Technical Support, provide with your PayPal account and API request example which go empty response.
https://www.paypal-techsupport.com/
I am working on integration of liqpay payment gateway to site using their available documentation at: https://www.liqpay.ua/en/doc/checkout.
so far I have integrated their checkout method (client-server). user clicks subscribe and it redirect user to liqpay checkout screen. but problem is when user cancel transaction or it is successful user. user just redirect back to given return flag available in their argument list. without any status code or message in url like other payment gateways do.
Need suggestions on it. if someone has experience in working with Liqpay.
While working around in admin panel i found some thing which help me upto some extent. with these settings i was able to get auto redirect to my site as well as some response from API after cancellation and successful payment. and when user cancel transaction it return back with "code" = cancel. attached are the settings and response in case it helps any one.
Settings
Response
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.
So I have a paypal shop set up, im using the rest php api. for credit card transactions, the api allows me to make my own form on my site, but if paying with a paypal account, part of the api call redirects a user to the paypal.com site to log in. I understand that for security reasons, paypal doesn't want the user giving their username/password to my site. However, i do not want the user to be redirected away from my site. is there a way to make that auto redirect in a new window, instead of the current window being changed? Ideally, the flow would be pop paypal.com window, complete payment, close window, and now back on my original page.
is this possible?
PayPal has a feature that does exactly that. It is called DigitalGoods. Unfortunately, it is still not available with their REST API.
If you examine their REST API then you'll notice that you are handing over the control of workflow to PayPal and you don't get to open or close windows.
So, no. You cannot do what you are trying to do with the REST API.
After banging my head several times on my desk I gave up on their latest and greatest REST API and went back to their DigitalGoods API. My suggestion is you do the same and save yourself the agony I went through.
BTW, I recommend using a library such as this one. This way you don't have to learn the innards of the Digital Goods API in order to use it.
After successful Sandbox testing for Website Payments Standard, I'm going live now. When I click on a "Buy Now" button, I should be able to see a page that shows me the total quantity on the left, and allows me to log in using PayPal on the right.
But I just get the following page, which also says "Test Site" at the top, although I'm no longer referring to the sandbox:
The error is: Paypal cannot process this transaction because of a problem with the seller's website.
I've done the following things:
Made sure I've changed the API endpoints to live production (basically, eliminate "sandbox" from the URLs.
Made sure I'm using the seller API crendentials from my seller account (not sandbox test API).
I'm using an IPN listener and have set $listener->user_sandbox to false (although I don't think the listener is even loaded yet at this stage).
By the way, if it matters, I'm using PayPal's ButtonManagerAPI to dynamically create hosted buttons, and I'm using NVP API calls with PHP. Everything worked as expected in the sandbox. This was my relevant API code:
"METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature&BUTTONCODE=HOSTED&BUTTONTYPE=BUYNOW&L_BUTTONVAR1=amount=".$usd_total
I tested your API request against my account and it is working correctly. It correctly generates a button, and then I am able to go through with a buyer account and make a purchase, so it looks like the issue is with the account you are using to generate the button. Can you provide either the test sandbox email, or the merchant id for the account that you generated the test sandbox credentials from so that I can take a look at the account and see what the issue may be?
I was getting the same error message until I removed the ng-model reference (angularJS) in the button html code.
I was actually getting this issue from simply not having the correct product ID in the form. Once I updated that it worked for me.
Hope this helps!