cvs: pear /Payment_Process LICENSE-BSD Process.php TODO /Payment_Process/Process AuthorizeNet.php Bibit.php Common.php Dummy.php LinkPoint.php Offline.php PayPal.php Paycom.php Transfirst.php TrustCommerce.php Type.php /Payment_Process/Process/Type CreditCard.php eCheck.php /Payment_Process/examples Payment_Process-example.php
[email protected] ("Philippe Jausions") Tue, 06 May 2008 18:45:10 -0000
| Newsgroups | php.pear.cvs |
|---|---|
| Message-ID | <cvsjausions1210099510@cvsserver> |
jausions Tue May 6 18:45:10 2008 UTC
Added files:
/pear/Payment_Process/Process PayPal.php
Modified files:
/pear/Payment_Process Process.php LICENSE-BSD TODO
/pear/Payment_Process/Process Dummy.php Bibit.php AuthorizeNet.php
Type.php Common.php LinkPoint.php
Offline.php Paycom.php Transfirst.php
TrustCommerce.php
/pear/Payment_Process/examples Payment_Process-example.php
/pear/Payment_Process/Process/Type eCheck.php CreditCard.php
Log:
- Updated license to BSD
- PEAR CS clean up
jausions-20080506184510.txt
(text/plain, 62.6 KB)
http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process.php?r1=1.54&r2=1.55&diff_format=u Index: pear/Payment_Process/Process.php diff -u pear/Payment_Process/Process.php:1.54 pear/Payment_Process/Process.php:1.55 --- pear/Payment_Process/Process.php:1.54 Tue May 6 18:19:44 2008 +++ pear/Payment_Process/Process.php Tue May 6 18:45:10 2008 @@ -40,9 +40,9 @@ * @package Payment_Process * @author Ian Eure <[email protected]> * @author Joe Stump <[email protected]> - * @copyright 1997-2005 The PHP Group + * @copyright 1997-2008 The PHP Group * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version CVS: $Id: Process.php,v 1.54 2008/05/06 18:19:44 jausions Exp $ + * @version CVS: $Id: Process.php,v 1.55 2008/05/06 18:45:10 jausions Exp $ * @link http://pear.php.net/package/Payment_Process */ http://cvs.php.net/viewvc.cgi/pear/Payment_Process/LICENSE-BSD?r1=1.1&r2=1.2&diff_format=u Index: pear/Payment_Process/LICENSE-BSD diff -u pear/Payment_Process/LICENSE-BSD:1.1 pear/Payment_Process/LICENSE-BSD:1.2 --- pear/Payment_Process/LICENSE-BSD:1.1 Tue Feb 21 05:47:39 2006 +++ pear/Payment_Process/LICENSE-BSD Tue May 6 18:45:10 2008 @@ -1,22 +1,23 @@ Redistribution and use in source and binary forms, with or without modification , are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, th - is list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation and/ - or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products derived - from this software without specific prior written permission. +3. The name of the authors may not be used to endorse or promote products + derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WA -RRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABIL -ITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C -ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOW -EVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILI -TY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U -SE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. http://cvs.php.net/viewvc.cgi/pear/Payment_Process/TODO?r1=1.4&r2=1.5&diff_format=u Index: pear/Payment_Process/TODO diff -u pear/Payment_Process/TODO:1.4 pear/Payment_Process/TODO:1.5 --- pear/Payment_Process/TODO:1.4 Wed Jan 5 00:25:43 2005 +++ pear/Payment_Process/TODO Tue May 6 18:45:10 2008 @@ -1,2 +1,5 @@ - Create QuickForm elements for credit cards and eChecks - Remove $foo = & $this as this will no longer work in PHP5 +- Update to PHP5 +- Create classes to hold payment information, billing info, etc... +- PEAR Coding Standard clean up \ No newline at end of file http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Dummy.php?r1=1.6&r2=1.7&diff_format=u Index: pear/Payment_Process/Process/Dummy.php diff -u pear/Payment_Process/Process/Dummy.php:1.6 pear/Payment_Process/Process/Dummy.php:1.7 --- pear/Payment_Process/Process/Dummy.php:1.6 Mon Mar 22 20:35:58 2004 +++ pear/Payment_Process/Process/Dummy.php Tue May 6 18:45:10 2008 @@ -1,22 +1,44 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Ian Eure <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: Dummy.php,v 1.6 2004/03/22 20:35:58 ieure Exp $ +/** + * Dummy processor + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Ian Eure <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Dummy.php,v 1.7 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ require_once 'Payment/Process/Common.php'; http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Bibit.php?r1=1.6&r2=1.7&diff_format=u Index: pear/Payment_Process/Process/Bibit.php diff -u pear/Payment_Process/Process/Bibit.php:1.6 pear/Payment_Process/Process/Bibit.php:1.7 --- pear/Payment_Process/Process/Bibit.php:1.6 Thu Jul 28 02:52:58 2005 +++ pear/Payment_Process/Process/Bibit.php Tue May 6 18:45:10 2008 @@ -16,13 +16,13 @@ // | Authors: Robin Ericsson <[email protected]> | // +----------------------------------------------------------------------+ // -// $Id: Bibit.php,v 1.6 2005/07/28 02:52:58 jstump Exp $ +// $Id: Bibit.php,v 1.7 2008/05/06 18:45:10 jausions Exp $ -require_once('Payment/Process.php'); -require_once('Payment/Process/Common.php'); -require_once('Net/Curl.php'); -require_once('XML/Util.php'); -require_once('XML/XPath.php'); +require_once 'Payment/Process.php'; +require_once 'Payment/Process/Common.php'; +require_once 'Net/Curl.php'; +require_once 'XML/Util.php'; +require_once 'XML/XPath.php'; define('PAYMENT_PROCESS_ACTION_BIBIT_AUTH', 300); define('PAYMENT_PROCESS_ACTION_BIBIT_REDIRECT', 400); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/AuthorizeNet.php?r1=1.33&r2=1.34&diff_format=u Index: pear/Payment_Process/Process/AuthorizeNet.php diff -u pear/Payment_Process/Process/AuthorizeNet.php:1.33 pear/Payment_Process/Process/AuthorizeNet.php:1.34 --- pear/Payment_Process/Process/AuthorizeNet.php:1.33 Tue Nov 1 18:55:29 2005 +++ pear/Payment_Process/Process/AuthorizeNet.php Tue May 6 18:45:10 2008 @@ -7,20 +7,40 @@ * * PHP versions 4 and 5 * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to [email protected] so we can mail you a copy immediately. + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * @category Payment - * @package Payment_Process - * @author Joe Stump <[email protected]> | - * @author Philippe Jausions <[email protected]> - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: AuthorizeNet.php,v 1.33 2005/11/01 18:55:29 jausions Exp $ - * @link http://pear.php.net/package/Payment_Process + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> | + * @author Philippe Jausions <[email protected]> + * @copyright 1997-2008 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: AuthorizeNet.php,v 1.34 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process */ require_once 'Payment/Process.php'; http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Type.php?r1=1.22&r2=1.23&diff_format=u Index: pear/Payment_Process/Process/Type.php diff -u pear/Payment_Process/Process/Type.php:1.22 pear/Payment_Process/Process/Type.php:1.23 --- pear/Payment_Process/Process/Type.php:1.22 Tue Jan 24 23:21:49 2006 +++ pear/Payment_Process/Process/Type.php Tue May 6 18:45:10 2008 @@ -1,23 +1,45 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Ian Eure <[email protected]> | -// | Joe Stump <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: Type.php,v 1.22 2006/01/24 23:21:49 ieure Exp $ +/** + * TrustCommerce processor + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> + * @author Ian Eure <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Type.php,v 1.23 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ define('PAYMENT_PROCESS_CC_VISA', 100); define('PAYMENT_PROCESS_CC_MASTERCARD', 101); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Common.php?r1=1.32&r2=1.33&diff_format=u Index: pear/Payment_Process/Process/Common.php diff -u pear/Payment_Process/Process/Common.php:1.32 pear/Payment_Process/Process/Common.php:1.33 --- pear/Payment_Process/Process/Common.php:1.32 Tue Dec 13 00:00:29 2005 +++ pear/Payment_Process/Process/Common.php Tue May 6 18:45:10 2008 @@ -7,20 +7,40 @@ * * PHP versions 4 and 5 * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to [email protected] so we can mail you a copy immediately. + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * @category Payment - * @package Payment_Process - * @author Ian Eure <[email protected]> - * @author Joe Stump <[email protected]> - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Common.php,v 1.32 2005/12/13 00:00:29 jstump Exp $ - * @link http://pear.php.net/package/Payment_Process + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Ian Eure <[email protected]> + * @author Joe Stump <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Common.php,v 1.33 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process */ require_once('Payment/Process.php'); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/LinkPoint.php?r1=1.13&r2=1.14&diff_format=u Index: pear/Payment_Process/Process/LinkPoint.php diff -u pear/Payment_Process/Process/LinkPoint.php:1.13 pear/Payment_Process/Process/LinkPoint.php:1.14 --- pear/Payment_Process/Process/LinkPoint.php:1.13 Fri Aug 12 15:13:19 2005 +++ pear/Payment_Process/Process/LinkPoint.php Tue May 6 18:45:10 2008 @@ -6,20 +6,40 @@ * * PHP versions 4 and 5 * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to [email protected] so we can mail you a copy immediately. + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. * - * @category Payment - * @package Payment_Process - * @author Joe Stump <[email protected]> - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Revision: 1.13 $ - * @link http://pear.php.net/package/Payment_Process - * @link http://www.linkpoint.net/ + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Revision: 1.14 $ + * @link http://pear.php.net/package/Payment_Process + * @link http://www.linkpoint.net/ */ http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Offline.php?r1=1.4&r2=1.5&diff_format=u Index: pear/Payment_Process/Process/Offline.php diff -u pear/Payment_Process/Process/Offline.php:1.4 pear/Payment_Process/Process/Offline.php:1.5 --- pear/Payment_Process/Process/Offline.php:1.4 Mon Mar 22 20:35:58 2004 +++ pear/Payment_Process/Process/Offline.php Tue May 6 18:45:10 2008 @@ -1,22 +1,45 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Joe Stump <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: Offline.php,v 1.4 2004/03/22 20:35:58 ieure Exp $ + +/** + * Offline processor + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Offline.php,v 1.5 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ require_once('Validate/CreditCard.php'); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Paycom.php?r1=1.5&r2=1.6&diff_format=u Index: pear/Payment_Process/Process/Paycom.php diff -u pear/Payment_Process/Process/Paycom.php:1.5 pear/Payment_Process/Process/Paycom.php:1.6 --- pear/Payment_Process/Process/Paycom.php:1.5 Fri Jul 8 00:13:25 2005 +++ pear/Payment_Process/Process/Paycom.php Tue May 6 18:45:10 2008 @@ -1,22 +1,45 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Joe Stump <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: Paycom.php,v 1.5 2005/07/08 00:13:25 jstump Exp $ + +/** + * Paycom processor + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Paycom.php,v 1.6 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ require_once('Payment/Process.php'); require_once('Payment/Process/Common.php'); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Transfirst.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Payment_Process/Process/Transfirst.php diff -u pear/Payment_Process/Process/Transfirst.php:1.3 pear/Payment_Process/Process/Transfirst.php:1.4 --- pear/Payment_Process/Process/Transfirst.php:1.3 Thu Jul 14 20:54:00 2005 +++ pear/Payment_Process/Process/Transfirst.php Tue May 6 18:45:10 2008 @@ -1,22 +1,44 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Ian Eure <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: Transfirst.php,v 1.3 2005/07/14 20:54:00 ieure Exp $ +/** + * Transfirst processor + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Ian Eure <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Transfirst.php,v 1.4 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ require_once('Payment/Process/Common.php'); require_once('Net/Curl.php'); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/TrustCommerce.php?r1=1.5&r2=1.6&diff_format=u Index: pear/Payment_Process/Process/TrustCommerce.php diff -u pear/Payment_Process/Process/TrustCommerce.php:1.5 pear/Payment_Process/Process/TrustCommerce.php:1.6 --- pear/Payment_Process/Process/TrustCommerce.php:1.5 Fri Jul 8 00:13:25 2005 +++ pear/Payment_Process/Process/TrustCommerce.php Tue May 6 18:45:10 2008 @@ -1,23 +1,45 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Joe Stump <[email protected]> | -// | Robert Peake <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: TrustCommerce.php,v 1.5 2005/07/08 00:13:25 jstump Exp $ +/** + * TrustCommerce processor + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> + * @author Robert Peake <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: TrustCommerce.php,v 1.6 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ require_once('Payment/Process.php'); require_once('Payment/Process/Common.php'); http://cvs.php.net/viewvc.cgi/pear/Payment_Process/examples/Payment_Process-example.php?r1=1.3&r2=1.4&diff_format=u Index: pear/Payment_Process/examples/Payment_Process-example.php diff -u pear/Payment_Process/examples/Payment_Process-example.php:1.3 pear/Payment_Process/examples/Payment_Process-example.php:1.4 --- pear/Payment_Process/examples/Payment_Process-example.php:1.3 Mon Mar 22 20:37:13 2004 +++ pear/Payment_Process/examples/Payment_Process-example.php Tue May 6 18:45:10 2008 @@ -1,22 +1,44 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Ian Eure <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: Payment_Process-example.php,v 1.3 2004/03/22 20:37:13 ieure Exp $ +/** + * Basic example + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Ian Eure <[email protected]> + * @copyright 2003-2008 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: Payment_Process-example.php,v 1.4 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ require 'Payment/Process.php'; @@ -73,4 +95,4 @@ } print $result->getMessage()."\n"; -?> +?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Type/eCheck.php?r1=1.9&r2=1.10&diff_format=u Index: pear/Payment_Process/Process/Type/eCheck.php diff -u pear/Payment_Process/Process/Type/eCheck.php:1.9 pear/Payment_Process/Process/Type/eCheck.php:1.10 --- pear/Payment_Process/Process/Type/eCheck.php:1.9 Wed Sep 7 22:50:35 2005 +++ pear/Payment_Process/Process/Type/eCheck.php Tue May 6 18:45:10 2008 @@ -1,30 +1,53 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | [email protected] so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Ian Eure <[email protected]> | -// | Joe Stump <[email protected]> | -// +----------------------------------------------------------------------+ -// -// $Id: eCheck.php,v 1.9 2005/09/07 22:50:35 jstump Exp $ + +/** + * eCheck payment type + * + * PHP versions 4 and 5 + * + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Joe Stump <[email protected]> | + * @author Ian Eure <[email protected]> + * @copyright 1997-2008 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: eCheck.php,v 1.10 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + */ /** * Payment_Process_Type_eCheck * - * @author Joe Stump <[email protected]> * @package Payment_Process - */ + * @author Joe Stump <[email protected]> + * */ class Payment_Process_Type_eCheck extends Payment_Process_Type { /** http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/Type/CreditCard.php?r1=1.15&r2=1.16&diff_format=u Index: pear/Payment_Process/Process/Type/CreditCard.php diff -u pear/Payment_Process/Process/Type/CreditCard.php:1.15 pear/Payment_Process/Process/Type/CreditCard.php:1.16 --- pear/Payment_Process/Process/Type/CreditCard.php:1.15 Sat Feb 18 04:12:54 2006 +++ pear/Payment_Process/Process/Type/CreditCard.php Tue May 6 18:45:10 2008 @@ -7,22 +7,42 @@ * * PHP versions 4 and 5 * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to [email protected] so we can mail you a copy immediately. + * LICENSE: + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. * - * @category Payment - * @package Payment_Process - * @author Ian Eure <[email protected]> - * @author Joe Stump <[email protected]> - * @author Philippe Jausions <[email protected]> - * @copyright 1997-2005 The PHP Group - * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: CreditCard.php,v 1.15 2006/02/18 04:12:54 jausions Exp $ - * @link http://pear.php.net/package/Payment_Process - * @see Validate_Finance_CreditCard + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The name of the authors may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Payment + * @package Payment_Process + * @author Ian Eure <[email protected]> + * @author Joe Stump <[email protected]> + * @author Philippe Jausions <[email protected]> + * @copyright 1997-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version CVS: $Id: CreditCard.php,v 1.16 2008/05/06 18:45:10 jausions Exp $ + * @link http://pear.php.net/package/Payment_Process + * @see Validate_Finance_CreditCard */ /** http://cvs.php.net/viewvc.cgi/pear/Payment_Process/Process/PayPal.php?view=markup&rev=1.1 Index: pear/Payment_Process/Process/PayPal.php +++ pear/Payment_Process/Process/PayPal.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ /** * PayPal "Direct Payment" processor * * NOTE: NOT COMPLETED YET. * * PHP versions 4 and 5 * * LICENSE: * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. The name of the authors may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * @category Payment * @package Payment_Process * @author Philippe Jausions <[email protected]> * @copyright 2007 The PHP Group * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @version CVS: $Id: PayPal.php,v 1.1 2008/05/06 18:45:10 jausions Exp $ * @link http://pear.php.net/package/Payment_Process * @todo Complete the implementation */ /** * Required classes */ require_once 'Payment/Process.php'; require_once 'Payment/Process/Common.php'; require_once 'Net/Curl.php'; /** * Defines global variables */ $GLOBALS['_Payment_Process_PayPal'] = array( PAYMENT_PROCESS_ACTION_NORMAL => 'Sale', PAYMENT_PROCESS_ACTION_AUTHONLY => 'Authorization', PAYMENT_PROCESS_ACTION_POSTAUTH => 'DoCapture', PAYMENT_PROCESS_ACTION_VOID => 'DoVoid', PAYMENT_PROCESS_ACTION_CREDIT => 'RefundTransaction', ); /** * This is a processor for PayPal's merchant Direct Payment gateway. * * @package Payment_Process * @author Philippe Jausions <[email protected]> * @version @version@ * @link http://www.paypal.com/ */ class Payment_Process_PayPal extends Payment_Process_Common { /** * Front-end -> back-end field map. * * This array contains the mapping from front-end fields (defined in * the Payment_Process class) to the field names PayPal requires. * * @see _prepare() * @access private */ var $_fieldMap = array( // Required 'login' => 'USER', 'password' => 'PWD', 'action' => 'PAYMENTACTION', // Optional 'invoiceNumber' => 'INVNUM', 'customerId' => 'CUSTOM', 'amount' => 'AMT', 'description' => 'DESC', 'name' => '', 'postalCode' => 'ZIP', 'zip' => 'ZIP', 'company' => 'STREET2', 'address' => 'STREET', 'city' => 'CITY', 'state' => 'STATE', 'country' => 'COUNTRYCODE', 'phone' => 'PHONENUM', 'email' => 'EMAIL', 'ip' => 'IPADDRESS', ); /** * $_typeFieldMap * * @access protected */ var $_typeFieldMap = array( 'CreditCard' => array( 'firstName' => 'FIRSTNAME', 'lastName' => 'LASTNAME', 'cardNumber' => 'ACCT', 'cvv' => 'CVV2', 'type' => 'CREDITCARDTYPE', 'expDate' => 'EXPDATE', ), ); /** * Default options for this processor. * * @see Payment_Process::setOptions() * @access private */ var $_defaultOptions = array( 'paypalUri' => 'https://api-3t.sandbox.paypal.com/nvp', ); /** * Has the transaction been processed? * * @type boolean * @access private */ var $_processed = false; /** * The response body sent back from the gateway. * * @access private */ var $_responseBody = ''; /** * Constructor. * * @param array $options Class options to set. * @see Payment_Process::setOptions() * @return void */ function __construct($options = false) { parent::__construct($options); $this->_driver = 'PayPal'; $this->_makeRequired('login', 'password', 'action'); } function Payment_Process_PayPal($options = false) { $this->__construct($options); } /** * Processes the transaction. * * Success here doesn't mean the transaction was approved. It means * the transaction was sent and processed without technical difficulties. * * @return mixed Payment_Process_Result on success, PEAR_Error on failure * @access public */ function &process() { // Sanity check $result = $this->validate(); if (PEAR::isError($result)) { return $result; } // Prepare the data $result = $this->_prepare(); if (PEAR::isError($result)) { return $result; } $fields = $this->_prepareQueryString(); if (PEAR::isError($fields)) { return $fields; } $fields .= '&VERSION=3.2'; // Don't die partway through PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $curl = & new Net_Curl($this->_options['paypalUri']); if (PEAR::isError($curl)) { PEAR::popErrorHandling(); return $curl; } $curl->type = 'post'; $curl->fields = $fields; $curl->userAgent = 'PEAR Payment_Process_PayPal 0.1'; $result = $curl->execute(); if (PEAR::isError($result)) { PEAR::popErrorHandling(); return $result; } else { $curl->close(); } $this->_responseBody = trim($result); $this->_processed = true; // Restore error handling PEAR::popErrorHandling(); $response = &Payment_Process_Result::factory($this->_driver, $this->_responseBody, &$this); if (!PEAR::isError($response)) { $response->parse(); $r = $response->isLegitimate(); if (PEAR::isError($r)) { return $r; } elseif ($r === false) { return PEAR::raiseError('Illegitimate response from gateway'); } } $response->action = $this->action; return $response; } /** * Handles action * * Actions are defined in $GLOBALS['_Payment_Process_PayPal'] and then * handled here. * * @access protected */ function _handleAction() { switch ($this->action) { case PAYMENT_PROCESS_ACTION_NORMAL: $this->_data['PAYMENTACTION'] = 'Sale'; $this->_data['METHOD'] = 'DoDirectPayment'; break; case PAYMENT_PROCESS_ACTION_AUTHONLY: $this->_data['PAYMENTACTION'] = 'Authorization'; $this->_data['METHOD'] = 'DoDirectPayment'; break; case PAYMENT_PROCESS_ACTION_POSTAUTH: $this->_data['METHOD'] = 'DoCapture'; break; case PAYMENT_PROCESS_ACTION_VOID : $this->_data['METHOD'] = 'DoVoid'; break; case PAYMENT_PROCESS_ACTION_CREDIT : $this->_data['METHOD'] = 'RefundTransaction'; break; } } /** * Processes a callback from payment gateway * * Success here doesn't mean the transaction was approved. It means * the callback was received and processed without technical difficulties. * * @return Payment_Process_Result instance on success, PEAR_Error on failure * @todo Implement support for PayPal IPN??? */ function &processCallback() { $result =& parent::processCallback(); return $result; } /** * Get (completed) transaction status. * * @return string Two-digit status returned from gateway. */ function getStatus() { return false; } /** * Prepare the POST query string. * * @access private * @return string The query string */ function _prepareQueryString() { $data = array_merge($this->_options, $this->_data); $return = array(); foreach ($data as $k => $v) { $return[] = urlencode($k).'='.urlencode($v); } return implode('&', $return); } } class Payment_Process_Result_PayPal extends Payment_Process_Result { var $_statusCodeMap = array('1' => PAYMENT_PROCESS_RESULT_APPROVED, '2' => PAYMENT_PROCESS_RESULT_DECLINED, '3' => PAYMENT_PROCESS_RESULT_OTHER, '4' => PAYMENT_PROCESS_RESULT_REVIEW, ); /** * PayPal error codes * * This array holds many of the common response codes. There are over 200 * response codes - so check the PayPal manual if you get a status * code that does not match (see "Error Reference Message" in the NVAPI * Developer Guide). * * @see getStatusText() * @access private */ var $_statusCodeMessages = array(); var $_avsCodeMap = array( '0' => PAYMENT_PROCESS_AVS_MATCH, '1' => PAYMENT_PROCESS_AVS_MISMATCH, '2' => PAYMENT_PROCESS_AVS_MISMATCH, '3' => PAYMENT_PROCESS_AVS_NOAPPLY, '4' => PAYMENT_PROCESS_AVS_ERROR, 'A' => PAYMENT_PROCESS_AVS_MISMATCH, 'B' => PAYMENT_PROCESS_AVS_MISMATCH, 'C' => PAYMENT_PROCESS_AVS_MISMATCH, 'D' => PAYMENT_PROCESS_AVS_MATCH, 'E' => PAYMENT_PROCESS_AVS_NOAPPLY, 'F' => PAYMENT_PROCESS_AVS_MATCH, 'G' => PAYMENT_PROCESS_AVS_NOAPPLY, 'I' => PAYMENT_PROCESS_AVS_NOAPPLY, 'N' => PAYMENT_PROCESS_AVS_MISMATCH, 'P' => PAYMENT_PROCESS_AVS_MISMATCH, 'R' => PAYMENT_PROCESS_AVS_ERROR, 'S' => PAYMENT_PROCESS_AVS_ERROR, 'U' => PAYMENT_PROCESS_AVS_ERROR, 'W' => PAYMENT_PROCESS_AVS_MISMATCH, 'X' => PAYMENT_PROCESS_AVS_MATCH, 'Y' => PAYMENT_PROCESS_AVS_MATCH, 'Z' => PAYMENT_PROCESS_AVS_MISMATCH, ); var $_avsCodeMessages = array( '0' => 'Address and postal code match', '1' => 'No match on street address nor postal code', '2' => 'Only part of your address information matches', '3' => 'Address information unavailable', '4' => 'System unavailable or timeout', 'A' => 'Address matches, postal code does not', 'B' => 'Address matches, postal code does not', 'C' => 'No match on street address nor postal code', 'D' => 'Address and full postal code match', 'E' => 'Address verification not allowed from Internet/phone', 'F' => 'Address and full postal code match', 'G' => 'International Card Issuing Bank', 'I' => 'International Card Issuing Bank', 'N' => 'No match on street address nor postal code', 'P' => 'Postal code matches, street address does not', 'R' => 'Retry - System unavailable or timeout', 'S' => 'Service not supported by issuer', 'U' => 'Address information unavailable', 'W' => 'Full postal code matches, street address does not', 'X' => 'Address and full postal code match', 'Y' => 'Address and postal code match', 'Z' => 'Postal code matches, street address does not', ); var $_cvvCodeMap = array( '0' => PAYMENT_PROCESS_CVV_MATCH, '1' => PAYMENT_PROCESS_CVV_MISMATCH, '2' => PAYMENT_PROCESS_CVV_NOAPPLY, '3' => PAYMENT_PROCESS_CVV_NOAPPLY, '4' => PAYMENT_PROCESS_CVV_ERROR, 'M' => PAYMENT_PROCESS_CVV_MATCH, 'N' => PAYMENT_PROCESS_CVV_MISMATCH, 'P' => PAYMENT_PROCESS_CVV_ERROR, 'S' => PAYMENT_PROCESS_CVV_NOAPPLY, 'U' => PAYMENT_PROCESS_CVV_ERROR, 'X' => PAYMENT_PROCESS_CVV_ERROR, ); var $_cvvCodeMessages = array( '0' => 'Security code matches', '1' => 'Security code does not match', '2' => 'Security code verification not supported', '3' => 'Card does not have security code', '4' => 'Issuer unable to process request', 'M' => 'Security code matches', 'N' => 'Security code does not match', 'P' => 'Security code was not processed', 'S' => 'Security code verification not supported', 'U' => 'Issuer unable to process request', 'X' => 'Security could not be verified', ); var $_fieldMap = array('0' => 'code', '2' => 'messageCode', '3' => 'message', '4' => 'approvalCode', '5' => 'avsCode', '6' => 'transactionId', '7' => 'invoiceNumber', '8' => 'description', '9' => 'amount', '12' => 'customerId', '38' => 'cvvCode', ); function Payment_Process_Response_PayPal($rawResponse) { $this->Payment_Process_Response($rawResponse); } /** * Parses the data received from the payment gateway * * @access public */ function parse() { $responseArray = parse_str($this->_rawResponse); // Save some fields in private members $map = array_flip($this->_fieldMap); $this->_amount = $responseArray[$map['amount']]; $this->_mapFields($responseArray); // Adjust result code/message if needed based on raw code switch ($this->messageCode) { case 33: // Something is missing so we send the raw message back $this->_statusCodeMessages[33] = $this->message; break; case 11: // Duplicate transactions $this->code = PAYMENT_PROCESS_RESULT_DUPLICATE; break; case 4: case 41: case 250: case 251: // Fraud detected $this->code = PAYMENT_PROCESS_RESULT_FRAUD; break; } } /** * Parses the data received from the payment gateway callback * * @access public * @todo Implement support for PayPal's IPN? */ function parseCallback() { return parent::parseCallback(); } /** * Validates the legitimacy of the response * * @return mixed TRUE if response is legitimate, FALSE if not, PEAR_Error on error * @access public * @todo Implement support for PayPal's IPN? */ function isLegitimate() { return true; } } ?>