35 lines
911 B
PHP
35 lines
911 B
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
/**
|
||
|
* This class provides CHECKOUT Plugin Support
|
||
|
*
|
||
|
* @package Checkout
|
||
|
* @category Plugins
|
||
|
* @author Deon George
|
||
|
* @copyright (c) 2009-2013 Open Source Billing
|
||
|
* @license http://dev.osbill.net/license.html
|
||
|
* @todo Does this need to be Serializable?
|
||
|
*/
|
||
|
abstract class Checkout_Plugin implements Serializable {
|
||
|
protected $co; // Our Checkout Object
|
||
|
protected $_object;
|
||
|
|
||
|
// Our required abstract classes
|
||
|
public function serialize() {
|
||
|
return (string)$this->_object;
|
||
|
}
|
||
|
public function unserialize($s) {
|
||
|
$this->_object = XML::factory(NULL,NULL,$s);
|
||
|
}
|
||
|
|
||
|
// Required abstract classes
|
||
|
// Present pre-plugin processing information
|
||
|
abstract public function before(Cart $co);
|
||
|
abstract public function notify(Model_Checkout_Notify $cno);
|
||
|
|
||
|
public function __construct(Model_Checkout $co) {
|
||
|
$this->co = $co;
|
||
|
}
|
||
|
}
|
||
|
?>
|