Recognizing which payment module was used in MS2

pvallen <[email protected]> 13 Jul 2003 01:05:10 -0000
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <ef5b6cc59b10ede8af4da6d583e7f0fa@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=195622#195622
----------------------------------------------------------------

I'm working on getting a new site up based on a recent CVS snapshot of MS2 . (I know MS2 final was released today and I will run a beyond compare at some point).

Anyway, my problem has to do with how can I determine, in code, which payment module was used to submit an order. I plan to use payment methods of credit cards using Echo Online, Paypal, and Check/Money order. 

One of the nice things about the Echo module is you can operate it with "credit auth only" when customer submits order and it has an admin function that lists orders and you click "process" when you ship and it will bill the credit card. 

Ok. The problem is the echo admin tool shows all customer orders regardless of payment method used by customer. I would like to change that so the admin function shows only the Echo orders. 

The obvious thing seems to select orders where (orders.payment_method == Echo). The problem I see with this (by my reading of the code) is that the payment method is (or can be) a language sensitive value and therefore not suitable for testing in code. No? The payment_method field is the same field that is included in the order confirmation email.

So, is there any other way to test which payment method was selected by the user? 

This may be moot, because I plan to have an English only site. But, the programmer in me wants to make sure it is coded "right".

Thanks to the whole OSC community for the good work put into this product.