I need to write a simple shopping cart as part of a web project so that agents of the company can add products and then checkout for payment using paypal. Has anyone done anything like this? Any suggestions, pointers before I get started?
Matthew Combatti has a free (open source) PayPal class on his site at http://www.xojodevspot.com. Enter PayPal into the search field.
(edit: pasted the wrong URL)
Thanks, just downloaded and having a look at it.
Nathan, Paypal has instructions on its web site that tells you how to go about integrating it into your web app. Dont know about the shopping cart though, I suspect that is just a glorified cookie.
Yes, Chris, that’s essentially right. It has the great advantage that they’ve done all the hard work with adding and removing and deleting and so on, and you simply add products to it using a POST request, so it’s really simple to integrate, but the downside is that your cart’s on a different website, doesn’t look so good, and so on. As ever, it’s a trade-off between easy to implement and better features!
Hamish, What Nathan is trying to do is of interest to me because I have just dumped Paypal and am looking for a great alternative.
If you’re looking for good payment processors, Stripe (www.stripe.com) is awesome. Very helpful support, a good API, clear documentation, transparent and not excessive fees…
Hamish, good lead. I will investigate these guys. At the moment I am getting raped by paypal on my site www.simquip.com and I need to find a new provider.
Not my favourite choice of word.
Just analysing rates: PayPal’s rate in Australia is 2.4% + $0.30 per transaction; international sales are 3.4% + a fixed fee; you can get lower rates if you have higher txn volumes. Stripe’s rate for everything is 2.7% + $0.30 per transaction, for all transactions, so I guess it depends on where you’re making your sales.
Worth bearing in mind: a 1% decrease in processing rates is $10 per $1000 processed. I’ve seen someone who spent two weeks integrating a different payment provider, because they got a 0.5% better rate. It took two weeks of developer time, at £50 per hour, which works out at £4000. They’d need to process over £800,000 to make that worthwhile. So, it’s worth considering the amount of time it’ll take you to integrate something else vs the fees you’re paying!
You will have to excuse the crude vernacular, but it was the best I could do when I hear the word ‘paypal’ these days. Just block your ears if you say it out aloud. Great analysis Hamish! many thanks
I’ve completed about 50% of a swipe control for webedition (working on desktop as well).
The current demo of what I have completed for WE is at:
This will be a drop in control, set properties in the inspector, and call a function to complete the payment
**stripe
Phone auto-corrects (and fails) certain words.
Link is valid. Was created and uploaded on phone in VM.
Matthew, I looked at the demo and noticed one of the buttons says Subscriptions…Does that allow you to setup a monthly subscription price?
Ken, Stripe is a very interesting system and yes as you can hold a token that represents your customer and use that for recurring payment requests but yes again as you can also setup subscriptions.
Matthews addon is going to work a little different on both desktop and web so as to get the best of both worlds and to ensure security etc.
It will allow for one-time payments (ie checkout after adding a bunch of items to purchase) and recurring payments/subscriptions. The current demo has a very small portion of the web-side server using HandleSpecialURL. This will be to avoid including your stripe credentials in the desktop apps and let your credentials reside only on your server so that when the desktop app communicates with the webapp, only a stripeToken will be returned, verified between the two, confirmed by the user (accepting the charge) and sent back to the server webapp to finish the charge via HandleSpecialURL.
As Nathan was saying, desktop and web version of the class will work identically as far as how the Xojo user implements them. But for speed and to keep concurrent connections and CPU load at a minimum, webedition will use javascript APIs, and the desktop side will use OAuth via httpsocket 1.1 protocol to authenticate. Security of both the user, and the stripe account, is of the utmost importance.