예제 #1
0
 function mgm_free()
 {
     // parent
     parent::__construct();
     // set code
     $this->code = __CLASS__;
     // set module
     $this->module = str_replace('mgm_', '', $this->code);
     // set name
     $this->name = 'Free';
     // logo
     $this->logo = $this->module_url('assets/free.gif');
     // virtual payment
     $this->virtual_payment = 'Y';
     // description
     $this->description = __('Allow users to signup for a free account, this Payment Gateway must ' . 'be enabled for Pay Per Post to work along with Paypal Gateway.', 'mgm');
     // supported buttons types
     $this->supported_buttons = array('subscription');
     // default settings
     $this->_default_setting();
     // set path
     parent::set_tmpl_path();
     // read settings
     $this->read();
 }
예제 #2
0
 function mgm_trial()
 {
     // parent
     parent::__construct();
     // set code
     $this->code = __CLASS__;
     // set module
     $this->module = str_replace('mgm_', '', $this->code);
     // set name
     $this->name = 'Trial';
     // logo
     $this->logo = $this->module_url('assets/trial.gif');
     // virtual payment
     $this->virtual_payment = 'Y';
     // description
     $this->description = __('Allow users to signup for a free trial account which expires automatically after ' . 'a number of days. You can set the number of days/months/years before a trial account ' . 'expires on the Subscription Settings page. Simply set the Account ' . 'Type to "Trial" to use this gateway.', 'mgm');
     // supported buttons types
     $this->supported_buttons = array('subscription');
     // default settings
     $this->_default_setting();
     // set path
     parent::set_tmpl_path();
     // read settings
     $this->read();
 }
 function mgm_paymill()
 {
     load_paymill();
     // this function-call can and should be used whenever working with Paymill API
     $GLOBALS['paymill_loader']->paymill_errors->setFunction('paymill_mgm_errorHandling');
     // parent
     parent::__construct();
     // set code
     $this->code = __CLASS__;
     // set module
     $this->module = str_replace('mgm_', '', $this->code);
     // set name
     $this->name = 'Paymill';
     // logo
     $this->logo = plugins_url('', PAYMILL_DIR . 'paymill.php') . '/lib/img/logo.png';
     // description
     $this->description = __('PAYMILL - Online payments made easy', 'paymill');
     // supported buttons types
     $this->supported_buttons = array('subscription', 'buypost');
     // trial support available ?
     $this->supports_trial = 'Y';
     // cancellation support available ?
     $this->supports_cancellation = 'Y';
     // do we depend on product mapping
     $this->requires_product_mapping = 'N';
     // type of integration
     $this->hosted_payment = 'Y';
     // credit card process onsite
     // if supports rebill status check
     $this->supports_rebill_status_check = 'N';
     // default settings
     $this->_default_setting();
     // set path
     parent::set_tmpl_path(PAYMILL_DIR . 'lib/tpl/mgm/');
     // read settings
     $this->read();
 }
예제 #4
0
 function mgm_manualpay()
 {
     // parent
     parent::__construct();
     // set code
     $this->code = __CLASS__;
     // set module
     $this->module = str_replace('mgm_', '', $this->code);
     // set name
     $this->name = 'Manual Pay / eCheck';
     // logo
     $this->logo = $this->module_url('assets/manual.jpg');
     // virtual payment
     $this->virtual_payment = 'Y';
     // description
     $this->description = __('Allow users to signup and pay via eCheck/Wire Transfer. ' . 'Registration will be active once payment is complete.', 'mgm');
     // supported buttons types
     $this->supported_buttons = array('subscription');
     // trial support available ?
     $this->supports_trial = 'Y';
     // cancellation support available ?
     $this->supports_cancellation = 'Y';
     // do we depend on product mapping
     $this->requires_product_mapping = 'N';
     // type of integration
     $this->hosted_payment = 'Y';
     // html redirect
     // supported buttons types
     $this->supported_buttons = array('subscription');
     // default settings
     $this->_default_setting();
     // set path
     parent::set_tmpl_path();
     // read settings
     $this->read();
 }
 function _address_fields_filter($name, $value)
 {
     // reuse parent filter unless needed
     switch ($name) {
         default:
             $value = parent::_address_field_filter($name, $value);
             break;
     }
     // return
     return $value;
 }
예제 #6
0
 function _address_fields_filter($name, $value)
 {
     // reuse parent filter unless needed
     switch ($name) {
         case 'address':
             $value = str_replace("\n", "
", trim($value));
             break;
         default:
             $value = parent::_address_field_filter($name, $value);
             break;
     }
     // return
     return $value;
 }
예제 #7
0
 function _get_endpoint($type = false, $include_permalink = true)
 {
     // status
     $type = $type === false ? $this->status : $type;
     $aquirer = $this->setting['aquirer'];
     // type/status
     switch ($type) {
         case 'sim':
             //simulator
             return $this->end_points['sim'];
             break;
         case 'test':
         case 'live':
             // test
             if ($type == 'test') {
                 $replace = $aquirer == 'rabo_omnikassa' ? '.simu' : 'test';
             } else {
                 $replace = $aquirer == 'abnamro' ? 'prod' : '';
             }
             // replace
             return str_replace('[TEST]', $replace, $this->end_points[$aquirer]);
             break;
     }
     // default
     return parent::_get_endpoint($type, $include_permalink);
 }
예제 #8
0
 function _address_fields_filter($name, $value)
 {
     // reuse parent filter unless needed
     switch ($name) {
         case 'state':
             // trim chars
             $value = substr($value, 0, 64);
             break;
         default:
             $value = parent::_address_field_filter($name, $value);
             break;
     }
     // return
     return $value;
 }
예제 #9
0
 function _address_fields_filter($name, $value)
 {
     // trim space
     $value = trim($value);
     // reuse parent filter unless needed
     switch ($name) {
         case 'address':
             // newlines
             $value = str_replace("\n", "", $value);
             // trim chars
             $value = substr($value, 0, 80);
             break;
         case 'full_name':
         case 'city':
         case 'state':
         case 'phone':
             // trim chars
             $value = substr($value, 0, 32);
             break;
         default:
             $value = parent::_address_field_filter($name, $value);
             break;
     }
     // return
     return $value;
 }
 function _address_fields_filter($name, $value)
 {
     // reuse parent filter unless needed
     switch ($name) {
         case 'birthdate':
             $value = date('dmY', strtotime($value));
             break;
         default:
             $value = parent::_address_field_filter($name, $value);
             break;
     }
     // return
     return $value;
 }