A QCodo powered CMS
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.

61 lines
1.9 KiB

  1. <?php
  2. if(!defined('QUINTACMS') ) die('No Quinta.');
  3. if (!defined("PAYPALNVPACTION.CLASS.PHP")){
  4. define("PAYPALNVPACTION.CLASS.PHP",1);
  5. /**
  6. * Class PayByMailAction - Pay by mail (check or money order)
  7. *
  8. * This class provides an option for the customer to pay with a check or money order
  9. * by mail. The order status has already been set to Pending so no further action is taken until the
  10. * status is changed manually. Really this class is just a place holder for the logic so that we
  11. * can create the option to select it.
  12. *
  13. *NOTE: This action does NOT approve the transaction - therefor no order status will change
  14. * when it returns and no order_totals will be inserted.
  15. *
  16. *@author Erik Winn <sidewalksoftware@gmail.com>
  17. *
  18. *@version 0.3
  19. *
  20. *@package Quinta
  21. * @subpackage Classes
  22. */
  23. class PayByMailAction extends PaymentActionBase{
  24. /**
  25. * PayByMailAction Constructor
  26. *
  27. * @param Order objOrder - the Order to process
  28. */
  29. public function __construct(Order $objOrder){
  30. try {
  31. parent::__construct($objOrder);
  32. } catch (QCallerException $objExc) {
  33. $objExc->IncrementOffset();
  34. throw $objExc;
  35. }
  36. }
  37. /**
  38. * There is nothing to do with this payment method - all processing waits until we receive
  39. * a check and then must be completed via the adminstration interface. The Order has been
  40. * saved already as "Pending" - but we set it again here to trigger an email to the customer.
  41. *@return bool true on success
  42. */
  43. public function Process(){
  44. $this->blnApproved = true;
  45. $this->objOrder->SetStatus(OrderStatusType::Pending);
  46. IndexPage::$objShoppingCart->DeleteAllShoppingCartItems();
  47. return true;
  48. }
  49. public function PreProcess(){ return true;}
  50. public function PostProcess(){ return true;}
  51. protected function handleResponse(){}
  52. protected function createPOSTRequest(){}
  53. protected function createGETRequest(){}
  54. }//end class
  55. }//end define
  56. ?>