• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: What's a good way to handle orders?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: What's a good way to handle orders?


  • Subject: RE: What's a good way to handle orders?
  • From: "James C. Lee" <email@hidden>
  • Date: Sun, 6 Jan 2008 15:20:57 -0800
  • Importance: Normal

Kevin,

How about add a numeric column "status" to the Order table, with values such
as:

0 = newly order
1 = got credit card info, ready for authorization
2 = authorization successful, ready to pack
3 = authorization failed
4 = packed, ready to charge credit card
5 = credit card charged
...
11 = paypal payment received
etc.

^James


> -----Original Message-----
> From:
> webobjects-dev-bounces+jcl_applewodev=email@hidden
> ple.com
> [mailto:webobjects-dev-bounces+jcl_applewodev=dreamissary.com@
> lists.apple.com] On Behalf Of Kevin Windham
> Sent: Sunday, January 06, 2008 3:11 PM
> To: WO Dev-Apple
> Subject: What's a good way to handle orders?
>
>
> I have an app that will take orders. I didn't fully consider the
> consequences of inserting the orders directly into the DB. Now I've
> run into the situation where an order gets created and then someone
> decides to simply close their browser before completing payment. Now
> I have a "bad" order in the system.
>
> My initial thought for dealing with this was simply to not
> insert the
> order and associated lineitems into the db context until after the
> process is complete. The problem with this is that it
> violates one of
> the rules I've read about. That is, that you should insert objects
> into the context before any manipulation of those objects.
>
> Does anyone have an elegant solution for this, or should I simply
> create some dummy objects and then clone them into new
> objects that I
> insert into the DB immediately on creation?
>
> Thanks,
> Kevin
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: What's a good way to handle orders?
      • From: Kevin Windham <email@hidden>
References: 
 >What's a good way to handle orders? (From: Kevin Windham <email@hidden>)

  • Prev by Date: What's a good way to handle orders?
  • Next by Date: Re: What's a good way to handle orders?
  • Previous by thread: What's a good way to handle orders?
  • Next by thread: Re: What's a good way to handle orders?
  • Index(es):
    • Date
    • Thread