public function script() { if (WC_Gateway_PayGate::$is_script_already === true) { return; } if ($this->enabled == 'yes') { WC_Gateway_PayGate::$is_script_already = true; $order_id = isset($_GET['order']) ? absint($_GET['order']) : 0; $order_key = isset($_GET['key']) ? woocommerce_clean($_GET['key']) : ''; $order = new WC_Order($order_id); $thanks_url = get_permalink($order->get_checkout_order_received_url()); $thanks_url = add_query_arg('key', $order->order_key, add_query_arg('order', $order->id, $thanks_url)); //wp_enqueue_script( 'wc_paygate_remote', 'https://api.paygate.net/ajax/common/OpenPayAPI.js',null, null,true); #ie 7 지원 echo '<script language="javascript" src="https://api.paygate.net/ajax/common/OpenPayAPI.js" charset="utf-8"></script>'; wp_enqueue_script('wc_paygate_main', WCKP_PAYGATE_PLUGIN_URL . 'assets/paygate.js', array('jquery'), wc_korea_pack()->version, true); wp_localize_script('wc_paygate_main', 'wckp', array('thanks_url' => $thanks_url, 'cart_url' => get_permalink(woocommerce_get_page_id('cart')), 'message_failure' => __('결제가 실패했습니다. 다시 이용해 주세요', 'wc_korea_pack'))); wp_register_style('wc_paygate_main', WCKP_PAYGATE_PLUGIN_URL . 'assets/style.css', '', wc_korea_pack()->version); wp_enqueue_style('wc_paygate_main'); } }
public function init_form_fields() { parent::init_form_fields(); $this->form_fields = array_merge($this->form_fields, array('title' => array('title' => __('Title', 'wc_korea_pack'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'wc_korea_pack'), 'default' => __('실시간 계좌이체 [ActiveX]', 'wc_korea_pack'), 'desc_tip' => true))); }
public function init_form_fields() { parent::init_form_fields(); $this->form_fields = array_merge($this->form_fields, array('title' => array('title' => __('Title', 'wc_korea_pack'), 'type' => 'text', 'description' => __('This controls the title which the user sees during checkout.', 'wc_korea_pack'), 'default' => __('Card Payment', 'wc_korea_pack'), 'desc_tip' => true), 'openpay_card_list' => array('title' => __('오픈결제 카드', 'wc_korea_pack'), 'description' => __('ie를 제외한 브라우져에서 결제 가능한 카드 설정(paygate 공지사항 참조)', 'wc_korea_pack'), 'options' => $this->card_list, 'default' => '', 'desc_tip' => __('', 'wc_korea_pack'), 'type' => 'multiselect'))); }