[ic] Applying payment to orders, not users

Grant emailgrant at gmail.com
Wed Nov 14 09:59:54 EST 2007


> > Has anyone switched to applying payments to orders instead of users? I
> > think it would be easier to manage but I'm wondering if I'll run into
> > any unforeseen problems once it's set up.
>
> Grant,
>
> I'm not sure I understand exactly what you mean, but for a few clients we
> have set up payment tracking that stores in the database every transaction
> sent to the payment gateway, connected to an order (and the order is of
> course still connected to the user).

Ok, it's been a while since I used the Standard demo.  Sometimes I
forget how different my system is.

I use a payments table too, and right now a username is associated
with each payment, but I'm considering associating an order number
instead of the username.  It always seems like I'm going against the
grain with payments attached directly to users.  For example, when
determining whether or not a certain order has been paid for, I have
to loop through all the payments and all the orders for that user and
"apply" payments to orders from oldest order to newest.  If payments
were directly associated with orders and not users, this extra step
would not be necessary.  Maybe this payment/user association was my
own (mis)creation.

- Grant


More information about the interchange-users mailing list