This is a discussion on Save and Continue within the PHP General forums, part of the PHP Programming Forums category; Hello All, I am trying to think through my new forms process. I want to allow a customer to submit ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello All,
I am trying to think through my new forms process. I want to allow a customer to submit multiple orders using the same credit card. At the bottom of my form I will have a "Save" link and a "Save and Submit Additional" link/checkbox. Basically what I want to happen is that if the user clicks on "Save" it processes the form and sends them back to my homepage. But if the user clicks "Save and Submit Additional", I want it to submit the first payment, then return to the same screen with the credit card information still populated to the fields and allow the user to enter in a new transaction. I think my process for this would be something along the lines of: if (isset($_POST['submit_additional'])) { include save.php } //This would save the information just entered to the database By building a save.php file and including it only if needed, this would accomplish what I am trying to do, correct? I'm open to any/all ideas :) |
|
|||
|
Hi,
i was more thinking about automatically going to save.php, and if checked (the code u used) redirect back to your shop, cart, etc. using header function. Tijnema On 3/7/07, Dan Shirah <mrsquash2@gmail.com> wrote: > > Hello All, > > I am trying to think through my new forms process. I want to allow a > customer to submit multiple orders using the same credit card. At the > bottom of my form I will have a "Save" link and a "Save and Submit > Additional" link/checkbox. > > Basically what I want to happen is that if the user clicks on "Save" it > processes the form and sends them back to my homepage. > > But if the user clicks "Save and Submit Additional", I want it to submit > the > first payment, then return to the same screen with the credit card > information still populated to the fields and allow the user to enter in a > new transaction. > > I think my process for this would be something along the lines of: > > if (isset($_POST['submit_additional'])) { > > include save.php > } //This would save the information just entered to the database > > > By building a save.php file and including it only if needed, this would > accomplish what I am trying to do, correct? > > I'm open to any/all ideas :) > |
|
|||
|
On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote:
> > then return to the same screen with the credit card > information still populated You should treat credit card information like a hot potato... get rid of it as soon as possible. What happens if Johnny Forgetful forgets to log out of his session on a public computer? Then Jenny Fastfingers jumps on and notices the open session? Voila, Jenny Fastfingers just got Johnny Forgetful's credit information. Cheers, Rob. -- ..------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' |
|
|||
|
Robert Cummings wrote:
> On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote: >> then return to the same screen with the credit card >> information still populated > > You should treat credit card information like a hot potato... get rid of > it as soon as possible. What happens if Johnny Forgetful forgets to log > out of his session on a public computer? Then Jenny Fastfingers jumps on > and notices the open session? Voila, Jenny Fastfingers just got Johnny > Forgetful's credit information. and don't forget the all the Bob Shitesters that'll sue you for every penny you'll ever have at the slightest opportunity regardless of what you try/do/intend, best not accept CC numbers or any of that jazz at all. > > Cheers, > Rob. |
|
|||
|
But ofcourse you could add a lot of things to a shopping cart and checkout
once.... btw, it's safer to use things like Paypal... Tijnema -- To the full PHP list now On 3/7/07, Jochem Maas <jochem@iamjochem.com> wrote: > > Robert Cummings wrote: > > On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote: > >> then return to the same screen with the credit card > >> information still populated > > > > You should treat credit card information like a hot potato... get rid of > > it as soon as possible. What happens if Johnny Forgetful forgets to log > > out of his session on a public computer? Then Jenny Fastfingers jumps on > > and notices the open session? Voila, Jenny Fastfingers just got Johnny > > Forgetful's credit information. > > and don't forget the all the Bob Shitesters that'll sue you for every > penny you'll > ever have at the slightest opportunity regardless of what you > try/do/intend, > best not accept CC numbers or any of that jazz at all. > > > > > Cheers, > > Rob. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > |
|
|||
|
Rght, that is similar to what I am trying to do...let them inout several
items to be paid on and let them all be tied to the same credit card to be charged. On 3/7/07, Tijnema ! <tijnema@gmail.com> wrote: > > But ofcourse you could add a lot of things to a shopping cart and checkout > once.... > > btw, it's safer to use things like Paypal... > > Tijnema > > -- To the full PHP list now > > > On 3/7/07, Jochem Maas <jochem@iamjochem.com> wrote: > > > > Robert Cummings wrote: > > > On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote: > > >> then return to the same screen with the credit card > > >> information still populated > > > > > > You should treat credit card information like a hot potato... get rid > of > > > it as soon as possible. What happens if Johnny Forgetful forgets to > log > > > out of his session on a public computer? Then Jenny Fastfingers jumps > on > > > and notices the open session? Voila, Jenny Fastfingers just got Johnny > > > Forgetful's credit information. > > > > and don't forget the all the Bob Shitesters that'll sue you for every > > penny you'll > > ever have at the slightest opportunity regardless of what you > > try/do/intend, > > best not accept CC numbers or any of that jazz at all. > > > > > > > > Cheers, > > > Rob. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > |
|
|||
|
So, what is your actual problem?
you can simple add all items to a session, and then when checking out, getting all data from the session. *means all data is lost when user leaves page... Tijnema On 3/7/07, Dan Shirah <mrsquash2@gmail.com> wrote: > > Rght, that is similar to what I am trying to do...let them inout several > items to be paid on and let them all be tied to the same credit card to be > charged. > > On 3/7/07, Tijnema ! <tijnema@gmail.com> wrote: > > > > But ofcourse you could add a lot of things to a shopping cart and > > checkout > > once.... > > > > btw, it's safer to use things like Paypal... > > > > Tijnema > > > > -- To the full PHP list now > > > > > > On 3/7/07, Jochem Maas <jochem@iamjochem.com> wrote: > > > > > > Robert Cummings wrote: > > > > On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote: > > > >> then return to the same screen with the credit card > > > >> information still populated > > > > > > > > You should treat credit card information like a hot potato... get > > rid of > > > > it as soon as possible. What happens if Johnny Forgetful forgets to > > log > > > > out of his session on a public computer? Then Jenny Fastfingers > > jumps on > > > > and notices the open session? Voila, Jenny Fastfingers just got > > Johnny > > > > Forgetful's credit information. > > > > > > and don't forget the all the Bob Shitesters that'll sue you for every > > > penny you'll > > > ever have at the slightest opportunity regardless of what you > > > try/do/intend, > > > best not accept CC numbers or any of that jazz at all. > > > > > > > > > > > Cheers, > > > > Rob. > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > |
|
|||
|
Dan Shirah wrote:
> Hello All, > > I am trying to think through my new forms process. I want to allow a > customer to submit multiple orders using the same credit card. At the > bottom of my form I will have a "Save" link and a "Save and Submit > Additional" link/checkbox. > > Basically what I want to happen is that if the user clicks on "Save" it > processes the form and sends them back to my homepage. > > But if the user clicks "Save and Submit Additional", I want it to submit > the first payment, then return to the same screen with the credit card > information still populated to the fields and allow the user to enter in a > new transaction. > > I think my process for this would be something along the lines of: > > if (isset($_POST['submit_additional'])) { > > include save.php > } //This would save the information just entered to the database > > > By building a save.php file and including it only if needed, this would > accomplish what I am trying to do, correct? > > I'm open to any/all ideas :) I think you can accomplish what you "want to do" just in a different way. I think that you need to view the credit card phase as the last step, and figure out a way to chunk up multiple independent "shopping cart" invoices. Something like, "pay now" and "add new order" if you have a PHP class, say "class invoice," which represents a shopping cart, and use the serialize function to create a text variable which can be stored in a database or session. Then a user can create and edit multiple invoices, and as a last step go to billing and enter credit information. You should NEVER EVER store, no matter how securely or temporarily, credit card information unless you have major liability insurance. |
|
|||
|
At 10:51 AM -0500 3/7/07, Robert Cummings wrote:
>On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote: >> >> then return to the same screen with the credit card >> information still populated > >You should treat credit card information like a hot potato... get rid of >it as soon as possible. What happens if Johnny Forgetful forgets to log >out of his session on a public computer? Then Jenny Fastfingers jumps on >and notices the open session? Voila, Jenny Fastfingers just got Johnny >Forgetful's credit information. > >Cheers, >Rob. Rob : Johnny Forgetful and Jenny Fastfingers? Where did you find them? It sounds like characters out of an old Navy WWII "Don't go on shore-leave without protection" film. :-) tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com |
|
|||
|
On Sun, 2007-03-11 at 10:31 -0400, tedd wrote:
> At 10:51 AM -0500 3/7/07, Robert Cummings wrote: > >On Wed, 2007-03-07 at 10:39 -0500, Dan Shirah wrote: > >> > >> then return to the same screen with the credit card > >> information still populated > > > >You should treat credit card information like a hot potato... get rid of > >it as soon as possible. What happens if Johnny Forgetful forgets to log > >out of his session on a public computer? Then Jenny Fastfingers jumps on > >and notices the open session? Voila, Jenny Fastfingers just got Johnny > >Forgetful's credit information. > > > >Cheers, > >Rob. > > Rob : > > Johnny Forgetful and Jenny Fastfingers? Where did you find them? > > It sounds like characters out of an old Navy WWII "Don't go on > shore-leave without protection" film. *lol* I just made them up. But I do remember the process strangely enough... Forst off I had John Doe on my mine, then Johnny Mnemonic passed through my head and so I made it appropriate to the example at hand by making it Johnny Forgetful, next Jane is the usual the feminine version of John Doe, so then I had Janey Fastfingers, but it didn't ring quite right so I changed it to Jenny to sound more like Johnny ;) Why I remember the process whereby I arrived at Johnny Forgetful and Jenny Fastfingers is anyone's guess :) Cheers, Rob. -- ..------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' |