array( 'label' => 'セブン-イレブン', ), 'D002' => array( 'label' => 'ローソン', ), 'D005' => array( 'label' => 'ミニストップ', ), 'D015' => array( 'label' => 'セイコーマート', ), 'D405' => array( 'label' => 'ペイジー', ), 'D010' => array( 'label' => 'デイリーヤマザキ', ), 'D011' => array( 'label' => 'ヤマザキデイリーストア', ), 'D030' => array( 'label' => 'ファミリーマート', ), 'E201' => array( 'label' => 'PayPay', ), 'E202' => array( 'label' => 'PayPay', ), 'D401' => array( 'label' => '楽天Edy', ), 'D404' => array( 'label' => '楽天銀行', ), 'D406' => array( 'label' => 'PayPay銀行', ), 'D403' => array( 'label' => 'モバイルSuica', ), 'D451' => array( 'label' => 'ウェブマネー', ), 'D452' => array( 'label' => 'ビットキャッシュ', ), 'D453' => array( 'label' => 'JCBプレモカード', ), 'P901' => array( 'label' => 'コンビニ払込票', ), 'P902' => array( 'label' => 'コンビニ払込票', ), 'P903' => array( 'label' => 'コンビニ払込票', ), 'P904' => array( 'label' => 'コンビニ払込票', ), 'P905' => array( 'label' => 'コンビニ払込票', ), 'P906' => array( 'label' => 'コンビニ払込票', ), 'C501' => array( 'label' => 'クレジットカード', ), 'C502' => array( 'label' => 'クレジットカード', ), 'C511' => array( 'label' => 'PayPal', ), 'K801' => array( 'label' => '口座振替会員登録', ), 'M601' => array( 'label' => 'd払い', ), 'M602' => array( 'label' => 'd払い', ), 'M603' => array( 'label' => 'd払い', ), 'M611' => array( 'label' => 'au PAY', ), 'M612' => array( 'label' => 'au PAY', ), 'M613' => array( 'label' => 'au PAY', ), 'M621' => array( 'label' => 'ソフトバンクまとめて支払い', ), 'M622' => array( 'label' => 'ソフトバンクまとめて支払い', ), 'M623' => array( 'label' => 'ソフトバンクまとめて支払い', ), ); /** * Construct. */ public function __construct() { $this->paymod_id = 'remise'; $this->pay_method = array( 'acting_remise_card', 'acting_remise_conv', ); $this->acting_name = 'ルミーズ'; $this->acting_formal_name = 'ルミーズ'; $this->acting_company_url = 'https://www.remise.co.jp/'; $this->initialize_data(); if ( is_admin() ) { add_action( 'admin_print_footer_scripts', array( $this, 'admin_scripts' ) ); add_action( 'usces_action_admin_settlement_update', array( $this, 'settlement_update' ) ); add_action( 'usces_action_settlement_tab_title', array( $this, 'settlement_tab_title' ) ); add_action( 'usces_action_settlement_tab_body', array( $this, 'settlement_tab_body' ) ); add_filter( 'usces_filter_settle_info_field_meta_keys', array( $this, 'settlement_info_field_meta_keys' ) ); add_filter( 'usces_filter_settle_info_field_keys', array( $this, 'settlement_info_field_keys' ), 10, 2 ); add_filter( 'usces_filter_settle_info_field_value', array( $this, 'settlement_info_field_value' ), 10, 3 ); } if ( $this->is_activate_card() || $this->is_activate_conv() ) { add_action( 'usces_action_reg_orderdata', array( $this, 'register_orderdata' ) ); add_filter( 'usces_filter_send_order_mail_payment', array( $this, 'order_mail_payment' ), 10, 6 ); } if ( $this->is_validity_acting( 'card' ) ) { add_filter( 'usces_filter_template_redirect', array( $this, 'member_update_settlement' ), 1 ); add_action( 'usces_action_member_submenu_list', array( $this, 'e_update_settlement' ) ); add_filter( 'usces_filter_member_submenu_list', array( $this, 'update_settlement' ), 10, 2 ); if ( is_admin() ) { add_action( 'usces_action_admin_member_info', array( $this, 'member_settlement_info' ), 10, 3 ); add_action( 'usces_action_post_update_memberdata', array( $this, 'member_edit_post' ), 10, 2 ); } } if ( $this->is_validity_acting( 'conv' ) ) { add_filter( 'usces_filter_payment_detail', array( $this, 'payment_detail' ), 10, 2 ); add_action( 'usces_filter_completion_settlement_message', array( $this, 'completion_settlement_message' ), 10, 2 ); } add_filter( 'usces_filter_order_confirm_mail_payment', array( $this, 'order_confirm_mail_payment' ), 10, 5 ); add_filter( 'usces_filter_pdf_payment_name', array( $this, 'pdf_payment_name' ), 10, 2 ); } /** * Return an instance of this class. */ public static function get_instance() { if ( null == self::$instance ) { self::$instance = new self(); } return self::$instance; } /** * Initialize. */ public function initialize_data() { $options = get_option( 'usces', array() ); if ( ! isset( $options['acting_settings'] ) || ! isset( $options['acting_settings']['remise'] ) ) { $options['acting_settings']['remise']['SHOPCO'] = ''; $options['acting_settings']['remise']['HOSTID'] = ''; $options['acting_settings']['remise']['card_activate'] = 'off'; $options['acting_settings']['remise']['card_jb'] = ''; $options['acting_settings']['remise']['card_pc_ope'] = ''; $options['acting_settings']['remise']['payquick'] = ''; $options['acting_settings']['remise']['howpay'] = ''; $options['acting_settings']['remise']['continuation'] = ''; $options['acting_settings']['remise']['conv_activate'] = 'off'; $options['acting_settings']['remise']['conv_pc_ope'] = ''; $options['acting_settings']['remise']['S_PAYDATE'] = ''; $options['acting_settings']['remise']['send_url_mbl'] = ''; $options['acting_settings']['remise']['send_url_pc'] = ''; $options['acting_settings']['remise']['send_url_cvs_mbl'] = ''; $options['acting_settings']['remise']['send_url_cvs_pc'] = ''; $options['acting_settings']['remise']['show_x_pay_csv'] = 'off'; update_option( 'usces', $options ); } } /** * 決済有効判定 * 支払方法で使用している場合に true * * @param string $type Module type. * @return boolean */ public function is_validity_acting( $type = '' ) { $acting_opts = $this->get_acting_settings(); if ( empty( $acting_opts ) ) { return false; } $payment_method = usces_get_system_option( 'usces_payment_method', 'sort' ); $method = false; switch ( $type ) { case 'card': foreach ( $payment_method as $payment ) { if ( 'acting_remise_card' === $payment['settlement'] && 'activate' === $payment['use'] ) { $method = true; break; } } if ( $method && $this->is_activate_card() ) { return true; } else { return false; } break; case 'conv': foreach ( $payment_method as $payment ) { if ( 'acting_remise_conv' === $payment['settlement'] && 'activate' === $payment['use'] ) { $method = true; break; } } if ( $method && $this->is_activate_conv() ) { return true; } else { return false; } break; default: if ( 'on' === $acting_opts['activate'] ) { return true; } else { return false; } } } /** * クレジットカード決済有効判定 * * @return boolean */ public function is_activate_card() { $acting_opts = $this->get_acting_settings(); if ( ( isset( $acting_opts['activate'] ) && 'on' === $acting_opts['activate'] ) && ( isset( $acting_opts['card_activate'] ) && ( 'on' === $acting_opts['card_activate'] ) ) ) { $res = true; } else { $res = false; } return $res; } /** * コンビニ・電子マネー決済有効判定 * * @return boolean */ public function is_activate_conv() { $acting_opts = $this->get_acting_settings(); if ( ( isset( $acting_opts['activate'] ) && 'on' === $acting_opts['activate'] ) && ( isset( $acting_opts['conv_activate'] ) && 'on' === $acting_opts['conv_activate'] ) ) { $res = true; } else { $res = false; } return $res; } /** * 管理画面スクリプト * admin_print_footer_scripts */ public function admin_scripts() { $admin_page = filter_input( INPUT_GET, 'page' ); switch ( $admin_page ) : case 'usces_settlement': $settlement_selected = get_option( 'usces_settlement_selected' ); if ( in_array( $this->paymod_id, (array) $settlement_selected, true ) ) : ?> paymod_id ) { return; } $this->error_mes = ''; $options = get_option( 'usces', array() ); $payment_method = usces_get_system_option( 'usces_payment_method', 'settlement' ); $post_data = wp_unslash( $_POST ); unset( $options['acting_settings']['remise'] ); $options['acting_settings']['remise']['plan'] = ( isset( $post_data['plan'] ) ) ? $post_data['plan'] : ''; $options['acting_settings']['remise']['SHOPCO'] = ( isset( $post_data['SHOPCO'] ) ) ? $post_data['SHOPCO'] : ''; $options['acting_settings']['remise']['HOSTID'] = ( isset( $post_data['HOSTID'] ) ) ? $post_data['HOSTID'] : ''; $options['acting_settings']['remise']['card_activate'] = ( isset( $post_data['card_activate'] ) ) ? $post_data['card_activate'] : ''; $options['acting_settings']['remise']['card_jb'] = ( isset( $post_data['card_jb'] ) ) ? $post_data['card_jb'] : ''; $options['acting_settings']['remise']['card_pc_ope'] = ( isset( $post_data['card_pc_ope'] ) ) ? $post_data['card_pc_ope'] : ''; $options['acting_settings']['remise']['payquick'] = ( isset( $post_data['payquick'] ) ) ? $post_data['payquick'] : ''; $options['acting_settings']['remise']['howpay'] = ( isset( $post_data['howpay'] ) ) ? $post_data['howpay'] : ''; $options['acting_settings']['remise']['continuation'] = ( isset( $post_data['continuation'] ) ) ? $post_data['continuation'] : ''; $options['acting_settings']['remise']['conv_activate'] = ( isset( $post_data['conv_activate'] ) ) ? $post_data['conv_activate'] : ''; $options['acting_settings']['remise']['conv_pc_ope'] = ( isset( $post_data['conv_pc_ope'] ) ) ? $post_data['conv_pc_ope'] : ''; $options['acting_settings']['remise']['S_PAYDATE'] = ( isset( $post_data['S_PAYDATE'] ) ) ? $post_data['S_PAYDATE'] : ''; $options['acting_settings']['remise']['send_url_mbl'] = ( isset( $post_data['send_url_mbl'] ) ) ? $post_data['send_url_mbl'] : ''; $options['acting_settings']['remise']['send_url_pc'] = ( isset( $post_data['send_url_pc'] ) ) ? $post_data['send_url_pc'] : ''; $options['acting_settings']['remise']['send_url_cvs_mbl'] = ( isset( $post_data['send_url_cvs_mbl'] ) ) ? $post_data['send_url_cvs_mbl'] : ''; $options['acting_settings']['remise']['send_url_cvs_pc'] = ( isset( $post_data['send_url_cvs_pc'] ) ) ? $post_data['send_url_cvs_pc'] : ''; $options['acting_settings']['remise']['show_x_pay_csv'] = ( isset( $post_data['show_x_pay_csv'] ) ) ? $post_data['show_x_pay_csv'] : ''; if ( 'on' === $options['acting_settings']['remise']['card_activate'] || 'on' === $options['acting_settings']['remise']['conv_activate'] ) { // if ( isset( $post_data['plan_remise'] ) && WCUtils::is_zero( $post_data['plan_remise'] ) ) { // $this->error_mes .= '※サービスプランを選択してください
'; // } if ( WCUtils::is_blank( $post_data['SHOPCO'] ) ) { $this->error_mes .= '※加盟店コードを入力してください
'; } if ( WCUtils::is_blank( $post_data['HOSTID'] ) ) { $this->error_mes .= '※ホスト番号を入力してください
'; } if ( 'on' === $options['acting_settings']['remise']['card_activate'] ) { if ( 'public' === $options['acting_settings']['remise']['card_pc_ope'] && WCUtils::is_blank( $post_data['send_url_pc'] ) ) { $this->error_mes .= '※クレジットカード決済の本番URLを入力してください
'; } } if ( 'on' === $options['acting_settings']['remise']['conv_activate'] ) { if ( WCUtils::is_blank( $post_data['S_PAYDATE'] ) ) { $this->error_mes .= '※支払期限を入力してください
'; } if ( 'public' === $options['acting_settings']['remise']['conv_pc_ope'] && WCUtils::is_blank( $post_data['send_url_cvs_pc'] ) ) { $this->error_mes .= '※コンビニ・電子マネー決済の本番URLを入力してください
'; } } } if ( '' === $this->error_mes ) { $usces->action_status = 'success'; $usces->action_message = __( 'Options are updated.', 'usces' ); if ( 'on' === $options['acting_settings']['remise']['card_activate'] || 'on' === $options['acting_settings']['remise']['conv_activate'] ) { $options['acting_settings']['remise']['activate'] = 'on'; $options['acting_settings']['remise']['REMARKS3'] = 'A0000875'; $toactive = array(); if ( 'on' === $options['acting_settings']['remise']['card_activate'] ) { if ( 'test' === $options['acting_settings']['remise']['card_pc_ope'] ) { $options['acting_settings']['remise']['send_url_pc_test'] = 'https://test.remise.jp/rpgw2/pc/card/paycard.aspx'; $options['acting_settings']['remise']['send_url_mbl_test'] = 'https://test.remise.jp/rpgw2/mbl/card/paycard.aspx'; } $usces->payment_structure['acting_remise_card'] = 'カード決済(ルミーズ)'; foreach ( $payment_method as $settlement => $payment ) { if ( 'acting_remise_card' === $settlement && 'activate' !== $payment['use'] ) { $toactive[] = $payment['name']; } } } else { unset( $usces->payment_structure['acting_remise_card'] ); } if ( 'on' === $options['acting_settings']['remise']['conv_activate'] ) { if ( 'test' === $options['acting_settings']['remise']['conv_pc_ope'] ) { $options['acting_settings']['remise']['send_url_cvs_pc_test'] = 'https://test.remise.jp/rpgw2/pc/cvs/paycvs.aspx'; $options['acting_settings']['remise']['send_url_cvs_mbl_test'] = 'https://test.remise.jp/rpgw2/mbl/cvs/paycvs.aspx'; } $usces->payment_structure['acting_remise_conv'] = 'マルチ決済(ルミーズ)'; foreach ( $payment_method as $settlement => $payment ) { if ( 'acting_remise_conv' === $settlement && 'activate' !== $payment['use'] ) { $toactive[] = $payment['name']; } } } else { unset( $usces->payment_structure['acting_remise_conv'] ); } usces_admin_orderlist_show_wc_trans_id(); if ( 0 < count( $toactive ) ) { $usces->action_message .= __( 'Please update the payment method to "Activate". General Setting > Payment Methods', 'usces' ); } } else { $options['acting_settings']['remise']['activate'] = 'off'; unset( $usces->payment_structure['acting_remise_card'] ); unset( $usces->payment_structure['acting_remise_conv'] ); } if ( 'on' !== $options['acting_settings']['remise']['card_activate'] || 'on' !== $options['acting_settings']['remise']['payquick'] || 'off' === $options['acting_settings']['remise']['activate'] ) { usces_clear_quickcharge( 'remise_pcid' ); } $deactivate = array(); foreach ( $payment_method as $settlement => $payment ) { if ( ! array_key_exists( $settlement, $usces->payment_structure ) ) { if ( 'deactivate' !== $payment['use'] ) { $payment['use'] = 'deactivate'; $deactivate[] = $payment['name']; usces_update_system_option( 'usces_payment_method', $payment['id'], $payment ); } } } if ( 0 < count( $deactivate ) ) { $deactivate_message = sprintf( __( '"Deactivate" %s of payment method.', 'usces' ), implode( ',', $deactivate ) ); $usces->action_message .= $deactivate_message; } } else { $usces->action_status = 'error'; $usces->action_message = __( 'Data have deficiency.', 'usces' ); $options['acting_settings']['remise']['activate'] = 'off'; unset( $usces->payment_structure['acting_remise_card'] ); unset( $usces->payment_structure['acting_remise_conv'] ); $deactivate = array(); foreach ( $payment_method as $settlement => $payment ) { if ( in_array( $settlement, $this->pay_method ) ) { if ( 'deactivate' !== $payment['use'] ) { $payment['use'] = 'deactivate'; $deactivate[] = $payment['name']; usces_update_system_option( 'usces_payment_method', $payment['id'], $payment ); } } } if ( 0 < count( $deactivate ) ) { $deactivate_message = sprintf( __( '"Deactivate" %s of payment method.', 'usces' ), implode( ',', $deactivate ) ); $usces->action_message .= $deactivate_message . __( 'Please complete the setup and update the payment method to "Activate".', 'usces' ); } } ksort( $usces->payment_structure ); update_option( 'usces', $options ); update_option( 'usces_payment_structure', $usces->payment_structure ); } /** * クレジット決済設定画面タブ * usces_action_settlement_tab_title */ public function settlement_tab_title() { $settlement_selected = get_option( 'usces_settlement_selected' ); if ( in_array( $this->paymod_id, (array) $settlement_selected, true ) ) { echo '
  • ' . esc_html( $this->acting_name ) . '
  • '; } } /** * クレジット決済設定画面フォーム * usces_action_settlement_tab_body */ public function settlement_tab_body() { global $usces; $acting_opts = $this->get_acting_settings(); $settlement_selected = get_option( 'usces_settlement_selected' ); if ( in_array( $this->paymod_id, (array) $settlement_selected, true ) ) : $plan = ( isset( $acting_opts['plan'] ) ) ? $acting_opts['plan'] : '0'; $shopco = ( isset( $acting_opts['SHOPCO'] ) ) ? $acting_opts['SHOPCO'] : ''; $hostid = ( isset( $acting_opts['HOSTID'] ) ) ? $acting_opts['HOSTID'] : ''; $card_activate = ( isset( $acting_opts['card_activate'] ) && 'on' === $acting_opts['card_activate'] ) ? 'on' : 'off'; $card_jb = ( isset( $acting_opts['card_jb'] ) ) ? $acting_opts['card_jb'] : 'AUTH'; $payquick = ( isset( $acting_opts['payquick'] ) && 'on' === $acting_opts['payquick'] ) ? 'on' : 'off'; $howpay = ( isset( $acting_opts['howpay'] ) && 'on' === $acting_opts['howpay'] ) ? 'on' : 'off'; $continuation = ( isset( $acting_opts['continuation'] ) && 'on' === $acting_opts['continuation'] ) ? 'on' : 'off'; $card_pc_ope = ( isset( $acting_opts['card_pc_ope'] ) && 'public' === $acting_opts['card_pc_ope'] ) ? 'public' : 'test'; $send_url_pc = ( isset( $acting_opts['send_url_pc'] ) ) ? $acting_opts['send_url_pc'] : ''; $conv_activate = ( isset( $acting_opts['conv_activate'] ) && 'on' === $acting_opts['conv_activate'] ) ? 'on' : 'off'; $s_paydate = ( isset( $acting_opts['S_PAYDATE'] ) ) ? $acting_opts['S_PAYDATE'] : ''; $conv_pc_ope = ( isset( $acting_opts['conv_pc_ope'] ) && 'public' === $acting_opts['conv_pc_ope'] ) ? 'public' : 'test'; $send_url_cvs_pc = ( isset( $acting_opts['send_url_cvs_pc'] ) ) ? $acting_opts['send_url_cvs_pc'] : ''; $show_x_pay_csv = ( isset( $acting_opts['show_x_pay_csv'] ) && 'on' === $acting_opts['show_x_pay_csv'] ) ? 'on' : 'off'; ?>
    acting_formal_name ); ?>
    paymod_id ) : if ( '' !== $this->error_mes ) : ?>
    error_mes ); ?>
    加盟店コード
    契約時にacting_name ); ?>から発行される加盟店コード(半角英数)
    ホスト番号
    契約時にacting_name ); ?>から割り当てられるホスト番号(半角数字)
    クレジットカード決済
    ジョブコード
    決済の種類を指定します。
    ペイクイック機能
    Welcart の会員システムを利用している場合、会員に対して2回目以降の決済の際、クレジットカード番号、有効期限、名義人の入力が不要となります。
    クレジットカード情報はWelcart では保存せず、acting_name ); ?>のデータベースにて安全に保管されます。
    お客様の支払方法
    「一括払い」以外をご利用の場合はacting_name ); ?>側の設定が必要となります。前もってacting_name ); ?>にお問合せください。
    「スーパーバリュープラン」の場合は「一括払いのみ」を選択してください。
    自動継続課金
    定期的に発生する月会費などの煩わしい課金処理を完全に自動化することができる機能です。
    詳しくはacting_name ); ?>にお問合せください。
    稼働環境
    動作環境を切り替えます。
    本番URL(PC)
    クレジットカード決済の本番環境(PC)で接続するURLを設定します。
    本番URL(携帯)
    クレジットカード決済の本番環境(携帯)で接続するURLを設定します。
    マルチ決済
    支払期限
    日数を設定します。(半角数字)
    稼働環境
    動作環境を切り替えます。
    本番URL(PC)
    マルチ決済の本番環境(PC)で接続するURLを設定します。
    本番URL(携帯)
    マルチ決済の本番環境(携帯)で接続するURLを設定します。
    マルチ決済支払先表示
    マルチ決済で支払いを行った際に、メールおよびPDFに支払先を表示します。

    acting_name ); ?>の詳細はこちら 》

     

    この決済は「外部リンク型」の決済システムです。

    「外部リンク型」とは、決済会社のページへは遷移してカード情報を入力する決済システムです。

    「自動継続課金」を利用するには「WCEX DL Seller」拡張プラグインのインストールが必要です。

    pay_method ) ) { return; } if ( ! $entry['order']['total_full_price'] ) { return; } if ( isset( $_REQUEST['X-S_TORIHIKI_NO'] ) ) { $usces->set_order_meta_value( 'settlement_id', wp_unslash( $_REQUEST['X-S_TORIHIKI_NO'] ), $order_id ); $usces->set_order_meta_value( 'wc_trans_id', wp_unslash( $_REQUEST['X-S_TORIHIKI_NO'] ), $order_id ); if ( isset( $_REQUEST['X-AC_MEMBERID'] ) ) { $usces->set_order_meta_value( wp_unslash( $_REQUEST['X-AC_MEMBERID'] ), 'continuation', $order_id ); $usces->set_member_meta_value( 'continue_memberid_' . $order_id, wp_unslash( $_REQUEST['X-AC_MEMBERID'] ) ); } if ( isset( $_REQUEST['X-PAY_CSV'] ) ) { $usces->set_order_meta_value( 'remise_x_pay_csv', wp_unslash( $_REQUEST['X-PAY_CSV'] ), $order_id ); } } } /** * Add payment institution to Thank You Mail payment methods. * * @param string $msg_payment Payment method message. * @param int $order_id Order number. * @param array $payment Payment data. * @param array $cart Cart data. * @param array $entry Entry data. * @param array $data Order data. * @return string */ public function order_mail_payment( $msg_payment, $order_id, $payment, $cart, $entry, $data ) { global $usces; if ( 'acting_remise_conv' !== $payment['settlement'] ) { return $msg_payment; } $remise_x_pay_csv = $usces->get_order_meta_value( 'remise_x_pay_csv', $order_id ); if ( empty( $remise_x_pay_csv ) ) { return $msg_payment; } $acting_opts = $this->get_acting_settings(); $show_x_pay_csv = ( isset( $acting_opts['show_x_pay_csv'] ) && 'on' === $acting_opts['show_x_pay_csv'] ) ? 'on' : 'off'; if ( 'off' === $show_x_pay_csv ) { return $msg_payment; } if ( ! isset( self::$x_pay_csv_list[ $remise_x_pay_csv ] ) ) { return $msg_payment; } $remise_x_pay_csv_text = '(' . self::$x_pay_csv_list[ $remise_x_pay_csv ]['label'] . ')'; if ( usces_is_html_mail() ) { $msg_payment = '' . $payment['name'] . $remise_x_pay_csv_text . usces_payment_detail( $entry ) . ''; } else { $msg_payment = __( '** Payment method **', 'usces' ) . "\r\n"; $msg_payment .= usces_mail_line( 1, $entry['customer']['mailaddress1'] ); // ******************** $msg_payment .= $payment['name'] . $remise_x_pay_csv_text . usces_payment_detail( $entry ) . "\r\n\r\n"; } return $msg_payment; } /** * クレジットカード登録・変更ページ表示 * usces_filter_template_redirect */ public function member_update_settlement() { global $usces; if ( $usces->is_member_page( $_SERVER['REQUEST_URI'] ) ) { if ( ! usces_is_membersystem_state() || ! usces_is_login() ) { return; } $acting_opts = $this->get_acting_settings(); if ( 'on' !== $acting_opts['payquick'] ) { return; } if ( isset( $_REQUEST['usces_page'] ) && 'member_update_settlement' === wp_unslash( $_REQUEST['usces_page'] ) ) { add_filter( 'usces_filter_states_form_js', array( $this, 'states_form_js' ) ); $usces->page = 'member_update_settlement'; $this->member_update_settlement_form(); exit(); } } return false; } /** * クレジットカード登録・変更ページ表示 * usces_filter_states_form_js * * @param string $js Scripts. * @return string */ public function states_form_js( $js ) { return ''; } /** * クレジットカード登録・変更ページリンク * usces_action_member_submenu_list */ public function e_update_settlement() { global $usces; $member = $usces->get_member(); $html = $this->update_settlement( '', $member ); echo $html; // no escape. } /** * クレジットカード登録・変更ページリンク * usces_filter_member_submenu_list * * @param string $html Submenu area of the member page. * @param array $member Member information. * @return string */ public function update_settlement( $html, $member ) { global $usces; $acting_opts = $this->get_acting_settings(); if ( 'on' === $acting_opts['payquick'] ) { $member = $usces->get_member(); $pcid = $usces->get_member_meta_value( 'remise_pcid', $member['ID'] ); if ( ! empty( $pcid ) ) { $update_settlement_url = add_query_arg( array( 'usces_page' => 'member_update_settlement', 're-enter' => 1, ), USCES_MEMBER_URL ); $html .= '
  • ' . __( 'Change the credit card is here >>', 'usces' ) . '
  • '; } } return $html; } /** * クレジットカード登録・変更ページ */ public function member_update_settlement_form() { global $usces; $member = $usces->get_member(); $member_id = $member['ID']; $update_settlement_url = add_query_arg( array( 'usces_page' => 'member_update_settlement', 'settlement' => 1, 're-enter' => 1, ), USCES_MEMBER_URL ); $acting_opts = $this->get_acting_settings(); $send_url = ( 'public' === $acting_opts['card_pc_ope'] ) ? $acting_opts['send_url_pc'] : $acting_opts['send_url_pc_test']; $rand = '0000000' . $member_id; $partofcard = $usces->get_member_meta_value( 'partofcard', $member_id ); $limitofcard = $usces->get_member_meta_value( 'limitofcard', $member_id ); $error_message = apply_filters( 'usces_filter_member_update_settlement_error_message', $usces->error_message ); ob_start(); get_header(); ?>

    In addition, this process is intended to update the card information such as credit card expiration date, it is not in your contract renewal of service.
    To check the current contract, please refer to the member page.', 'usces' ); ?>

    $value ) : if ( 'remise_pcid' !== $key ) : if ( 'partofcard' === $key ) { $label = '下4桁'; } elseif ( 'limitofcard' === $key ) { $label = '有効期限'; } elseif ( 'remise_memid' === $key ) { $label = 'メンバーID'; } else { $label = $key; } ?>
    ペイクイック
    登録あり
    is_activate_card() || false === $res ) { return; } if ( 'delete' === filter_input( INPUT_POST, 'remise_pcid' ) ) { $usces->del_member_meta( 'remise_pcid', $member_id ); } } /** * 支払方法説明 * usces_filter_payment_detail * * @param string $str Payment method description. * @param array $entry Entry data. * @return string */ public function payment_detail( $str, $entry ) { $payment = usces_get_payments_by_name( $entry['order']['payment_name'] ); if ( isset( $payment['settlement'] ) && 'acting_remise_conv' === $payment['settlement'] ) { $acting_opts = $this->get_acting_settings(); $payment_detail = __( '(', 'usces' ) . sprintf( __( 'Payment is valid for %s days from the date of order.', 'usces' ), $acting_opts['S_PAYDATE'] ) . __( ')', 'usces' ); $str = apply_filters( 'usces_filter_remise_payment_limit_conv', $payment_detail, $acting_opts['S_PAYDATE'] ); } return $str; } /** * 購入完了メッセージ * usces_filter_completion_settlement_message * * @param string $html Completion message. * @param array $entry Entry data. * @return string */ public function completion_settlement_message( $html, $entry ) { global $usces; if ( isset( $_REQUEST['acting'] ) && 'remise_conv' === wp_unslash( $_REQUEST['acting'] ) ) { $x_pay_csv = wp_unslash( $_REQUEST['X-PAY_CSV'] ); $conv_name = usces_get_conv_name( $x_pay_csv ); if ( empty( $conv_name ) ) { $conv_name = isset( self::$x_pay_csv_list[ $x_pay_csv ]['label'] ) ? self::$x_pay_csv_list[ $x_pay_csv ]['label'] : ''; } $html .= '
    ルミーズ・マルチ決済
    '; $html .= ''; $html .= ''; $html .= ''; $paydate = wp_unslash( $_REQUEST['X-PAYDATE'] ); $html .= ''; $html .= ''; $html .= $this->get_remise_conv_return( $x_pay_csv ); $html .= '
    ご請求番号' . esc_html( wp_unslash( $_REQUEST['X-S_TORIHIKI_NO'] ) ) . '
    ご請求合計金額' . esc_html( wp_unslash( $_REQUEST['X-TOTAL'] ) ) . '
    お支払期限' . esc_html( substr( $paydate, 0, 4 ) . '年' . substr( $paydate, 4, 2 ) . '月' . substr( $paydate, 6, 2 ) . '日' ) . '(期限を過ぎますとお支払ができません)
    お支払先' . esc_html( $conv_name ) . '
    '; $html .= '

    「お支払いのご案内」は、' . esc_html( $entry['customer']['mailaddress1'] ) . ' 宛にメールさせていただいております。

    '; $html .= '
    '; } return $html; } /** * 管理画面送信メール * usces_filter_order_confirm_mail_payment * * @param string $msg_payment Default payment message. * @param int $order_id Order number. * @param array $payment Payment information. * @param array $cart Cart data. * @param array $data Order data. * @return string */ public function order_confirm_mail_payment( $msg_payment, $order_id, $payment, $cart, $data ) { if ( 'acting_remise_conv' !== $payment['settlement'] ) { return $msg_payment; } global $usces; $remise_x_pay_csv = $usces->get_order_meta_value( 'remise_x_pay_csv', $order_id ); if ( empty( $remise_x_pay_csv ) ) { return $msg_payment; } $acting_opts = $this->get_acting_settings(); $show_x_pay_csv = ( isset( $acting_opts['show_x_pay_csv'] ) && 'on' === $acting_opts['show_x_pay_csv'] ) ? 'on' : 'off'; if ( 'off' === $show_x_pay_csv ) { return $msg_payment; } if ( ! isset( self::$x_pay_csv_list[ $remise_x_pay_csv ] ) ) { return $msg_payment; } $remise_x_pay_csv_text = '(' . self::$x_pay_csv_list[ $remise_x_pay_csv ]['label'] . ')'; if ( usces_is_html_mail() ) { $msg_payment = '' . $payment['name'] . $remise_x_pay_csv_text . usces_payment_detail_confirm( $data ) . ''; } else { $msg_payment = __( '** Payment method **', 'usces' ) . "\r\n"; $msg_payment .= usces_mail_line( 1, $data['order_email'] ); // ******************** $msg_payment .= $payment['name'] . $remise_x_pay_csv_text; $msg_payment .= "\r\n\r\n"; } return $msg_payment; } /** * Add payment institution to PDF payment method. * * @param string $payment_name Payment Name.. * @param mixed $data Order data. * * @return mixed|string */ public function pdf_payment_name( $payment_name, $data ) { global $usces; $acting_opts = $this->get_acting_settings(); $show_x_pay_csv = ( isset( $acting_opts['show_x_pay_csv'] ) && 'on' === $acting_opts['show_x_pay_csv'] ) ? 'on' : 'off'; if ( 'off' === $show_x_pay_csv ) { return $payment_name; } $remise_x_pay_csv = $usces->get_order_meta_value( 'remise_x_pay_csv', $data->order['ID'] ); if ( empty( $remise_x_pay_csv ) ) { return $payment_name; } if ( ! isset( self::$x_pay_csv_list[ $remise_x_pay_csv ] ) ) { return $payment_name; } $remise_x_pay_csv_text = '(' . self::$x_pay_csv_list[ $remise_x_pay_csv ]['label'] . ')'; return $payment_name . $remise_x_pay_csv_text; } /** * コンビニステータス * * @param string $code CVS code. * @return string */ protected function get_remise_conv_return( $code ) { switch ( $code ) { case 'D001': /* セブンイレブン */ $html = '払込番号' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO1'] ) ) . ''; $html .= '払込票のURL' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO2'] ) ) . ''; break; case 'D002': /* ローソン */ case 'D015': /* セイコーマート */ case 'D405': /* ペイジー */ $html = '受付番号' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO1'] ) ) . ''; $html .= '支払方法案内URL' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO2'] ) ) . ''; break; case 'D003': /* サンクス */ case 'D004': /* サークルK */ case 'D005': /* ミニストップ */ case 'D010': /* デイリーヤマザキ */ case 'D011': /* ヤマザキデイリーストア */ $html = '決済番号' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO1'] ) ) . ''; $html .= '支払方法案内URL' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO2'] ) ) . ''; break; case 'D030': /* ファミリーマート */ $html = 'コード' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO1'] ) ) . ''; $html .= '注文番号' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO2'] ) ) . ''; break; case 'D401': /* CyberEdy */ case 'D404': /* 楽天銀行 */ case 'D406': /* ジャパネット銀行 */ case 'D407': /* Suicaインターネットサービス */ case 'D451': /* ウェブマネー */ case 'D452': /* ビットキャッシュ */ case 'D453': /* JCBプレモカード */ $html = '受付番号' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO1'] ) ) . ''; $html .= '支払手続URL' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO2'] ) ) . ''; break; case 'P901': /* コンビニ払込票 */ case 'P902': /* コンビニ払込票(郵便振替対応) */ $html = '受付番号' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO1'] ) ) . ''; break; case 'E201': case 'E202': case 'M601': case 'M602': case 'M603': case 'M611': case 'M612': case 'M613': case 'M621': case 'M622': case 'M623': $html = '支払手続きURL' . esc_html( wp_unslash( $_REQUEST['X-PAY_NO2'] ) ) . ''; break; default: $html = ''; } return $html; } /** * 収納情報通知の送信元IPを検証する * * 許可IP以外からのリクエストはエラーログを残して処理を終了する * 入金状態を変更するサーバー間通知でのみ呼び出すこと * ブラウザ戻りを伴う結果戻りでは呼び出さない * * @param array $data Notification data. * @return void */ public function acting_notice_ip_guard( $data ) { $acting_opts = $this->get_acting_settings(); $allowed_ips = ( isset( $acting_opts['conv_pc_ope'] ) && 'public' === $acting_opts['conv_pc_ope'] ) ? self::ACTING_NOTICE_IPADDRS_PUBLIC : self::ACTING_NOTICE_IPADDRS_TEST; $remote_addr = ( isset( $_SERVER['REMOTE_ADDR'] ) ) ? wp_unslash( $_SERVER['REMOTE_ADDR'] ) : ''; if ( usces_acting_notice_ip_allowed( $remote_addr, $allowed_ips ) ) { return; } $log = array( 'acting' => 'remise_conv', 'key' => ( isset( $data['S_TORIHIKI_NO'] ) ) ? $data['S_TORIHIKI_NO'] : '', 'result' => 'IP ADDRESS NOT ALLOWED: ' . $remote_addr, 'data' => $data, ); usces_save_order_acting_error( $log ); usces_log( 'remise conv denied ip : ' . $remote_addr, 'acting_transaction.log' ); die( 'error0' ); } /** * 決済オプション取得 * * @return array */ protected function get_acting_settings() { global $usces; $acting_settings = ( isset( $usces->options['acting_settings'][ $this->paymod_id ] ) ) ? $usces->options['acting_settings'][ $this->paymod_id ] : array(); return $acting_settings; } /** * 契約中の自動継続課金情報 * * @param int $member_id Member ID. * @return int */ protected function have_member_continue_order( $member_id ) { global $wpdb; $continue = 0; $continuation_table = $wpdb->prefix . 'usces_continuation'; $query = $wpdb->prepare( "SELECT * FROM {$continuation_table} WHERE `con_member_id` = %d AND `con_status` = 'continuation' ORDER BY `con_price` DESC", $member_id ); $continue_order = $wpdb->get_results( $query, ARRAY_A ); if ( $continue_order && 0 < count( $continue_order ) ) { $continue = $continue_order[0]['con_order_id']; } return $continue; } }