Re: [PROPOSAL] Payment_Process
| From: | Joe Stump | Date: | Sun, 14 Dec 2003 02:50:40 +0000 |
| Subject: | Re: [PROPOSAL] Payment_Process | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24396@lists.php.net to get a copy of this message | ||
Quick note ...
You should just put the following declaration into the variable
declaration at the top of the class:
function _setStatusCodes() {
$this->_errorCodes = array(
00 => "Approved",
01 => "Refer to issuer",
02 => "Refer to issuer - Special condition",
03 => "Invalid merchant ID",
04 => "Pick up card",
05 => "Declined",
06 => "General error",
07 => "Pick up card - Special condition",
13 => "Invalid amount",
14 => "Invalid card number",
15 => "No such issuer",
19 => "Re-enter transaction",
21 => "Unable to back out transaction",
28 => "File is temporarily unavailable",
39 => "No credit account",
41 => "Pick up card - Lost",
43 => "Pick up card - Stolen",
51 => "Insufficient funds",
54 => "Expired card",
57 => "Transaction not permitted - Card",
61 => "Amount exceeds withdrawal limit",
62 => "Invalid service code, restricted",
65 => "Activity limit exceeded",
76 => "Unable to locate, no match",
77 => "Inconsistent data, rev. or repeat",
78 => "No account",
80 => "Invalid date",
85 => "Card OK",
91 => "Issuer or switch is unavailable",
93 => "Violation, cannot complete",
96 => "System malfunction",
98 => "No matching transaction to void",
99 => "System timeout"
);
}
ie.
var $_errorCodes = array(
00 => "Approved",
01 => "Refer to issuer",
02 => "Refer to issuer - Special condition",
03 => "Invalid merchant ID",
04 => "Pick up card",
05 => "Declined",
06 => "General error",
07 => "Pick up card - Special condition",
13 => "Invalid amount",
14 => "Invalid card number",
15 => "No such issuer",
19 => "Re-enter transaction",
21 => "Unable to back out transaction",
28 => "File is temporarily unavailable",
39 => "No credit account",
41 => "Pick up card - Lost",
43 => "Pick up card - Stolen",
51 => "Insufficient funds",
54 => "Expired card",
57 => "Transaction not permitted - Card",
61 => "Amount exceeds withdrawal limit",
62 => "Invalid service code, restricted",
65 => "Activity limit exceeded",
76 => "Unable to locate, no match",
77 => "Inconsistent data, rev. or repeat",
78 => "No account",
80 => "Invalid date",
85 => "Card OK",
91 => "Issuer or switch is unavailable",
93 => "Violation, cannot complete",
96 => "System malfunction",
98 => "No matching transaction to void",
99 => "System timeout"
);
At first glance it looks good.
--Joe
> As previously discussed[1], I am writing a credit card processing
> framework,
> as well as at least one back-end processor. I believe that it would be
> very
> beneficial to have this package be part of PEAR.
>
>
> Description
> =======
>
> This package is intended to allow financial transactions to take place
> from
> PHP. While primarily focused on credit card processing, the ability to
> process an electronic funds transfer is also possible.
>
> The front-end is somewhat based on the interface that
> Business::OnlinePayment[2] uses. The fields defined in Payment_Process are
> a
> superset of what's available in Business::OnlinePayment.
>
> Each back-end (Processor) handles the communication with a payment
> gateway.
> For example, the 'Dpilink' back-end processes via DPILink, and a
> (hypothetical) Authorize.net back-end would process via Authorize.net.
> Changing gateways should be as simple as requesting a different back-end
> when
> calling Payment_Process::factory().
>
> Currently, there is a processor for DPILink, as well as a dummy processor
> for
> testing. I'm looking at the possibility of interfacing with
> Business::OnlinePayment to support it's gateways, as well as osCommerce.
>
> There is still plenty of work to be done with this package, and I believe
> that
> would best be facilitated by putting it in PEAR's CVS.
>
> The current code is available at
> http://www.websprockets.com/~ieure/PEAR/Payment/, and it's
> under the PHP
> License, 2.02.
>
>
> [1]:
> http://marc.theaimsgroup.com/?l=pear-dev&m=107127220002764&w=2
> [2]:
>
> http://search.cpan.org/~jasonk/Business-OnlinePayment-2.00/OnlinePayment.pm
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Joe Stump <joe@joestump.net>
http://www.joestump.net
"Label makers are proof God wants Sys Admins to be happy."