A Qcodo based CMS/ecommerce framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.9 KiB

13 years ago
  1. <?php
  2. /**
  3. * This file is a part of Quasi CMS
  4. *@package Quasi
  5. */
  6. if(!defined('QUASICMS') ) die('No Quasi.');
  7. if (!defined("PAYPALNVPACTION.CLASS.PHP")){
  8. define("PAYPALNVPACTION.CLASS.PHP",1);
  9. /**
  10. * Class PayByMailAction - Pay by mail (check or money order)
  11. *
  12. * This class provides an option for the customer to pay with a check or money order
  13. * by mail. The order status has already been set to Pending so no further action is taken until the
  14. * status is changed manually. Really this class is just a place holder for the logic so that we
  15. * can create the option to select it.
  16. *
  17. *NOTE: This action does NOT approve the transaction - therefor no order status will change
  18. * when it returns and no order_totals will be inserted.
  19. *
  20. *@author Erik Winn <erikwinnmail@yahoo.com>
  21. *
  22. * $Id: PayByMailAction.class.php 323 2008-10-27 16:14:55Z erikwinn $
  23. *@version 0.1
  24. *
  25. *@copyright (C) 2008 by Erik Winn
  26. *@license GPL v.2
  27. This program is free software; you can redistribute it and/or modify
  28. it under the terms of the GNU General Public License as published by
  29. the Free Software Foundation; either version 2 of the License, or
  30. (at your option) any later version.
  31. This program is distributed in the hope that it will be useful,
  32. but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. GNU General Public License for more details.
  35. You should have received a copy of the GNU General Public License
  36. along with this program; if not, write to the Free Software
  37. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
  38. *
  39. *@package Quasi
  40. * @subpackage Classes
  41. */
  42. class PayByMailAction extends PaymentActionBase
  43. {
  44. /**
  45. * PayByMailAction Constructor
  46. *
  47. * @param Order objOrder - the Order to process
  48. */
  49. public function __construct(Order $objOrder)
  50. {
  51. try {
  52. parent::__construct($objOrder);
  53. } catch (QCallerException $objExc) {
  54. $objExc->IncrementOffset();
  55. throw $objExc;
  56. }
  57. }
  58. /**
  59. * There is nothing to do with this payment method - all processing waits until we receive
  60. * a check and then must be completed via the adminstration interface. The Order has been
  61. * saved already as "Pending" - but we set it again here to trigger an email to the customer.
  62. *@return bool true on success
  63. */
  64. public function Process()
  65. {
  66. $this->blnApproved = true;
  67. $this->objOrder->SetStatus(OrderStatusType::Pending);
  68. IndexPage::$objShoppingCart->DeleteAllShoppingCartItems();
  69. return true;
  70. }
  71. public function PreProcess(){ return true;}
  72. public function PostProcess(){ return true;}
  73. protected function handleResponse(){}
  74. protected function createPOSTRequest(){}
  75. protected function createGETRequest(){}
  76. }//end class
  77. }//end define
  78. ?>