Re: RFC: Credit card processing

From: Date: Sat, 13 Dec 2003 02:48:26 +0000
Subject: Re: RFC: Credit card processing
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24377@lists.php.net to get a copy of this message
Joe Stump wrote:
I'm leaning towards a simple success/failure model, and you can call a function to get the exact error (which will vary from processor to processor). Everyone OK with that?
I would prefer a PEAR_Error, which is the standard in PEAR for most package.
The problem with PEAR_Error / true response it that in this case there is more finely graned information that needs to be returned. eg. - card data invalid - return pear error with msg to state that card is invalid (simple) - card not chargeable - same as above - charging deferred - return true, but there is extra information (like await for confirmation before shipping) - card charged with transaction id - return true, transaction id needs to be accessed as public property of processor object, need to ship asap as it is bought and paid for What we really need is some sort of PEAR_Success class, which is the good twin of PEAR_Error, until this happens, true or error (with code) is not good enough... It would be a simple class which just holds a status code and the message, along with the methods to set them Mike

« previous php.pear.dev (#24377) next »