11
votes

I have a database table full of items that were selected to be purchased by a customer, and need to send them to PayPal as an order so they can pay for those items.

My problem is that existing shopping cart solutions require you to either manually enter each existing product into their database online (which is pointless for me, since we have over 1000 products, and over 500 variations of each product), or they require you to have your database table setup a certain way, and I have tried that, with 4carts, including one that I paid a great deal amount of money for, but refuse to offer support for it, and it is abosultely useless.

So, my solution is to roll out my own payment page where i grab the order details (product name, qty, price and freight charges from the database, then send them to PayPal, and from there on, paypal handles the rest.

But I have no idea how I would even begin doing this, and I have studied the PayPal website, and it all seems so confusing and I just don't know where to begin. Are there any working samples floating around that you could please share with me?

I just need to be able to send what's in my database to paypal so the user can pay for those items.

Any help at all is greatly appreciated.

Thank you!

1
I would recommend you read my security hole regarding this: stackoverflow.com/questions/1469899/…RobertPitt
Thanks, @RobertPitt. I'll check that out too! :)anon271334
You should pick an existing and contemporary class. Try stackoverflow.com/questions/1676758/php-paypal-class or phpfour.com/blog/2009/02/… or PEAR_Paypal and watch out / test that it handles the API interaction reliably.mario
I just read your post on that page. Thanks for sharing that info. It does seem like it would be common sense to do those checks anyway, but I guess it'd be just as easy to over-look such simple things. I've made a note of it, so I don't forget.anon271334

1 Answers

9
votes

Follow the instructions for Implementing the Simplest Express Checkout Integration.

It is a little long but it explains exactly what you need to do, and isn't subject to the security hole Robert talks about in his comments.

alt text