How can we use DOJO from CDN in OpenSocial App?

How to make a js/html/css based shopping cart that is secure?

  • I am looking to create/use a js-based shopping cart that uses flat files for data storage. Now I have some concerns regarding the security of data. Specifically-- (1) The shopping cart will connect to some payment gateways-- is there some way that I can securely store the data related to payment gateways, so that a hacker is not able to get this data. (2) If I use flat files for storing the shopping cart item details, then how do I ensure that such files are only accessed by my app, and not by anyone else? Also, I plan to use a CDN for storing the flat files (viz CSV)-- so the method you suggest for this point should work with a CDN as well. Ideally I would like not to use a server-side app at all (like PHP/Java/Ruby)--only HTML/CSS/JS/images are what I prefer should be used-- at the same time if should there be no direct way of accomplishing the above, then I am OK with creating a service layer-- which actually stores/updates everything into database...but I would want this layer to be used minimally, and only as a last resort-- ie. as much of the work as possible should be done using HTML/CSS/JS/images only.

  • Answer:

    1. That's impossible as far as I'm aware as any encryption keys would have to be sent to the browser so they could read them 2. Why does the cart have to be secure? What does it matter if another app accesses this? You're going to need server side processing to handle the order management and payment processing so just add a confirmation screen created by the server to bypass any potential security holes. 3. This whole idea sounds bad. It'll be a real pain to add new products without extensive code generation.

Mark Robinson at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.