I took on a “small” project which I shouldn’t have – it’s becoming more trouble than I anticipated, and the majority of it stems from integrating with paypal. Their documentation for integrating with their services is (intentionally?) vague. While there certainly is a huge amount of it, there are things which are just ignored, like setting up a sandbox account. They do offer a complete “sandboxed” environment, with separate servers and all that, to ‘practice’ your development in. However, you can’t use a ‘live’ account with the sandbox environment. This triggers a ’10002′ error – ‘security headers are invalid’. Overlooking the fact that in their documentation a 10002 error doesn’t actually have that text, but something else entirely, it doesn’t actually give you any clue as to how to fix the problem, or indeed what the cause of the problem is. In my case, it was that I was using ‘live’ credentials against a sandbox URL.
Fair enough – changing the URL to the ‘live’ payment URL works, but I don’t want to be continually charging a card during testing. After much digging and googling, I found a way to get to their sandbox developer center. The process for setting up a sandbox account is *identical* to setting up a regular account, and that’s the problem. You have to create an entire new company and company profile, username, password, email address, etc. And the ‘click here to register’ emails are ‘sent’ but not to your email address. “To avoid confusion” (their words) the emails are sent to their sandbox web-based email reader accessible through their sandboxed developer server. Visiting the URL I was to ‘click’ to verify my account brought up half-empty pages that only had a link to ‘resubmit this form’ (or something like that). The whole experience has been horrible. But then again, they want to push your business to their paid ‘partner’ developers or to just use the paypal shopping cart in the first place.
The last piece is the kicker. The sandbox service won’t give me the required sandbox API keys until my sandbox account is ‘verified’ – with real bank details. This also means that I have to wait a few days for trial deposits to occur in my bank account. All of this real-world processing is required to set up a TEST account? Oh, and they couldn’t ‘verify’ another part of my account because my SSN didn’t verify with them!
PayPal – please make dealing with you easier. I can never again in good conscience recommend paypal as an ecommerce solution to someone who wants to keep the client on their site for a consistent ‘look and feel’ experience.
I’m working on a PayPal driven site at the moment (it’s being used to sell subscriptions), and I fully agree – their API is mess.
However, for sandbox accounts, you can enter a certain sort-code and any 8 digit number, and it will be recognized as a valid account, and allow you to validate the PayPal account. They have a similar system for credit cards as well.
The manual for the sandbox can be found at:
https://www.paypal.com/en_US/pdf/PP_Sandbox_UserGuide.pdf
Thanks for the link. I’ll bear it in mind for the next project. As it stands, the client has a hard deadline and we ended up just opting for the ‘buy now’ button which takes people to the paypal site. Not what they wanted originally but certainly easier and able to keep the project under budget.
Thanks again.
I also been working on billing for the upcoming premium subscriptions
for the phpclasses.org site using Paypal as means to charge the paying
users.
Paypal documentation is confusing and it seems to miss some things that
I did not find anywhere like the error codes.
Anyway, I just followed instructions of the Paypal Hacks book by
O’Reilly and so far it had been a breeze. I have reviewed that book some
time ago here. If you need to integrate your site with Paypal payments,
I think this is a good straight to the point guide.
http://www.phpclasses.org/reviews/id/0596007515.html
I have not yet used the Paypal Web services API. I only integrated with
PDT. But the book clearly explains how to setup fake bank accounts and
add funds to work with the Paypal Sandbox. So you do not need real bank
accounts.
You just follow the steps to add a bank account. In the Sandbox add bank
account page it shows the account field with a fake account that you can
use. Then you go to the Get Verified page and choose the bank account
you want to confirm. Just go ahead and the account is verified.
Hi ,
If you want to know more on Paypal API you can also check this webpage http://www.webjax.eu/p/212-Paypal-api and some others that provide informations on Paypal API.
Thank you for your great website, see you soon on webjax maybe
Michael, I feel your pain. The sandbox doesn’t even work right now here in Feb 2008 — it errors out all over the place. Gives you a warm fuzzy feeling of trust, doesn’t it, that they’re not going to screw up the recurring subscription schedule, right? Not.
Therefore, I’ve switched to pseudo-subscriptions in PayPal, rather than ordinary PayPal subscriptions, which are painless. These don’t use IPN or PDT and all that trouble. You just use a BuyNow button and *you* handle the subscription renewal emails and the renewal timer. Makes it 100x easier.