woocommerce/classes/gateways/gateway.class.php

51 lines
869 B
PHP
Raw Normal View History

2011-08-09 15:16:18 +00:00
<?php
/**
2011-08-10 17:11:11 +00:00
* WooCommerce Payment Gateway class
*
* Extended by individual payment gateways to handle payments.
*
* @class woocommerce_payment_gateway
* @package WooCommerce
* @category Payment Gateways
* @author WooThemes
*/
class woocommerce_payment_gateway {
2011-08-09 15:16:18 +00:00
var $id;
var $title;
var $chosen;
var $has_fields;
var $countries;
var $availability;
var $enabled;
var $icon;
var $description;
function is_available() {
if ($this->enabled=="yes") :
return true;
endif;
return false;
}
function set_current() {
$this->chosen = true;
}
function icon() {
global $woocommerce;
2011-08-09 15:16:18 +00:00
if ($this->icon) :
return '<img src="'. $woocommerce->force_ssl($this->icon).'" alt="'.$this->title.'" />';
2011-08-09 15:16:18 +00:00
endif;
}
function admin_options() {}
function process_payment() {}
function validate_fields() { return true; }
}