News for hackers. Stuff that matters.
Re:SimpleCart(js) - Javascript Shopping Cart by spankyhoot on Thursday November 22, 2012 @09:05PM (#4820719)
This seems to suffer from the source of prices being the html itself. This implies trusting the client - I'm a web inspector away from choosing what I want to pay.
Re:SimpleCart(js) - Javascript Shopping Cart by frooxie on Thursday November 22, 2012 @09:37PM (#4820776)
They cover this.

"What simpleCart(js) Does Not Do:

Is Not: Foolproof

Clever hackers can change prices of simpleCart(js) items before checkout. This is a known security flaw that exists with ALL javascript shopping carts. It is highly recommended that all orders be checked upon receiving or backend security checks be put in place (View Tutorial.)"

Re:SimpleCart(js) - Javascript Shopping Cart by ummjackson on Thursday November 22, 2012 @09:33PM (#4820762)
When the incorrect payment price comes through to PayPal however, you just wouldn't ship the schmuck the goods, would you?

For simple, small online stores, I think this could be a nice option.

Re:SimpleCart(js) - Javascript Shopping Cart by shousper on Thursday November 22, 2012 @10:02PM (#4820816)
Agreed. I wonder if you could put a clause in your terms of service that states you will not give refunds for modified price amounts?

Then on your confirmation page, just have a nice "Thank you for your donation. Unfortunately, you won't be receiving any goods. Please see our TOS for details."

Probably illegal though >_>

Re:SimpleCart(js) - Javascript Shopping Cart by blcArmadillo on Friday November 23, 2012 @12:14AM (#4821051)
One issue with this, besides the possible legality of it, is if they used their credit card they could just dispute the claim. Stripe for example charges you $15 anytime someone disputes one of your charges even if you didn't do anything wrong. So you'd probably end up being out more than if you just refunded the money. Not sure what PayPal, Google checkout, etc policies are on this although I'd imagine they're quite similar.
Re:SimpleCart(js) - Javascript Shopping Cart by pbreit on Friday November 23, 2012 @10:27PM (#4824443)
I'm not sure putting this in your terms is illegal but tampering with the amounts like that certainly is.
Re:SimpleCart(js) - Javascript Shopping Cart by brntn on Thursday November 22, 2012 @10:51PM (#4820916)
Also asking for trouble with PayPal. Which we all know can cause small stores a world of hurt.
Re:SimpleCart(js) - Javascript Shopping Cart by namank on Friday November 23, 2012 @02:15AM (#4821230)
What do you do with the money?
Re:SimpleCart(js) - Javascript Shopping Cart by hayksaakian on Thursday November 22, 2012 @09:34PM (#4820766)
I thought for a moment that this was a node js library.

Why would the creator have overlooked such an important factor?

Re:SimpleCart(js) - Javascript Shopping Cart by davidlumley on Thursday November 22, 2012 @11:10PM (#4820941)
It's a client side cart, not server side - why does it need to be a node package? (genuine question)
Re:SimpleCart(js) - Javascript Shopping Cart by namank on Friday November 23, 2012 @02:16AM (#4821232)
Shopping carts makes more sense server side and the project is authored in js.

server-side + js = node

Re:SimpleCart(js) - Javascript Shopping Cart by davidlumley on Friday November 23, 2012 @04:51AM (#4821618)
I would completely understand if this _was_ a server side shopping cart, but it's not. It's a client side shopping cart which you can use on any architecture - you just have to give it data, and then check the data at payment using whatever server side language you want. It's not any different to a Spine or Backbone based project.

Just because it's JavaScript doesn't mean it should be in npm, similar to just because a project is written in ruby doesn't mean it should be in rubygems. A lot of the time, there's no reason for a ruby project to be bundled as a gem - it just ends up polluting an already crowded package management ecosystem. I wasn't sure if there was something I might have missed about npm. To me, it seems like it would be something that would be better managed with Bower ( http://twitter.github.com/bower/ ) given you don't (and shouldn't!) need npm in order to use it.

Re:SimpleCart(js) - Javascript Shopping Cart by namank on Saturday November 24, 2012 @02:23AM (#4824798)
I read your original reply to hayksaakian as an enquire as to why hayksaakian would assume the js to be related to node since the js is client side.

In that context, my reply means that since hayksaakian started with the assumption that it was server side, it's only logical that he would conclude the js to be a node module since server-side javascript's most popular implementation is node. Of course, looking back I see that I may have misread hayksaakian's reply.

Re:SimpleCart(js) - Javascript Shopping Cart by pbreit on Friday November 23, 2012 @10:26PM (#4824440)
And arresting you would be almost as easy. Worth it?
Re:SimpleCart(js) - Javascript Shopping Cart by mintplant on Friday November 23, 2012 @12:15AM (#4821054)
So do some server-side validation.