Well,, the checkout page will post to my api (PHP) from there I will handle all the data... check the payments etc so that will not be a problem... I only need a variable in angular that will stay the same for a session of a user. session_id() in php creates a session id that will stay if its not unset so if the user leaves the page and come back it will be the same.
I just need such a var in angular.. that i can post trough my api and store it.. if the user closes the page and opens it again it must generate this same id in angular.. so I can match it with my DB.... i dont know what methods are availible in angular for this Op woensdag 20 augustus 2014 17:32:20 UTC+2 schreef Eric Eslinger: > > This isn't really an angular issue as much as it is a general > web-application design issue. But you can do something like set a cookie on > the browser with session information, which will persist between > connections. Then when the angular app starts up, have it check to see if > there's a session cookie and get your state from there. > > Of course, cookies (and sessions in general) have all sorts of security > considerations, so if you're actually designing a real ecommerce site (and > not working through a tutorial), I'll *strongly* recommend you hire someone > who has done this before and get them to help. There's a lot of gotchas > that can lead to losing client data, bleeding personal information to > attackers, or just having plain old corrupted payment records so you can't > tell who actually paid for their products and who faked a PayPal callback. > > e > > > On Wed, Aug 20, 2014 at 4:05 AM, R tget <[email protected] <javascript:>> > wrote: > >> Yes, but in angular is there a way to get a unique session variable for a >> user? so that i can store this in the DB and if this user comes back he >> automaticly gets this ID ? >> >> Because im working with API... but everytime i call for a session id >> (php) it gives a new id... >> >> Op woensdag 20 augustus 2014 00:35:39 UTC+2 schreef Eric Eslinger: >>> >>> You'll probably need to handle this in the typical fashion - store user >>> session data in a session variable, either a session cookie, or stashed in >>> a session store on your backend. >>> >>> e >>> >>> >>> On Tue, Aug 19, 2014 at 12:21 PM, R tget <[email protected]> wrote: >>> >>>> Hi im building a shopping cart now on checkout im using external >>>> payment modules. so its get redirected to another site for example paypal >>>> and then come back for a thank you page. >>>> >>>> but if a user selects a payment method and goes back, al the angular >>>> data is gone, cart is empty etc. what is the best way to handle this? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "AngularJS" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> >>>> Visit this group at http://groups.google.com/group/angular. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "AngularJS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/angular. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
