To check the current contract, please refer to the member page.', 'usces' ); ?>
To check the current contract, please refer to the member page.', 'usces' ); ?>
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かんたん決済',
),
'M612' => array(
'label' => 'auかんたん決済',
),
'M613' => array(
'label' => 'auかんたん決済',
),
'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 '
acting_name ); ?>の詳細はこちら 》
この決済は「外部リンク型」の決済システムです。
「外部リンク型」とは、決済会社のページへは遷移してカード情報を入力する決済システムです。
「自動継続課金」を利用するには「WCEX DL Seller」拡張プラグインのインストールが必要です。
| ご請求番号 | ' . 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 ) . ' |
「お支払いのご案内」は、' . esc_html( $entry['customer']['mailaddress1'] ) . ' 宛にメールさせていただいております。
'; $html .= '