function _get_endpoint($pack, $tran_id = NULL) { // string if (is_string($pack)) { return parent::_get_endpoint($pack); } else { // array // get url $endpoint = parent::_get_endpoint(); // product $endpoint = str_replace('[product_id]', $pack['product']['clickbank_product_id'], $endpoint); // username $endpoint = str_replace('[username]', $this->setting['username'], $endpoint); // custom // $this->_set_payment_type($pack) $endpoint = str_replace('[custom]', $tran_id, $endpoint); // skin if (!empty($this->setting['cbskin'])) { $endpoint = add_query_arg(array('cbskin' => $this->setting['cbskin']), $endpoint); } // return return $endpoint; } }
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); }
function _get_endpoint($pack) { // string if (is_string($pack)) { return parent::_get_endpoint($pack); } else { // get url $endpoint = parent::_get_endpoint(); // price_id $endpoint = str_replace('[price_id]', $pack['product']['zombaio_price_id'], $endpoint); // site_id $endpoint = str_replace('[site_id]', $this->setting['site_id'], $endpoint); // lang $endpoint = str_replace('[lang]', $this->setting['lang'], $endpoint); // return return $endpoint; } }