. * * Originally authored by Deon George * * @author Deon George * @copyright 2009 Deon George * @link http://osb.leenooks.net * @license http://www.gnu.org/licenses/ * @package AgileBill * @subpackage Checkout:Paypal */ # When we are called back after a payment, we come directly here, and thus our config.inc hasnt been parsed. if (defined('PATH_MODULES')) include_once(PATH_MODULES.'checkout/base_checkout_plugin.class.php'); else include_once('../../modules/checkout/base_checkout_plugin.class.php'); abstract class plg_chout_base_PAYPAL extends base_checkout_plugin { public function __construct($checkout_id=false,$multi=false) { $this->type = 'redirect'; $this->return_url = sprintf('%splugins/checkout/%s.php',SSL_URL,$this->name); if ($multi) { $this->success_url = URL.'?_page=invoice:thankyou&_next_page=invoice:user_view&id='; $this->decline_url = URL.'?_page=invoice:checkout_multiple&id='; } else { $this->success_url = URL.'?_page=invoice:thankyou&_next_page=invoice:user_view&id='; $this->decline_url = URL.'?_page=invoice:user_view&id='; } $this->support_cur = array('AUD','USD','GBP','EUR','CAD','JPY'); $this->getDetails($checkout_id); } protected function getLocation($uri=true,$nojs=false) { switch ($this->cfg['mode']) { case 1: return ($uri ? 'https://' : '').'www.paypal.com'; break; case 0: if (! $nojs) echo ''; return ($uri ? 'https://' : '').'www.sandbox.paypal.com'; break; default: return false; } } # Validate the user submitted billing details at checkout: function validate($VAR) { return true; } # Perform a transaction for an (new invoice): function bill_invoice($VAR) { return true; } # Issue a refund for a paid invoice (captured charges w/gateway) function refund($VAR) { return true; } # Void a authorized charge (gateways only) function void($VAR) { return true; } # Stores new billing details, & return account_billing_id (gateway only) public function store_billing($VAR) { return null; } }