paymod_id = $mode;
if ( $this->is_activate_conv() ) {
add_filter( 'usces_filter_noreceipt_status', array( $this, 'noreceipt_status' ) );
}
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' ) );
}
if ( $this->is_validity_acting() ) {
add_action( 'plugins_loaded', array( $this, 'acting_construct' ), 11 );
add_action( 'usces_after_cart_instant', array( $this, 'acting_transaction' ), 9 );
add_filter( 'usces_filter_order_confirm_mail_payment', array( $this, 'order_confirm_mail_payment' ), 10, 5 );
add_filter( 'usces_filter_is_complete_settlement', array( $this, 'is_complete_settlement' ), 10, 3 );
add_filter( 'usces_filter_get_link_key', array( $this, 'get_link_key' ), 10, 2 );
add_action( 'usces_action_revival_order_data', array( $this, 'revival_orderdata' ), 10, 3 );
if ( is_admin() ) {
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 );
} else {
add_filter( 'usces_filter_payment_detail', array( $this, 'payment_detail' ), 10, 2 );
add_filter( 'usces_filter_payments_str', array( $this, 'payments_str' ), 10, 2 );
add_filter( 'usces_filter_payments_arr', array( $this, 'payments_arr' ), 10, 2 );
// add_filter( 'usces_filter_delivery_check', array( $this, 'delivery_check' ), 15 );
add_filter( 'usces_filter_confirm_inform', array( $this, 'confirm_inform' ), 10, 5 );
add_action( 'usces_action_confirm_page_point_inform', array( $this, 'e_point_inform' ), 10, 5 );
add_filter( 'usces_filter_confirm_point_inform', array( $this, 'point_inform' ), 10, 5 );
if ( defined( 'WCEX_COUPON' ) ) {
add_filter( 'wccp_filter_coupon_inform', array( $this, 'point_inform' ), 10, 5 );
}
add_action( 'usces_action_acting_processing', array( $this, 'acting_processing' ), 10, 2 );
add_filter( 'usces_filter_check_acting_return_results', array( $this, 'acting_return' ) );
add_filter( 'usces_filter_check_acting_return_duplicate', array( $this, 'check_acting_return_duplicate' ), 10, 2 );
add_action( 'usces_action_reg_orderdata', array( $this, 'register_orderdata' ) );
// add_filter( 'usces_filter_get_error_settlement', array( $this, 'error_page_message' ) );
add_filter( 'usces_filter_completion_settlement_message', array( $this, 'completion_settlement_message' ), 10, 2 );
}
}
if ( $this->is_validity_acting( 'card' ) ) {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'wp_print_footer_scripts', array( $this, 'footer_scripts' ), 9 );
add_filter( 'usces_filter_delivery_check', array( $this, 'delivery_check' ), 15 );
add_filter( 'usces_filter_delivery_secure_form_loop', array( $this, 'delivery_secure_form_loop' ), 10, 2 );
add_action( 'usces_action_pre_delete_memberdata', array( $this, 'delete_member' ) );
add_filter( 'usces_filter_get_error_settlement', array( $this, 'error_page_message' ) );
if ( is_admin() ) {
add_action( 'usces_action_admin_member_info', array( $this, 'admin_member_info' ), 10, 3 );
add_action( 'usces_action_post_update_memberdata', array( $this, 'admin_update_memberdata' ), 10, 2 );
}
}
}
/**
* Initialize.
*/
public function initialize_data() {
}
/**
* 決済有効判定
* 引数が指定されたとき、支払方法で使用している場合に「有効」とする
*
* @param string|NULL $type Payment 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 ( $this->acting_flg_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 ( $this->acting_flg_conv === $payment['settlement'] && 'activate' === $payment['use'] ) {
$method = true;
break;
}
}
if ( $method && $this->is_activate_conv() ) {
return true;
} else {
return false;
}
break;
case 'payeasy':
foreach ( $payment_method as $payment ) {
if ( $this->acting_flg_payeasy === $payment['settlement'] && 'activate' === $payment['use'] ) {
$method = true;
break;
}
}
if ( $method && $this->is_activate_payeasy() ) {
return true;
} else {
return false;
}
break;
case 'wallet':
foreach ( $payment_method as $payment ) {
if ( $this->acting_flg_wallet === $payment['settlement'] && 'activate' === $payment['use'] ) {
$method = true;
break;
}
}
if ( $method && $this->is_activate_wallet() ) {
return true;
} else {
return false;
}
break;
case 'mobile':
foreach ( $payment_method as $payment ) {
if ( $this->acting_flg_mobile === $payment['settlement'] && 'activate' === $payment['use'] ) {
$method = true;
break;
}
}
if ( $method && $this->is_activate_mobile() ) {
return true;
} else {
return false;
}
break;
case 'paypay':
foreach ( $payment_method as $payment ) {
if ( $this->acting_flg_paypay === $payment['settlement'] && 'activate' === $payment['use'] ) {
$method = true;
break;
}
}
if ( $method && $this->is_activate_paypay() ) {
return true;
} else {
return false;
}
break;
default:
if ( isset( $acting_opts['activate'] ) && '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'] || 'token' === $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;
}
/**
* ペイジー決済有効判定
*
* @return boolean
*/
public function is_activate_payeasy() {
$acting_opts = $this->get_acting_settings();
if ( ( isset( $acting_opts['activate'] ) && 'on' === $acting_opts['activate'] ) &&
( isset( $acting_opts['payeasy_activate'] ) && 'on' === $acting_opts['payeasy_activate'] ) ) {
$res = true;
} else {
$res = false;
}
return $res;
}
/**
* ウォレット決済有効判定
*
* @return boolean
*/
public function is_activate_wallet() {
$acting_opts = $this->get_acting_settings();
if ( ( isset( $acting_opts['activate'] ) && 'on' === $acting_opts['activate'] ) &&
( isset( $acting_opts['wallet_activate'] ) && 'on' === $acting_opts['wallet_activate'] ) ) {
$res = true;
} else {
$res = false;
}
return $res;
}
/**
* キャリア決済有効判定
*
* @return boolean
*/
public function is_activate_mobile() {
$acting_opts = $this->get_acting_settings();
if ( ( isset( $acting_opts['activate'] ) && 'on' === $acting_opts['activate'] ) &&
( isset( $acting_opts['mobile_activate'] ) && 'on' === $acting_opts['mobile_activate'] ) ) {
$res = true;
} else {
$res = false;
}
return $res;
}
/**
* PayPay オンライン決済有効判定
*
* @return boolean
*/
public function is_activate_paypay() {
$acting_opts = $this->get_acting_settings();
if ( ( isset( $acting_opts['activate'] ) && 'on' === $acting_opts['activate'] ) &&
( isset( $acting_opts['paypay_activate'] ) && 'on' === $acting_opts['paypay_activate'] ) ) {
$res = true;
} else {
$res = false;
}
return $res;
}
/**
* 決済オプション取得
*
* @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;
}
/**
* 動作環境ごとの接続先取得
*
* @return array
*/
protected function get_connection() {
$connection = array();
$acting_opts = $this->get_acting_settings();
if ( 'public' === $acting_opts['ope'] ) {
$connection['send_url'] = ( isset( $acting_opts['send_url'] ) ) ? $acting_opts['send_url'] : '';
$connection['token_url'] = ( isset( $acting_opts['token_url'] ) ) ? $acting_opts['token_url'] : '';
$connection['api_url'] = ( isset( $acting_opts['api_url'] ) ) ? $acting_opts['api_url'] : '';
$connection['cust_url'] = ( isset( $acting_opts['cust_url'] ) ) ? $acting_opts['cust_url'] : '';
} elseif ( 'test' === $acting_opts['ope'] ) {
$connection['send_url'] = ( isset( $acting_opts['send_url_test'] ) ) ? $acting_opts['send_url_test'] : '';
$connection['token_url'] = ( isset( $acting_opts['token_url_test'] ) ) ? $acting_opts['token_url_test'] : '';
$connection['api_url'] = ( isset( $acting_opts['api_url_test'] ) ) ? $acting_opts['api_url_test'] : '';
$connection['cust_url'] = ( isset( $acting_opts['cust_url_test'] ) ) ? $acting_opts['cust_url_test'] : '';
} else {
$connection['send_url'] = ( isset( $acting_opts['send_url_check'] ) ) ? $acting_opts['send_url_check'] : '';
$connection['token_url'] = ( isset( $acting_opts['token_url_test'] ) ) ? $acting_opts['token_url_test'] : '';
$connection['api_url'] = ( isset( $acting_opts['api_url_test'] ) ) ? $acting_opts['api_url_test'] : '';
$connection['cust_url'] = ( isset( $acting_opts['cust_url_test'] ) ) ? $acting_opts['cust_url_test'] : '';
}
return $connection;
}
/**
* 未入金ステータス
* usces_filter_noreceipt_status
*
* @param array $noreceipt_status Receive payment notification.
* @return array
*/
public function noreceipt_status( $noreceipt_status ) {
if ( ! in_array( 'acting_' . $this->paymod_id . '_conv', $noreceipt_status ) || ! in_array( 'acting_' . $this->paymod_id . '_payeasy', $noreceipt_status ) ) {
$noreceipt_status[] = 'acting_' . $this->paymod_id . '_conv';
$noreceipt_status[] = 'acting_' . $this->paymod_id . '_payeasy';
update_option( 'usces_noreceipt_status', $noreceipt_status );
}
return $noreceipt_status;
}
/**
* 決済オプション登録・更新
* usces_action_admin_settlement_update
*/
public function settlement_update() {
}
/**
* クレジット決済設定画面タブ
* usces_action_settlement_tab_title
*/
public function settlement_tab_title() {
$settlement_selected = get_option( 'usces_settlement_selected', array() );
if ( in_array( $this->paymod_id, (array) $settlement_selected ) ) {
echo '
' . esc_html( $this->acting_formal_name ) . '';
}
}
/**
* クレジット決済設定画面フォーム
* usces_action_settlement_tab_body
*/
public function settlement_tab_body() {
}
/**
* 結果通知前処理
* usces_construct
*/
public function acting_construct() {
if ( isset( $_POST['res_result'] ) && isset( $_POST['res_pay_method'] ) && isset( $_POST['order_id'] ) ) {
$post_data = wp_unslash( $_POST );
$rand = $post_data['order_id'];
$acting_flg = ( isset( $post_data['free1'] ) ) ? $post_data['free1'] : '';
if ( in_array( $acting_flg, $this->pay_method ) ) {
usces_restore_order_acting_data( $rand );
}
// usces_log( $this->acting_name . ' construct : ' . $rand, 'acting_transaction.log' );
}
}
/**
* 結果通知処理
* usces_after_cart_instant
*/
public function acting_transaction() {
global $usces;
if ( ! isset( $_GET['acting_return'] ) && isset( $_POST['res_result'] ) && isset( $_POST['res_pay_method'] ) ) {
$post_data = wp_unslash( $_POST );
foreach ( $post_data as $key => $value ) {
$data[ $key ] = mb_convert_encoding( $value, 'UTF-8', 'SJIS' );
}
$acting_flg = ( isset( $data['free1'] ) ) ? $data['free1'] : '';
/* マイページからの会員登録・会員変更 */
if ( $acting_flg === $this->acting_flg_card && isset( $_GET['acting'] ) ) {
return;
} elseif ( $acting_flg === $this->acting_flg_card && ! isset( $data['res_tracking_id'] ) ) {
if ( 'OK' === $data['res_result'] ) {
die( 'OK,' );
} else {
die( 'NG,card update error' );
}
}
$acting = substr( $acting_flg, 7 );
$_GET['acting'] = $acting;
switch ( $data['res_result'] ) {
case 'OK': /* 決済処理OK */
$order_id = $this->get_order_id( $data['res_tracking_id'] );
if ( ! $order_id ) {
$res = $usces->order_processing( $data );
if ( 'ordercompletion' === $res ) {
// $usces->set_order_meta_value( 'wc_trans_id', $data['res_tracking_id'], $order_id );
} else {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' order processing error : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,order processing error' );
}
}
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [OK] transaction : ' . $data['res_tracking_id'], 'acting_transaction.log' );
die( 'OK,' );
break;
case 'PY': /* 入金結果通知 */
$order_id = $this->get_order_id( $data['res_tracking_id'] );
if ( ! $order_id ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [PY] error1 : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,order_id error' );
}
$order_status = $this->get_order_status( $order_id );
if ( $usces->is_status( 'receipted', $order_status ) ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [PY] second transaction : ' . $order_id, 'acting_transaction.log' );
die( 'OK,' );
}
$res = usces_change_order_receipt( $order_id, 'receipted' );
if ( false === $res ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [PY] error2 : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,usces_order update error' );
}
$res = $usces->set_order_meta_value( $acting_flg, serialize( $data ), $order_id );
if ( false === $res ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [PY] error3 : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,usces_order_meta update error' );
}
usces_action_acting_getpoint( $order_id );
do_action( 'usces_action_' . $this->paymod_id . '_payment_completion', $data, $order_id );
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [PY] transaction : ' . $order_id, 'acting_transaction.log' );
die( 'OK,' );
break;
case 'CN': /* 期限切通知 */
$order_id = $this->get_order_id( $data['res_tracking_id'] );
if ( ! $order_id ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [CN] error1 : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,order_id error' );
}
$res = usces_change_order_receipt( $order_id, 'noreceipt' );
if ( false === $res ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [CN] error2 : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,usces_order update error' );
}
$res = $usces->set_order_meta_value( $acting_flg, serialize( $data ), $order_id );
if ( false === $res ) {
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [CN] error3 : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'NG,usces_order_meta update error' );
}
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [CN] transaction : ' . $order_id, 'acting_transaction.log' );
die( 'OK,' );
break;
case 'NG': /* 要求NG */
$log = array(
'acting' => $acting,
'key' => $data['res_tracking_id'],
'result' => $data['res_result'],
'data' => $data,
);
usces_save_order_acting_error( $log );
die( 'NG,' );
break;
default:
if ( empty( $data['res_result'] ) ) {
return;
}
// usces_log( $this->acting_name . ' ' . $data['res_pay_method'] . ' [' . $data['res_result'] . '] : ' . print_r( $data, true ), 'acting_transaction.log' );
die( 'OK,' );
}
}
}
/**
* 管理画面送信メール
* 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 ) {
return $msg_payment;
}
/**
* ポイント即時付与
* usces_filter_is_complete_settlement
*
* @param boolean $complete Payment completion flag.
* @param string $payment_name Payment name.
* @param string $status Status.
* @return boolean
*/
public function is_complete_settlement( $complete, $payment_name, $status ) {
$payment = usces_get_payments_by_name( $payment_name );
if ( $this->acting_flg_card === $payment['settlement'] || $this->acting_flg_wallet === $payment['settlement'] || $this->acting_flg_mobile === $payment['settlement'] || $this->acting_flg_paypay === $payment['settlement'] ) {
$complete = true;
}
return $complete;
}
/**
* 決済リンクキー
* usces_filter_get_link_key
*
* @param string $linkkey Settlement link key.
* @param array $results Response data.
* @return string
*/
public function get_link_key( $linkkey, $results ) {
if ( isset( $_REQUEST['res_tracking_id'] ) ) {
$linkkey = wp_unslash( $_REQUEST['res_tracking_id'] );
}
return $linkkey;
}
/**
* 受注データ復旧処理
* usces_action_revival_order_data
*
* @param int $order_id Order number.
* @param string $log_key Link key.
* @param string $acting_flg Payment type.
*/
public function revival_orderdata( $order_id, $log_key, $acting_flg ) {
global $usces;
if ( ! in_array( $acting_flg, $this->pay_method ) ) {
return;
}
$data = array();
$data['LINK_KEY'] = $log_key;
$usces->set_order_meta_value( $acting_flg, serialize( $data ), $order_id );
$usces->set_order_meta_value( 'res_tracking_id', $log_key, $order_id );
}
/**
* 受注データから取得する決済情報のキー
* usces_filter_settle_info_field_meta_keys
*
* @param array $keys Settlement information key.
* @return array
*/
public function settlement_info_field_meta_keys( $keys ) {
$keys = array_merge( $keys, array( 'acting', 'trans_id' ) );
return $keys;
}
/**
* 受注編集画面に表示する決済情報のキー
* usces_filter_settle_info_field_keys
*
* @param array $keys Settlement information keys.
* @param array $fields Settlement information fields.
* @return array
*/
public function settlement_info_field_keys( $keys, $fields ) {
if ( isset( $fields['acting'] ) && isset( $fields['res_tracking_id'] ) ) {
switch ( $fields['acting'] ) {
case $this->acting_card:
case $this->acting_conv:
case $this->acting_payeasy:
case $this->acting_wallet:
case $this->acting_mobile:
case $this->acting_paypay:
$keys = array( 'acting', 'res_tracking_id', 'trans_id' );
break;
}
}
return $keys;
}
/**
* 受注編集画面に表示する決済情報の値整形
* usces_filter_settle_info_field_value
*
* @param string $value Value.
* @param string $key Key.
* @param string $acting Acting type.
* @return string
*/
public function settlement_info_field_value( $value, $key, $acting ) {
if ( 'acting' === $key ) {
if ( $this->acting_card === $value ) {
$value = $this->acting_name . ' カード決済';
} elseif ( $this->acting_conv === $value ) {
$value = $this->acting_name . ' コンビニ決済';
} elseif ( $this->acting_payeasy === $value ) {
$value = $this->acting_name . ' ペイジー決済';
} elseif ( $this->acting_wallet === $value ) {
$value = $this->acting_name . ' ウォレット決済';
} elseif ( $this->acting_mobile === $value ) {
$value = $this->acting_name . ' キャリア決済';
} elseif ( $this->acting_paypay === $value ) {
$value = $this->acting_name . ' PayPay オンライン決済';
}
}
return $value;
}
/**
* 支払方法説明
* usces_filter_payment_detail
*
* @param string $str Payment method description.
* @param array $usces_entries Entry data.
* @return string
*/
public function payment_detail( $str, $usces_entries ) {
$payment = usces_get_payments_by_name( $usces_entries['order']['payment_name'] );
if ( isset( $payment['settlement'] ) && $this->acting_flg_conv === $payment['settlement'] ) {
$acting_opts = $this->get_acting_settings();
if ( ! empty( $acting_opts['conv_limit'] ) ) {
$payment_detail = __( '(', 'usces' ) . sprintf( __( 'Payment is valid for %s days from the date of order.', 'usces' ), $acting_opts['conv_limit'] ) . __( ')', 'usces' );
$str = apply_filters( 'usces_filter_sbps_payment_limit_conv', $payment_detail, $acting_opts['conv_limit'] );
}
}
return $str;
}
/**
* 支払方法 JavaScript 用決済名追加
* usces_filter_payments_str
*
* @param string $payments_str Payments.
* @param array $payment Selected payment.
* @return string
*/
public function payments_str( $payments_str, $payment ) {
if ( $this->acting_flg_card === $payment['settlement'] ) {
if ( $this->is_activate_card() ) {
$payments_str .= "'" . $payment['name'] . "': '" . $this->paymod_id . "_form', ";
}
}
return $payments_str;
}
/**
* 支払方法 JavaScript 用決済追加
* usces_filter_payments_arr
*
* @param array $payments_arr Payments.
* @param array $payment Selected payment.
* @return array
*/
public function payments_arr( $payments_arr, $payment ) {
if ( $this->acting_flg_card === $payment['settlement'] ) {
if ( $this->is_activate_card() ) {
$payments_arr[] = $this->paymod_id . '_form';
}
}
return $payments_arr;
}
/**
* 内容確認ページ [注文する] ボタン
* usces_filter_confirm_inform
*
* @param string $html Purchase post form.
* @param array $payments Payment method info.
* @param string $acting_flg Payment type.
* @param string $rand Welcart transaction key.
* @param string $purchase_disabled Disable purchase button.
* @return string
*/
public function confirm_inform( $html, $payments, $acting_flg, $rand, $purchase_disabled ) {
global $usces;
if ( ! in_array( $acting_flg, $this->pay_method ) ) {
return $html;
}
$usces_entries = $usces->cart->get_entry();
$cart = $usces->cart->get_cart();
if ( ! $usces_entries || ! $cart ) {
return $html;
}
if ( ! $usces_entries['order']['total_full_price'] ) {
return $html;
}
$cart_count = ( $cart && is_array( $cart ) ) ? count( $cart ) : 0;
$acting_opts = $this->get_acting_settings();
$usces->save_order_acting_data( $rand );
usces_save_order_acting_data( $rand );
$member = $usces->get_member();
$cust_code = ( empty( $member['ID'] ) ) ? str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ) : $member['ID'];
// $item_id = $cart[0]['post_id'];
$item_id = mb_convert_kana( $usces->getItemCode( $cart[0]['post_id'] ), 'a', 'UTF-8' );
$item_name = $usces->getItemName( $cart[0]['post_id'] );
if ( 1 < $cart_count ) {
$item_name .= ' ' . __( 'Others', 'usces' );
}
if ( 36 < mb_strlen( $item_name, 'UTF-8' ) ) {
$item_name = mb_substr( $item_name, 0, 30, 'UTF-8' ) . '...';
}
$item_name = esc_attr( $item_name );
$amount = usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false );
$free1 = $acting_flg;
$limit_second = '600';
if ( $this->acting_flg_card === $acting_flg && isset( $acting_opts['card_activate'] ) && 'token' === $acting_opts['card_activate'] ) {
$cust_quick = ( isset( $_POST['cust_quick'] ) ) ? $_POST['cust_quick'] : 'off';
$cust_manage = ( isset( $_POST['cust_manage'] ) ) ? $_POST['cust_manage'] : 'off';
$token = ( isset( $_POST['token'] ) ) ? $_POST['token'] : '';
$token_key = ( isset( $_POST['tokenKey'] ) ) ? $_POST['tokenKey'] : '';
$html = '';
$html .= '