| @@ -1,887 +1,674 @@ | ||
| 1 | -<?php | |
| 2 | -if(isset($this)) | |
| 3 | - $usces = &$this; | |
| 4 | - | |
| 5 | -$payments = usces_get_payments_by_name($usces_entries['order']['payment_name']); | |
| 6 | -$acting_flag = ''; | |
| 7 | -$rand = sprintf('%010d', mt_rand(1, 9999999999)); | |
| 8 | -$cart = $usces->cart->get_cart(); | |
| 9 | - | |
| 10 | -//20120914ysk start 0000566 | |
| 11 | -$purchase_disabled = ( '' != $usces->error_message ) ? ' disabled="true"' : ''; | |
| 12 | -//20120914ysk end | |
| 13 | -if( 'acting' != substr($payments['settlement'], 0, 6) || 0 == $usces_entries['order']['total_full_price'] ){ | |
| 14 | - $html .= '<form id="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 15 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.apply_filters('usces_filter_confirm_prebutton_value', __('Back to payment method page.', 'usces')).'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /> | |
| 16 | - <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', NULL) . $purchase_disabled . ' /></div>'; | |
| 17 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 18 | - $html .= '</form>'; | |
| 19 | -}else{ | |
| 20 | - $send_item_code = apply_filters('usces_filter_settlement_item_code', $usces->getItemCode($cart[0]['post_id'])); | |
| 21 | - $send_item_name = apply_filters('usces_filter_settlement_item_name', $usces->getItemName($cart[0]['post_id'])); | |
| 22 | - | |
| 23 | - $scheme = ( $usces->use_ssl ) ? 'https://' : 'http://'; | |
| 24 | - | |
| 25 | - $acting_flag = ( 'acting' == $payments['settlement'] ) ? $payments['module'] : $payments['settlement']; | |
| 26 | - switch( $acting_flag ){ | |
| 27 | - | |
| 28 | - case 'paypal.php': | |
| 29 | - require_once($usces->options['settlement_path'] . "paypal.php"); | |
| 30 | -//20110208ysk start | |
| 31 | - $lc = ( isset($usces->options['system']['currency']) && !empty($usces->options['system']['currency']) ) ? $usces->options['system']['currency'] : ''; | |
| 32 | - $currency_code = $usces->get_currency_code(); | |
| 33 | - global $usces_settings; | |
| 34 | - $country_num = $usces_settings['country_num'][$lc]; | |
| 35 | - $tel = ltrim(str_replace('-', '', $usces_entries['customer']['tel']), '0'); | |
| 36 | - $html .= '<form id="purchase_form" action="https://' . $usces_paypal_url . '/cgi-bin/webscr" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 37 | - <input type="hidden" name="cmd" value="_xclick"> | |
| 38 | - <input type="hidden" name="business" value="' . $usces_paypal_business . '"> | |
| 39 | - <input type="hidden" name="custom" value="' . $usces->get_uscesid(false) . '"> | |
| 40 | - <input type="hidden" name="lc" value="'.$lc.'"> | |
| 41 | - <input type="hidden" name="charset" value="UTF-8"> | |
| 42 | - <input type="hidden" name="first_name" value="'.esc_html($usces_entries['customer']['name2']).'"> | |
| 43 | - <input type="hidden" name="last_name" value="'.esc_html($usces_entries['customer']['name1']).'"> | |
| 44 | - <input type="hidden" name="address1" value="'.esc_html($usces_entries['customer']['address2']).'"> | |
| 45 | - <input type="hidden" name="address2" value="'.esc_html($usces_entries['customer']['address3']).'"> | |
| 46 | - <input type="hidden" name="city" value="'.esc_html($usces_entries['customer']['address1']).'"> | |
| 47 | - <input type="hidden" name="state" value="'.esc_html($usces_entries['customer']['pref']).'"> | |
| 48 | - <input type="hidden" name="zip" value="'.esc_html($usces_entries['customer']['zipcode']).'"> | |
| 49 | - <input type="hidden" name="night_phone_a" value="'.$country_num.'"> | |
| 50 | - <input type="hidden" name="night_phone_b" value="'.$tel.'"> | |
| 51 | - <input type="hidden" name="night_phone_c" value="">'; | |
| 52 | -//20110208ysk end | |
| 53 | - if( 1 < count($cart) ) { | |
| 54 | - $html .= '<input type="hidden" name="item_name" value="' . esc_attr($send_item_name) . ' ' . __('Others', 'usces') . '">'; | |
| 55 | - }else{ | |
| 56 | - $html .= '<input type="hidden" name="item_name" value="' . esc_attr($send_item_name) . '">'; | |
| 57 | - } | |
| 58 | - $html .= '<input type="hidden" name="item_number" value=""> | |
| 59 | - <input type="hidden" name="amount" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '">'; | |
| 60 | -//20110208ysk start | |
| 61 | - //if( USCES_JP ){ | |
| 62 | - //$html .= '<input type="hidden" name="currency_code" value="JPY">'; | |
| 63 | - $html .= '<input type="hidden" name="currency_code" value="'.$currency_code.'">'; | |
| 64 | - //} | |
| 65 | - $html .= '<input type="hidden" name="no_note" value="1">'; | |
| 66 | -//20110208ysk end | |
| 67 | - $html .= '<input type="hidden" name="return" value="' . apply_filters('usces_paypal_return_url', (USCES_CART_URL . $usces->delim . 'acting=paypal&acting_return=1') ) . '"> | |
| 68 | - <input type="hidden" name="cancel_return" value="' . USCES_CART_URL . $usces->delim . 'confirm=1"> | |
| 69 | - <input type="hidden" name="notify_url" value="' . USCES_PAYPAL_NOTIFY_URL . '"> | |
| 70 | - <input type="hidden" name="button_subtype" value="products"> | |
| 71 | - <input type="hidden" name="tax_rate" value="0.000"> | |
| 72 | - <input type="hidden" name="shipping" value="0"> | |
| 73 | - <input type="hidden" name="bn" value="uscons_cart_WPS_JP"> | |
| 74 | - <div class="send"><input type="image" src="https://www.paypal.com/' . ( USCES_JP ? 'ja_JP/JP' : 'en_US' ) . '/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal"' . apply_filters('usces_filter_confirm_nextbutton', NULL) . $purchase_disabled . ' /> | |
| 75 | - <img alt="" border="0" src="https://www.paypal.com/' . ( USCES_JP ? 'ja_JP' : 'en_US' ) . '/i/scr/pixel.gif" width="1" height="1"></div>'; | |
| 76 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 77 | - $html .= '</form>'; | |
| 78 | - $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 79 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /></div>'; | |
| 80 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 81 | - $html .= '</form>'; | |
| 82 | - break; | |
| 83 | - | |
| 84 | - case 'epsilon.php': | |
| 85 | - $member = $usces->get_member(); | |
| 86 | - $memid = empty($member['ID']) ? 99999999 : $member['ID']; | |
| 87 | - $html .= '<form id="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 88 | - <input type="hidden" name="user_id" value="' . $memid . '"> | |
| 89 | - <input type="hidden" name="user_name" value="' . esc_attr($usces_entries['customer']['name1'] . ' ' . $usces_entries['customer']['name2']) . '"> | |
| 90 | - <input type="hidden" name="user_mail_add" value="' . esc_attr($usces_entries['customer']['mailaddress1']) . '">'; | |
| 91 | - if( 1 < count($cart) ) { | |
| 92 | - $html .= '<input type="hidden" name="item_code" value="99999999"> | |
| 93 | - <input type="hidden" name="item_name" value="' . esc_attr(mb_substr($send_item_name, 0, 25, 'UTF-8')) . ' ' . __('Others', 'usces') . '">'; | |
| 94 | - }else{ | |
| 95 | - $html .= '<input type="hidden" name="item_code" value="' . esc_attr($send_item_code) . '"> | |
| 96 | - <input type="hidden" name="item_name" value="' . esc_attr(mb_substr($send_item_name, 0, 32, 'UTF-8')) . '">'; | |
| 97 | - } | |
| 98 | - $html .= '<input type="hidden" name="item_price" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '"> | |
| 99 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /> | |
| 100 | - <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', NULL) . $purchase_disabled . ' /></div>'; | |
| 101 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 102 | - $html .= '</form>'; | |
| 103 | - break; | |
| 104 | - | |
| 105 | - case 'acting_zeus_card': | |
| 106 | - $acting_opts = $usces->options['acting_settings']['zeus']; | |
| 107 | - $usces->save_order_acting_data($rand); | |
| 108 | - $html .= '<form id="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}">'; | |
| 109 | - $member = $usces->get_member(); | |
| 110 | - $pcid = $usces->get_member_meta_value('zeus_pcid', $member['ID']); | |
| 111 | - $securecode = isset($_POST['securecode']) ? $_POST['securecode'] : ''; | |
| 112 | - if( 2 == $acting_opts['security'] && 'on' == $acting_opts['quickcharge'] && $pcid == '8888888888888888' && $usces->is_member_logged_in() ){ | |
| 113 | - $html .= '<input type="hidden" name="cardnumber" value="8888888888888888">'; | |
| 114 | - //$html .= '<input type="hidden" name="securecode" value="' . esc_attr($_POST['securecode']) . '">';//20121119ysk 0000620 | |
| 115 | - $html .= '<input type="hidden" name="securecode" value="' . esc_attr($securecode) . '">'; | |
| 116 | - $html .= '<input type="hidden" name="expyy" value="' . esc_attr($_POST['expyy']) . '"> | |
| 117 | - <input type="hidden" name="expmm" value="' . esc_attr($_POST['expmm']) . '">'; | |
| 118 | - }else{ | |
| 119 | - $html .= '<input type="hidden" name="cardnumber" value="' . esc_attr($_POST['cnum1']) . '">'; | |
| 120 | - if( 1 == $acting_opts['security'] ){ | |
| 121 | - $html .= '<input type="hidden" name="securecode" value="' . esc_attr($securecode) . '">'; | |
| 122 | - } | |
| 123 | - $html .= '<input type="hidden" name="expyy" value="' . esc_attr($_POST['expyy']) . '"> | |
| 124 | - <input type="hidden" name="expmm" value="' . esc_attr($_POST['expmm']) . '">'; | |
| 125 | - } | |
| 126 | - $html .= '<input type="hidden" name="telno" value="' . esc_attr(str_replace('-', '', $usces_entries['customer']['tel'])) . '"> | |
| 127 | - <input type="hidden" name="email" value="' . esc_attr($usces_entries['customer']['mailaddress1']) . '"> | |
| 128 | - <input type="hidden" name="sendid" value="' . $member['ID'] . '"> | |
| 129 | - <input type="hidden" name="username" value="' . esc_attr($_POST['username']) . '"> | |
| 130 | - <input type="hidden" name="money" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '"> | |
| 131 | - <input type="hidden" name="sendpoint" value="' . $rand . '"> | |
| 132 | - <input type="hidden" name="printord" value="yes">'; | |
| 133 | - if( isset($_POST['cbrand']) && isset($_POST['howpay']) && WCUtils::is_zero($_POST['howpay']) ){ | |
| 134 | - $html .= '<input type="hidden" name="howpay" value="' . $_POST['howpay'] . '">'; | |
| 135 | - $html .= '<input type="hidden" name="cbrand" value="' . $_POST['cbrand'] . '">'; | |
| 136 | - $div_name = 'div_' . $_POST['cbrand']; | |
| 137 | - $html .= '<input type="hidden" name="div" value="' . $_POST[$div_name] . '">'; | |
| 138 | - $html .= '<input type="hidden" name="div_1" value="' . $_POST['div_1'] . '">'; | |
| 139 | - $html .= '<input type="hidden" name="div_2" value="' . $_POST['div_2'] . '">'; | |
| 140 | - $html .= '<input type="hidden" name="div_3" value="' . $_POST['div_3'] . '">'; | |
| 141 | - } | |
| 142 | - $html .= ' | |
| 143 | - <input type="hidden" name="cnum1" value="' . esc_html($_POST['cnum1']) . '"> | |
| 144 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /> | |
| 145 | - <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', NULL) . $purchase_disabled . ' /></div>'; | |
| 146 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 147 | - $html .= '</form>'; | |
| 148 | - break; | |
| 149 | - | |
| 150 | - case 'acting_zeus_conv': | |
| 151 | - $member = $usces->get_member(); | |
| 152 | - $acting_opts = $usces->options['acting_settings']['zeus']; | |
| 153 | - $usces->save_order_acting_data($rand); | |
| 154 | - $html .= '<form id="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}">'; | |
| 155 | - $html .= ' | |
| 156 | - <input type="hidden" name="act" value="secure_order"> | |
| 157 | - <input type="hidden" name="money" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '"> | |
| 158 | - <input type="hidden" name="username" value="' . esc_attr(trim($usces_entries['customer']['name3']) . trim($usces_entries['customer']['name4'])) . '"> | |
| 159 | - <input type="hidden" name="telno" value="' . esc_attr(str_replace('-', '', $usces_entries['customer']['tel'])) . '"> | |
| 160 | - <input type="hidden" name="email" value="' . esc_attr($usces_entries['customer']['mailaddress1']) . '"> | |
| 161 | - <input type="hidden" name="pay_cvs" value="' . $_POST['pay_cvs'] . '"> | |
| 162 | - <input type="hidden" name="sendid" value="' . $member['ID'] . '"> | |
| 163 | - <input type="hidden" name="sendpoint" value="' . $rand . '">'; | |
| 164 | - if( '' != $acting_opts['testid_conv'] ){ | |
| 165 | - $html .= '<input type="hidden" name="testid" value="' . $acting_opts['testid_conv'] . '">'; | |
| 166 | - $html .= '<input type="hidden" name="test_type" value="' . $acting_opts['test_type_conv'] . '">'; | |
| 167 | - } | |
| 168 | - $html .= ' | |
| 169 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /> | |
| 170 | - <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', NULL) . $purchase_disabled . ' /></div>'; | |
| 171 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 172 | - $html .= '</form>'; | |
| 173 | - break; | |
| 174 | - | |
| 175 | - case 'acting_zeus_bank': | |
| 176 | - $member = $usces->get_member(); | |
| 177 | - $acting_opts = $usces->options['acting_settings']['zeus']; | |
| 178 | - $usces->save_order_acting_data($rand); | |
| 179 | - $html .= '<form id="purchase_form" action="' . $acting_opts['bank_url'] . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS">'; | |
| 180 | - $html .= ' | |
| 181 | - <input type="hidden" name="clientip" value="' . esc_attr($acting_opts['clientip_bank']) . '"> | |
| 182 | - <input type="hidden" name="act" value="order"> | |
| 183 | - <input type="hidden" name="money" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '">'; | |
| 184 | - if( '' != $acting_opts['testid_bank'] ){ | |
| 185 | - $html .= '<input type="hidden" name="username" value="' . esc_attr(trim($usces_entries['customer']['name3']) . trim($usces_entries['customer']['name4']) . '_' . $acting_opts['testid_bank']) . '">'; | |
| 186 | - $html .= '<input type="hidden" name="telno" value="99999999999">'; | |
| 187 | - }else{ | |
| 188 | - $html .= '<input type="hidden" name="username" value="' . esc_attr(trim($usces_entries['customer']['name3']) . trim($usces_entries['customer']['name4'])) . '">'; | |
| 189 | - $html .= '<input type="hidden" name="telno" value="' . esc_attr(str_replace('-', '', $usces_entries['customer']['tel'])) . '">'; | |
| 190 | - } | |
| 191 | - $html .= '<input type="hidden" name="email" value="' . esc_attr($usces_entries['customer']['mailaddress1']) . '"> | |
| 192 | - <input type="hidden" name="sendid" value="' . $member['ID'] . '"> | |
| 193 | - <input type="hidden" name="sendpoint" value="' . $rand . '"> | |
| 194 | - <input type="hidden" name="siteurl" value="' . get_option('home') . '"> | |
| 195 | - <input type="hidden" name="sitestr" value="「' . esc_attr(get_option('blogname')) . '」トップページへ"> | |
| 196 | - '; | |
| 197 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 198 | - $onclick = ' onClick="document.charset=\'Shift_JIS\';"'; | |
| 199 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', $onclick) . $purchase_disabled . ' /></div>'; | |
| 200 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 201 | - $html .= '</form>'; | |
| 202 | - $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 203 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /></div>'; | |
| 204 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 205 | - $html .= '</form>'."\n"; | |
| 206 | - break; | |
| 207 | - | |
| 208 | - case 'acting_remise_card': | |
| 209 | - $charging_type = $usces->getItemChargingType($cart[0]['post_id'], $cart); | |
| 210 | - $frequency = $usces->getItemFrequency($cart[0]['post_id']); | |
| 211 | - $chargingday = $usces->getItemChargingDay($cart[0]['post_id']); | |
| 212 | - $acting_opts = $usces->options['acting_settings']['remise']; | |
| 213 | - $usces->save_order_acting_data($rand); | |
| 214 | - $member = $usces->get_member(); | |
| 215 | - $send_url = ('public' == $acting_opts['card_pc_ope']) ? $acting_opts['send_url_pc'] : $acting_opts['send_url_pc_test']; | |
| 216 | - $html .= '<form id="purchase_form" name="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 217 | - <input type="hidden" name="SHOPCO" value="' . esc_attr($acting_opts['SHOPCO']) . '" /> | |
| 218 | - <input type="hidden" name="HOSTID" value="' . esc_attr($acting_opts['HOSTID']) . '" /> | |
| 219 | - <input type="hidden" name="REMARKS3" value="' . $acting_opts['REMARKS3'] . '" /> | |
| 220 | - <input type="hidden" name="S_TORIHIKI_NO" value="' . $rand . '" /> | |
| 221 | - <input type="hidden" name="JOB" value="' . apply_filters('usces_filter_remise_card_job', $acting_opts['card_jb']) . '" /> | |
| 222 | - <input type="hidden" name="MAIL" value="' . esc_attr($usces_entries['customer']['mailaddress1']) . '" /> | |
| 223 | - <input type="hidden" name="ITEM" value="' . apply_filters('usces_filter_remise_card_item', '0000120') . '" /> | |
| 224 | - <input type="hidden" name="TOTAL" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '" /> | |
| 225 | - <input type="hidden" name="AMOUNT" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '" /> | |
| 226 | - <input type="hidden" name="RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_card&acting_return=1" /> | |
| 227 | - <input type="hidden" name="NG_RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_card&acting_return=0" /> | |
| 228 | - <input type="hidden" name="EXITURL" value="' . USCES_CART_URL . $usces->delim . 'confirm=1" /> | |
| 229 | - '; | |
| 230 | - if( 'on' == $acting_opts['payquick'] && $usces->is_member_logged_in() ){ | |
| 231 | - $pcid = $usces->get_member_meta_value('remise_pcid', $member['ID']); | |
| 232 | - $html .= '<input type="hidden" name="PAYQUICK" value="1">'; | |
| 233 | - if( $pcid != NULL ) | |
| 234 | - $html .= '<input type="hidden" name="PAYQUICKID" value="' . $pcid . '">'; | |
| 235 | - } | |
| 236 | - if( 'on' == $acting_opts['howpay'] && isset($_POST['div']) && '0' !== $_POST['div'] && 'continue' != $charging_type ){ | |
| 237 | - $html .= '<input type="hidden" name="div" value="' . $_POST['div'] . '">'; | |
| 238 | - switch( $_POST['div'] ){ | |
| 239 | - case '1': | |
| 240 | - $html .= '<input type="hidden" name="METHOD" value="61">'; | |
| 241 | - $html .= '<input type="hidden" name="PTIMES" value="2">'; | |
| 242 | - break; | |
| 243 | - case '2': | |
| 244 | - $html .= '<input type="hidden" name="METHOD" value="80">'; | |
| 245 | - break; | |
| 246 | - } | |
| 247 | - }else{ | |
| 248 | - $html .= '<input type="hidden" name="div" value="0">'; | |
| 249 | - $html .= '<input type="hidden" name="METHOD" value="10">'; | |
| 250 | - } | |
| 251 | - if( 'continue' == $charging_type ){ | |
| 252 | - $nextdate = current_time('mysql'); | |
| 253 | - $html .= '<input type="hidden" name="AUTOCHARGE" value="1">'; | |
| 254 | - $html .= '<input type="hidden" name="AC_S_KAIIN_NO" value="' . $member['ID'] . '">'; | |
| 255 | - $html .= '<input type="hidden" name="AC_NAME" value="' . esc_attr($usces_entries['customer']['name1'].$usces_entries['customer']['name2']) . '">'; | |
| 256 | - $html .= '<input type="hidden" name="AC_KANA" value="' . esc_attr($usces_entries['customer']['name3'].$usces_entries['customer']['name4']) . '">'; | |
| 257 | - $html .= '<input type="hidden" name="AC_TEL" value="' . esc_attr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8'))) . '">'; | |
| 258 | - $html .= '<input type="hidden" name="AC_AMOUNT" value="' . $usces_entries['order']['total_full_price'] . '">'; | |
| 259 | - $html .= '<input type="hidden" name="AC_TOTAL" value="' . $usces_entries['order']['total_full_price'] . '">'; | |
| 260 | - $html .= '<input type="hidden" name="AC_NEXT_DATE" value="' . date('Ymd', dlseller_first_charging($cart[0]['post_id'], 'time')) . '">'; | |
| 261 | - $html .= '<input type="hidden" name="AC_INTERVAL" value="' . $frequency . 'M">'; | |
| 262 | - } | |
| 263 | - | |
| 264 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 265 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"') . $purchase_disabled . ' /></div>'; | |
| 266 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 267 | - $html .= '</form>'; | |
| 268 | - $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 269 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /></div>'; | |
| 270 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 271 | - $html .= '</form>'."\n"; | |
| 272 | - break; | |
| 273 | - | |
| 274 | - case 'acting_remise_conv': | |
| 275 | - if( function_exists('mb_strlen') ){ | |
| 276 | - $biko = ( 22 < mb_strlen($usces_entries['order']['note'])) ? (mb_substr($usces_entries['order']['note'], 0, 22).'...') : $usces_entries['order']['note']; | |
| 277 | - }else{ | |
| 278 | - $biko = ( 44 < strlen($usces_entries['order']['note'])) ? (substr($usces_entries['order']['note'], 0, 44).'...') : $usces_entries['order']['note']; | |
| 279 | - } | |
| 280 | - $datestr = get_date_from_gmt(gmdate('Y-m-d H:i:s', time())); | |
| 281 | - $acting_opts = $usces->options['acting_settings']['remise']; | |
| 282 | - $usces->save_order_acting_data($rand); | |
| 283 | - $send_url = ('public' == $acting_opts['conv_pc_ope']) ? $acting_opts['send_url_cvs_pc'] : $acting_opts['send_url_cvs_pc_test']; | |
| 284 | - $html .= '<form id="purchase_form" name="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 285 | - <input type="hidden" name="SHOPCO" value="' . esc_attr($acting_opts['SHOPCO']) . '" /> | |
| 286 | - <input type="hidden" name="HOSTID" value="' . esc_attr($acting_opts['HOSTID']) . '" /> | |
| 287 | - <input type="hidden" name="REMARKS3" value="' . $acting_opts['REMARKS3'] . '" /> | |
| 288 | - <input type="hidden" name="S_TORIHIKI_NO" value="' . $rand . '" /> | |
| 289 | - <input type="hidden" name="NAME1" value="' . esc_attr($usces_entries['customer']['name1']) . '" /> | |
| 290 | - <input type="hidden" name="NAME2" value="' . esc_attr($usces_entries['customer']['name2']) . '" /> | |
| 291 | - <input type="hidden" name="KANA1" value="' . esc_attr($usces_entries['customer']['name3']) . '" /> | |
| 292 | - <input type="hidden" name="KANA2" value="' . esc_attr($usces_entries['customer']['name4']) . '" /> | |
| 293 | - <input type="hidden" name="YUBIN1" value="' . esc_attr(substr(str_replace('-', '', $usces_entries['customer']['zipcode']), 0, 3)) . '" /> | |
| 294 | - <input type="hidden" name="YUBIN2" value="' . esc_attr(substr(str_replace('-', '', $usces_entries['customer']['zipcode']), 3, 4)) . '" /> | |
| 295 | - <input type="hidden" name="ADD1" value="' . esc_attr($usces_entries['customer']['pref'] . $usces_entries['customer']['address1']) . '" /> | |
| 296 | - <input type="hidden" name="ADD2" value="' . esc_attr($usces_entries['customer']['address2']) . '" /> | |
| 297 | - <input type="hidden" name="ADD3" value="' . esc_attr($usces_entries['customer']['address3']) . '" /> | |
| 298 | - <input type="hidden" name="TEL" value="' . esc_attr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8'))) . '" /> | |
| 299 | - <input type="hidden" name="MAIL" value="' . esc_attr($usces_entries['customer']['mailaddress1']) . '" /> | |
| 300 | - <input type="hidden" name="TOTAL" value="' . $usces_entries['order']['total_full_price'] . '" /> | |
| 301 | - <input type="hidden" name="TAX" value="" /> | |
| 302 | - <input type="hidden" name="S_PAYDATE" value="' . date('Ymd', mktime(0,0,0,substr($datestr, 5, 2),substr($datestr, 8, 2)+$acting_opts['S_PAYDATE'],substr($datestr, 0, 4))) . '" /> | |
| 303 | - <input type="hidden" name="SEIYAKUDATE" value="' . date('Ymd', mktime(0,0,0,substr($datestr, 5, 2),substr($datestr, 8, 2),substr($datestr, 0, 4))) . '" /> | |
| 304 | - <input type="hidden" name="BIKO" value="' . esc_html($biko) . '" /> | |
| 305 | - '; | |
| 306 | - $mname_01 = '商品総額'; | |
| 307 | - $html .= '<input type="hidden" name="MNAME_01" value="' . $mname_01 . '" /> | |
| 308 | - <input type="hidden" name="MSUM_01" value="' . usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false) . '" /> | |
| 309 | - <input type="hidden" name="MNAME_02" value="" /> | |
| 310 | - <input type="hidden" name="MSUM_02" value="0" /> | |
| 311 | - <input type="hidden" name="MNAME_03" value="" /> | |
| 312 | - <input type="hidden" name="MSUM_03" value="0" /> | |
| 313 | - <input type="hidden" name="MNAME_04" value="" /> | |
| 314 | - <input type="hidden" name="MSUM_04" value="0" /> | |
| 315 | - <input type="hidden" name="MNAME_05" value="" /> | |
| 316 | - <input type="hidden" name="MSUM_05" value="0" /> | |
| 317 | - <input type="hidden" name="MNAME_06" value="" /> | |
| 318 | - <input type="hidden" name="MSUM_06" value="0" /> | |
| 319 | - <input type="hidden" name="MNAME_07" value="" /> | |
| 320 | - <input type="hidden" name="MSUM_07" value="0" /> | |
| 321 | - '; | |
| 322 | - | |
| 323 | - $html .= '<input type="hidden" name="RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_conv&acting_return=1" /> | |
| 324 | - <input type="hidden" name="NG_RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_conv&acting_return=0" /> | |
| 325 | - <input type="hidden" name="OPT" value="1" /> | |
| 326 | - <input type="hidden" name="EXITURL" value="' . USCES_CART_URL . $usces->delim . 'confirm=1" /> | |
| 327 | - '; | |
| 328 | - $html .= ' | |
| 329 | - <input type="hidden" name="dummy" value="�" /> | |
| 330 | - <div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"' . apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"') . $purchase_disabled . ' /></div>'; | |
| 331 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 332 | - $html .= '</form>'; | |
| 333 | - $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 334 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /></div>'; | |
| 335 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 336 | - $html .= '</form>'."\n"; | |
| 337 | - break; | |
| 338 | - | |
| 339 | -//20101018ysk start | |
| 340 | - case 'acting_jpayment_card'://クレジット決済(J-Payment) | |
| 341 | - $acting_opts = $usces->options['acting_settings']['jpayment']; | |
| 342 | - $usces->save_order_acting_data($rand); | |
| 343 | -//20120823ysk start 0000547 | |
| 344 | - $itemName = $usces->getItemName($cart[0]['post_id']); | |
| 345 | - if(1 < count($cart)) $itemName .= ','.__('Others', 'usces'); | |
| 346 | - if(50 < mb_strlen($itemName)) $itemName = mb_substr($itemName, 0, 50).'...'; | |
| 347 | - $quantity = 0; | |
| 348 | - foreach($cart as $cart_row) { | |
| 349 | - $quantity += $cart_row['quantity']; | |
| 350 | - } | |
| 351 | - $desc = $itemName.' '.__('Quantity','usces').':'.$quantity; | |
| 352 | -//20120823ysk end | |
| 353 | - $html .= '<form id="purchase_form" name="purchase_form" action="'.$acting_opts['send_url'].'" method="post" onKeyDown="if(event.keyCode == 13) {return false;}" > | |
| 354 | - <input type="hidden" name="aid" value="'.$acting_opts['aid'].'" /> | |
| 355 | - <input type="hidden" name="cod" value="'.$rand.'" /> | |
| 356 | - <input type="hidden" name="jb" value="'.$acting_opts['card_jb'].'" /> | |
| 357 | - <input type="hidden" name="am" value="'.usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false).'" /> | |
| 358 | - <input type="hidden" name="tx" value="0" /> | |
| 359 | - <input type="hidden" name="sf" value="0" /> | |
| 360 | - <input type="hidden" name="pt" value="1" /> | |
| 361 | - <input type="hidden" name="inm" value="'.$desc.'" /> | |
| 362 | - <input type="hidden" name="pn" value="'.esc_attr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8'))).'" /> | |
| 363 | - <input type="hidden" name="em" value="'.esc_attr($usces_entries['customer']['mailaddress1']).'" /> | |
| 364 | - <input type="hidden" name="acting" value="jpayment_card" /> | |
| 365 | - <input type="hidden" name="acting_return" value="1" /> | |
| 366 | - <input type="hidden" name="page_id" value="'.USCES_CART_NUMBER.'" /> | |
| 367 | - <input type="hidden" name="uscesid" value="' . $usces->get_uscesid(false) . '"> | |
| 368 | - '; | |
| 369 | - $html .= '<div class="send"><input name="purchase_jpayment" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', NULL).$purchase_disabled.' /></div>'; | |
| 370 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 371 | - $html .= '</form>'; | |
| 372 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if(event.keyCode == 13) {return false;}"> | |
| 373 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 374 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 375 | - $html .= '</form>'."\n"; | |
| 376 | - break; | |
| 377 | - case 'acting_jpayment_conv'://コンビニ・ペーパーレス決済(J-Payment) | |
| 378 | - $acting_opts = $usces->options['acting_settings']['jpayment']; | |
| 379 | - $usces->save_order_acting_data($rand); | |
| 380 | -//20120823ysk start 0000547 | |
| 381 | - $itemName = $usces->getItemName($cart[0]['post_id']); | |
| 382 | - if(1 < count($cart)) $itemName .= ','.__('Others', 'usces'); | |
| 383 | - if(50 < mb_strlen($itemName)) $itemName = mb_substr($itemName, 0, 50).'...'; | |
| 384 | - $quantity = 0; | |
| 385 | - foreach($cart as $cart_row) { | |
| 386 | - $quantity += $cart_row['quantity']; | |
| 387 | - } | |
| 388 | - $desc = $itemName.' '.__('Quantity','usces').':'.$quantity; | |
| 389 | -//20120823ysk end | |
| 390 | - $html .= '<form id="purchase_form" name="purchase_form" action="'.$acting_opts['send_url'].'" method="post" onKeyDown="if(event.keyCode == 13) {return false;}" > | |
| 391 | - <input type="hidden" name="aid" value="'.$acting_opts['aid'].'" /> | |
| 392 | - <input type="hidden" name="cod" value="'.$rand.'" /> | |
| 393 | - <input type="hidden" name="jb" value="CAPTURE" /> | |
| 394 | - <input type="hidden" name="am" value="'.usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false).'" /> | |
| 395 | - <input type="hidden" name="tx" value="0" /> | |
| 396 | - <input type="hidden" name="sf" value="0" /> | |
| 397 | - <input type="hidden" name="pt" value="2" /> | |
| 398 | - <input type="hidden" name="inm" value="'.$desc.'" /> | |
| 399 | - <input type="hidden" name="pn" value="'.esc_attr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8'))).'" /> | |
| 400 | - <input type="hidden" name="em" value="'.esc_attr($usces_entries['customer']['mailaddress1']).'" /> | |
| 401 | - <input type="hidden" name="acting" value="jpayment_conv" /> | |
| 402 | - <input type="hidden" name="acting_return" value="1" /> | |
| 403 | - <input type="hidden" name="page_id" value="'.USCES_CART_NUMBER.'" /> | |
| 404 | - <input type="hidden" name="uscesid" value="' . $usces->get_uscesid(false) . '"> | |
| 405 | - '; | |
| 406 | - $html .= '<div class="send"><input name="purchase_jpayment" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', NULL).$purchase_disabled.' /></div>'; | |
| 407 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 408 | - $html .= '</form>'; | |
| 409 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if(event.keyCode == 13) {return false;}"> | |
| 410 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 411 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 412 | - $html .= '</form>'."\n"; | |
| 413 | - break; | |
| 414 | - case 'acting_jpayment_bank'://バンクチェック決済(J-Payment) | |
| 415 | - $acting_opts = $usces->options['acting_settings']['jpayment']; | |
| 416 | - $usces->save_order_acting_data($rand); | |
| 417 | -//20120823ysk start 0000547 | |
| 418 | - $itemName = $usces->getItemName($cart[0]['post_id']); | |
| 419 | - if(1 < count($cart)) $itemName .= ','.__('Others', 'usces'); | |
| 420 | - if(50 < mb_strlen($itemName)) $itemName = mb_substr($itemName, 0, 50).'...'; | |
| 421 | - $quantity = 0; | |
| 422 | - foreach($cart as $cart_row) { | |
| 423 | - $quantity += $cart_row['quantity']; | |
| 424 | - } | |
| 425 | - $desc = $itemName.' '.__('Quantity','usces').':'.$quantity; | |
| 426 | -//20120823ysk end | |
| 427 | - $html .= '<form id="purchase_form" name="purchase_form" action="'.$acting_opts['send_url'].'" method="post" onKeyDown="if(event.keyCode == 13) {return false;}" > | |
| 428 | - <input type="hidden" name="aid" value="'.$acting_opts['aid'].'" /> | |
| 429 | - <input type="hidden" name="cod" value="'.$rand.'" /> | |
| 430 | - <input type="hidden" name="jb" value="CAPTURE" /> | |
| 431 | - <input type="hidden" name="am" value="'.usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false).'" /> | |
| 432 | - <input type="hidden" name="tx" value="0" /> | |
| 433 | - <input type="hidden" name="sf" value="0" /> | |
| 434 | - <input type="hidden" name="pt" value="7" /> | |
| 435 | - <input type="hidden" name="inm" value="'.$desc.'" /> | |
| 436 | - <input type="hidden" name="pn" value="'.esc_attr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8'))).'" /> | |
| 437 | - <input type="hidden" name="em" value="'.esc_attr($usces_entries['customer']['mailaddress1']).'" /> | |
| 438 | - <input type="hidden" name="acting" value="jpayment_bank" /> | |
| 439 | - <input type="hidden" name="acting_return" value="1" /> | |
| 440 | - <input type="hidden" name="page_id" value="'.USCES_CART_NUMBER.'" /> | |
| 441 | - <input type="hidden" name="uscesid" value="' . $usces->get_uscesid(false) . '"> | |
| 442 | - '; | |
| 443 | - $html .= '<div class="send"><input name="purchase_jpayment" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', NULL).$purchase_disabled.' /></div>'; | |
| 444 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 445 | - $html .= '</form>'; | |
| 446 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if(event.keyCode == 13) {return false;}"> | |
| 447 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 448 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 449 | - $html .= '</form>'."\n"; | |
| 450 | - break; | |
| 451 | -//20101018ysk end | |
| 452 | -//20110208ysk start | |
| 453 | - case 'acting_paypal_ec'://PayPal(エクスプレス・チェックアウト) | |
| 454 | - $acting_opts = $usces->options['acting_settings']['paypal']; | |
| 455 | - $currency_code = $usces->get_currency_code(); | |
| 456 | - $name = apply_filters( 'usces_filter_paypalec_shiptoname', esc_attr($usces_entries['delivery']['name2'].' '.$usces_entries['delivery']['name1']) ); | |
| 457 | - $address2 = apply_filters( 'usces_filter_paypalec_shiptostreet', esc_attr($usces_entries['delivery']['address2']) ); | |
| 458 | - $address3 = apply_filters( 'usces_filter_paypalec_shiptostreet2', esc_attr($usces_entries['delivery']['address3']) ); | |
| 459 | - $address1 = apply_filters( 'usces_filter_paypalec_shiptocity', esc_attr($usces_entries['delivery']['address1']) ); | |
| 460 | - $pref = apply_filters( 'usces_filter_paypalec_shiptostate', esc_attr($usces_entries['delivery']['pref']) ); | |
| 461 | - $country = ( !empty($usces_entries['delivery']['country']) ) ? $usces_entries['delivery']['country'] : usces_get_base_country(); | |
| 462 | - $country_code = apply_filters( 'usces_filter_paypalec_shiptocountrycode', $country ); | |
| 463 | - $zip = apply_filters( 'usces_filter_paypalec_shiptozip', str_replace('-', '', $usces_entries['delivery']['zipcode']) ); | |
| 464 | - $tel = apply_filters( 'usces_filter_paypalec_shiptophonenum', ltrim(str_replace('-', '', $usces_entries['delivery']['tel']), '0') ); | |
| 465 | - $html .= '<form id="purchase_form" action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 466 | - <input type="hidden" name="SHIPTONAME" value="'.$name.'"> | |
| 467 | - <input type="hidden" name="SHIPTOSTREET" value="'.$address2.'"> | |
| 468 | - <input type="hidden" name="SHIPTOSTREET2" value="'.$address3.'"> | |
| 469 | - <input type="hidden" name="SHIPTOCITY" value="'.$address1.'"> | |
| 470 | - <input type="hidden" name="SHIPTOSTATE" value="'.$pref.'"> | |
| 471 | - <input type="hidden" name="SHIPTOCOUNTRYCODE" value="'.$country_code.'"> | |
| 472 | - <input type="hidden" name="SHIPTOZIP" value="'.$zip.'"> | |
| 473 | - <input type="hidden" name="SHIPTOPHONENUM" value="'.$tel.'"> | |
| 474 | - <input type="hidden" name="SOLUTIONTYPE" value="Sole"> | |
| 475 | - <input type="hidden" name="LANDINGPAGE" value="Billing"> | |
| 476 | - <input type="hidden" name="CURRENCYCODE" value="'.$currency_code.'"> | |
| 477 | - <input type="hidden" name="EMAIL" value="'.esc_attr( $usces_entries['customer']['mailaddress1'] ).'">'; | |
| 478 | -//20120629ysk start 0000520 | |
| 479 | - if( 'shipped' != $usces->getItemDivision( $cart[0]['post_id'] ) ) { | |
| 480 | - $html .= '<input type="hidden" name="NOSHIPPING" value="1">'; | |
| 481 | - } | |
| 482 | -//20120629ysk end | |
| 483 | - $charging_type = $usces->getItemChargingType($cart[0]['post_id'], $cart); | |
| 484 | - //$frequency = $usces->getItemFrequency($cart[0]['post_id']); | |
| 485 | - if( 'continue' != $charging_type ) { | |
| 486 | - //通常購入 | |
| 487 | -//20110606ysk start | |
| 488 | - $itemName = $usces->getItemName($cart[0]['post_id']); | |
| 489 | - if(1 < count($cart)) $itemName .= ','.__('Others', 'usces'); | |
| 490 | - if(50 < mb_strlen($itemName)) $itemName = mb_substr($itemName, 0, 50).'...'; | |
| 491 | - $quantity = 0; | |
| 492 | - foreach($cart as $cart_row) { | |
| 493 | - $quantity += $cart_row['quantity']; | |
| 494 | - } | |
| 495 | - $desc = $itemName.' '.__('Quantity','usces').':'.$quantity; | |
| 496 | - $html .= '<input type="hidden" name="DESC" value="'.$desc.'">'; | |
| 497 | -//20110606ysk end | |
| 498 | - $html .= '<input type="hidden" name="AMT" value="'.usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false).'">'; | |
| 499 | - } else { | |
| 500 | - //定期支払い | |
| 501 | - //$desc = usces_make_agreement_description($cart, $usces_entries['order']['total_items_price']); | |
| 502 | - $desc = usces_make_agreement_description($cart, $usces_entries['order']['total_full_price']);//20111125ysk 0000320 | |
| 503 | - $html .= '<input type="hidden" name="L_BILLINGTYPE0" value="RecurringPayments"> | |
| 504 | - <input type="hidden" name="L_BILLINGAGREEMENTDESCRIPTION0" value="'.esc_attr($desc).'"> | |
| 505 | - <input type="hidden" name="AMT" value="0">'; | |
| 506 | - } | |
| 507 | - $html .= '<input type="hidden" name="purchase" value="acting_paypal_ec">';//20110502ysk | |
| 508 | - $html .= '<div class="send"><input type="image" src="https://www.paypal.com/'.( USCES_JP ? 'ja_JP/JP' : 'en_US' ).'/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" value="submit" alt="PayPal"'.apply_filters('usces_filter_confirm_nextbutton', NULL).$purchase_disabled.' /></div>'; | |
| 509 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 510 | - $html .= '</form>'; | |
| 511 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 512 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 513 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 514 | - $html .= '</form>'; | |
| 515 | - break; | |
| 516 | -//20110208ysk end | |
| 517 | -//20120413ysk start | |
| 518 | - case 'acting_sbps_card': | |
| 519 | - case 'acting_sbps_conv': | |
| 520 | - case 'acting_sbps_payeasy': | |
| 521 | - case 'acting_sbps_wallet': | |
| 522 | - case 'acting_sbps_mobile': | |
| 523 | - $charging_type = $usces->getItemChargingType($cart[0]['post_id']); | |
| 524 | - $frequency = $usces->getItemFrequency($cart[0]['post_id']); | |
| 525 | - $chargingday = $usces->getItemChargingDay($cart[0]['post_id']); | |
| 526 | - $acting_opts = $usces->options['acting_settings']['sbps']; | |
| 527 | - $usces->save_order_acting_data($rand); | |
| 528 | - $member = $usces->get_member(); | |
| 529 | - $cust_code = ( empty($member['ID']) ) ? str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8')) : $member['ID']; | |
| 530 | - if( 'public' == $acting_opts['ope'] ) { | |
| 531 | - $send_url = $acting_opts['send_url']; | |
| 532 | - } elseif( 'test' == $acting_opts['ope'] ) { | |
| 533 | - $send_url = $acting_opts['send_url_test']; | |
| 534 | - } else { | |
| 535 | - $send_url = $acting_opts['send_url_check']; | |
| 536 | - } | |
| 537 | - $sbps_cust_no = ''; | |
| 538 | - $sbps_payment_no = ''; | |
| 539 | - switch( $acting_flag ) { | |
| 540 | - case 'acting_sbps_card': | |
| 541 | - //if( 'on' == $acting_opts['cust'] ) { | |
| 542 | - // $sbps_cust_no = $usces->get_member_meta_value( 'sbps_cust_no', $member['ID'] ); | |
| 543 | - // $sbps_payment_no = $usces->get_member_meta_value( 'sbps_payment_no', $member['ID'] ); | |
| 544 | - //} | |
| 545 | - $pay_method = ( 'on' == $acting_opts['3d_secure'] ) ? "credit3d" : "credit"; | |
| 546 | - $acting = "sbps_card"; | |
| 547 | - $free_csv = ""; | |
| 548 | - break; | |
| 549 | - case 'acting_sbps_conv': | |
| 550 | - $pay_method = "webcvs"; | |
| 551 | - $acting = "sbps_conv"; | |
| 552 | - $free_csv = usces_set_free_csv( $usces_entries['customer'] ); | |
| 553 | - break; | |
| 554 | - case 'acting_sbps_payeasy': | |
| 555 | - $pay_method = "payeasy"; | |
| 556 | - $acting = "sbps_payeasy"; | |
| 557 | - $free_csv = usces_set_free_csv( $usces_entries['customer'] ); | |
| 558 | - break; | |
| 559 | - case 'acting_sbps_wallet': | |
| 560 | - $pay_method = ""; | |
| 561 | - if( 'on' == $acting_opts['wallet_yahoowallet'] ) $pay_method .= ",yahoowallet"; | |
| 562 | - if( 'on' == $acting_opts['wallet_rakuten'] ) $pay_method .= ",rakuten"; | |
| 563 | - if( 'on' == $acting_opts['wallet_paypal'] ) $pay_method .= ",paypal"; | |
| 564 | - if( 'on' == $acting_opts['wallet_netmile'] ) $pay_method .= ",netmile"; | |
| 565 | - if( 'on' == $acting_opts['wallet_alipay'] ) $pay_method .= ",alipay"; | |
| 566 | - $pay_method = ltrim( $pay_method, "," ); | |
| 567 | - $acting = "sbps_wallet"; | |
| 568 | - $free_csv = ""; | |
| 569 | - break; | |
| 570 | - case 'acting_sbps_mobile': | |
| 571 | - $pay_method = ""; | |
| 572 | - if( 'on' == $acting_opts['mobile_docomo'] ) $pay_method .= ",docomo"; | |
| 573 | - if( 'on' == $acting_opts['mobile_softbank'] ) $pay_method .= ",softbank"; | |
| 574 | - if( 'on' == $acting_opts['mobile_auone'] ) $pay_method .= ",auone"; | |
| 575 | - if( 'on' == $acting_opts['mobile_mysoftbank'] ) $pay_method .= ",mysoftbank"; | |
| 576 | - $pay_method = ltrim( $pay_method, "," ); | |
| 577 | - $acting = "sbps_mobile"; | |
| 578 | - $free_csv = ""; | |
| 579 | - break; | |
| 580 | - } | |
| 581 | - $item_id = $cart[0]['post_id']; | |
| 582 | - $item_name = $usces->getItemName($cart[0]['post_id']); | |
| 583 | - if(1 < count($cart)) $item_name .= ' '.__('Others', 'usces'); | |
| 584 | - if(36 < mb_strlen($item_name)) $item_name = mb_substr($item_name, 0, 36).'...'; | |
| 585 | - $amount = usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false); | |
| 586 | - $pay_type = "0"; | |
| 587 | - $auto_charge_type = ""; | |
| 588 | - $service_type = "0"; | |
| 589 | - $div_settle = ""; | |
| 590 | - $last_charge_month = ""; | |
| 591 | - $camp_type = ""; | |
| 592 | - $terminal_type = "0"; | |
| 593 | - $success_url = USCES_CART_URL.$usces->delim."acting=".$acting."&acting_return=1"; | |
| 594 | - $cancel_url = USCES_CART_URL.$usces->delim."acting=".$acting."&confirm=1"; | |
| 595 | - $error_url = USCES_CART_URL.$usces->delim."acting=".$acting."&acting_return=0"; | |
| 596 | - $pagecon_url = USCES_CART_URL; | |
| 597 | - $free1 = $acting_flag; | |
| 598 | - $request_date = date('YmdHis', current_time('timestamp')); | |
| 599 | - $limit_second = "600"; | |
| 600 | - $sps_hashcode = $pay_method.$acting_opts['merchant_id'].$acting_opts['service_id'].$cust_code.$sbps_cust_no.$sbps_payment_no.$rand.$item_id.$item_name.$amount.$pay_type.$auto_charge_type.$service_type.$div_settle.$last_charge_month.$camp_type.$terminal_type.$success_url.$cancel_url.$error_url.$pagecon_url.$free1.$free_csv.$request_date.$limit_second.$acting_opts['hash_key']; | |
| 601 | - $sps_hashcode = sha1( $sps_hashcode ); | |
| 602 | - $html .= '<form id="purchase_form" name="purchase_form" action="'.$send_url.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 603 | - <input type="hidden" name="pay_method" value="'.$pay_method.'" /> | |
| 604 | - <input type="hidden" name="merchant_id" value="'.$acting_opts['merchant_id'].'" /> | |
| 605 | - <input type="hidden" name="service_id" value="'.$acting_opts['service_id'].'" /> | |
| 606 | - <input type="hidden" name="cust_code" value="'.$cust_code.'" /> | |
| 607 | - <input type="hidden" name="sps_cust_no" value="'.$sbps_cust_no.'" /> | |
| 608 | - <input type="hidden" name="sps_payment_no" value="'.$sbps_payment_no.'" /> | |
| 609 | - <input type="hidden" name="order_id" value="'.$rand.'" /> | |
| 610 | - <input type="hidden" name="item_id" value="'.$item_id.'" /> | |
| 611 | - <input type="hidden" name="pay_item_id" value="" /> | |
| 612 | - <input type="hidden" name="item_name" value="'.$item_name.'" /> | |
| 613 | - <input type="hidden" name="tax" value="" /> | |
| 614 | - <input type="hidden" name="amount" value="'.$amount.'" /> | |
| 615 | - <input type="hidden" name="pay_type" value="'.$pay_type.'" /> | |
| 616 | - <input type="hidden" name="auto_charge_type" value="'.$auto_charge_type.'" /> | |
| 617 | - <input type="hidden" name="service_type" value="'.$service_type.'" /> | |
| 618 | - <input type="hidden" name="div_settle" value="'.$div_settle.'" /> | |
| 619 | - <input type="hidden" name="last_charge_month" value="'.$last_charge_month.'" /> | |
| 620 | - <input type="hidden" name="camp_type" value="'.$camp_type.'" /> | |
| 621 | - <input type="hidden" name="terminal_type" value="'.$terminal_type.'" /> | |
| 622 | - <input type="hidden" name="success_url" value="'.$success_url.'" /> | |
| 623 | - <input type="hidden" name="cancel_url" value="'.$cancel_url.'" /> | |
| 624 | - <input type="hidden" name="error_url" value="'.$error_url.'" /> | |
| 625 | - <input type="hidden" name="pagecon_url" value="'.$pagecon_url.'" /> | |
| 626 | - <input type="hidden" name="free1" value="'.$free1.'" /> | |
| 627 | - <input type="hidden" name="free2" value="" /> | |
| 628 | - <input type="hidden" name="free3" value="" /> | |
| 629 | - <input type="hidden" name="free_csv" value="'.$free_csv.'" /> | |
| 630 | - <input type="hidden" name="request_date" value="'.$request_date.'" /> | |
| 631 | - <input type="hidden" name="limit_second" value="'.$limit_second.'" /> | |
| 632 | - <input type="hidden" name="sps_hashcode" value="'.$sps_hashcode.'" /> | |
| 633 | - '; | |
| 634 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 635 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.apply_filters('usces_filter_confirm_nextbutton_value', __('Checkout', 'usces')).'"' . apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"') . $purchase_disabled . ' /></div>'; | |
| 636 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 637 | - $html .= '</form>'; | |
| 638 | - $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 639 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"' . apply_filters('usces_filter_confirm_prebutton', NULL) . ' /></div>'; | |
| 640 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 641 | - $html .= '</form>'."\n"; | |
| 642 | - break; | |
| 643 | -//20120413ysk end | |
| 644 | -//20120618ysk start | |
| 645 | - case 'acting_telecom_card'://テレコムクレジット | |
| 646 | - $acting_opts = $usces->options['acting_settings']['telecom']; | |
| 647 | - $member = $usces->get_member(); | |
| 648 | - $memid = empty($member['ID']) ? 99999999 : $member['ID']; | |
| 649 | - $send_url = $acting_opts['send_url']; | |
| 650 | - $tel = str_replace('-', '', $usces_entries['customer']['tel']); | |
| 651 | - $redirect_url = USCES_CART_URL.$usces->delim.'acting=telecom_card&acting_return=1&result=1'; | |
| 652 | - $redirect_back_url = USCES_CART_URL.$usces->delim.'confirm=1'; | |
| 653 | - $html .= '<form id="purchase_form" action="'.$send_url.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 654 | - <input type="hidden" name="clientip" value="'.$acting_opts['clientip'].'"> | |
| 655 | - <input type="hidden" name="money" value="'.apply_filters( 'usces_filter_acting_amount', usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false), $acting_flag ).'"> | |
| 656 | - <input type="hidden" name="sendid" value="'.$memid.'"> | |
| 657 | - <input type="hidden" name="usrtel" value="'.$tel.'"> | |
| 658 | - <input type="hidden" name="usrmail" value="'.esc_attr($usces_entries['customer']['mailaddress1']).'"> | |
| 659 | - <input type="hidden" name="redirect_url" value="'.$redirect_url.'"> | |
| 660 | - <input type="hidden" name="redirect_back_url" value="'.$redirect_back_url.'"> | |
| 661 | - <input type="hidden" name="option" value="'.$rand.'"> | |
| 662 | - '; | |
| 663 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', NULL).$purchase_disabled.' /></div>'; | |
| 664 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 665 | - $html .= '</form>'; | |
| 666 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 667 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 668 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 669 | - $html .= '</form>'; | |
| 670 | - break; | |
| 671 | -//20120618ysk end | |
| 672 | -//20121030ysk start | |
| 673 | - case 'acting_telecom_edy'://Edy決済(テレコムクレジット) | |
| 674 | - $acting_opts = $usces->options['acting_settings']['telecom']; | |
| 675 | - $member = $usces->get_member(); | |
| 676 | - $memid = empty($member['ID']) ? 99999999 : $member['ID']; | |
| 677 | - $redirect_back_url = USCES_CART_URL.$usces->delim.'acting=telecom_edy&acting_return=1®_order=1'; | |
| 678 | - $html .= '<form id="purchase_form" action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 679 | - <input type="hidden" name="clientip" value="'.$acting_opts['clientip'].'"> | |
| 680 | - <input type="hidden" name="sendid" value="'.$memid.'"> | |
| 681 | - <input type="hidden" name="money" value="'.apply_filters( 'usces_filter_acting_amount', usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false), $acting_flag ).'"> | |
| 682 | - <input type="hidden" name="redirect_back_url" value="'.$redirect_back_url.'"> | |
| 683 | - <input type="hidden" name="option" value="'.$rand.'"> | |
| 684 | - '; | |
| 685 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', NULL).$purchase_disabled.' /></div>'; | |
| 686 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 687 | - $html .= '</form>'; | |
| 688 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 689 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 690 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 691 | - $html .= '</form>'; | |
| 692 | - break; | |
| 693 | -//20121030ysk end | |
| 694 | -//20121206ysk start | |
| 695 | - case 'acting_digitalcheck_card'://カード決済(デジタルチェック) | |
| 696 | - $acting_opts = $usces->options['acting_settings']['digitalcheck']; | |
| 697 | - $sid = uniqid(); | |
| 698 | - $usces->save_order_acting_data($sid); | |
| 699 | - $member = $usces->get_member(); | |
| 700 | - if( 'on' == $acting_opts['card_user_id'] && $usces->is_member_logged_in() ) { | |
| 701 | - $ip_user_id = $usces->get_member_meta_value( 'digitalcheck_ip_user_id', $member['ID'] ); | |
| 702 | - if( empty($ip_user_id) ) { | |
| 703 | - $ip_user_id = $member['ID']; | |
| 704 | - $send_url = $acting_opts['send_url_card']; | |
| 705 | - $fuka = $acting_flag.$ip_user_id; | |
| 706 | - } else { | |
| 707 | - $send_url = USCES_CART_URL; | |
| 708 | - $fuka = $acting_flag; | |
| 709 | - } | |
| 710 | - } else { | |
| 711 | - $ip_user_id = false; | |
| 712 | - $send_url = $acting_opts['send_url_card']; | |
| 713 | - $fuka = $acting_flag; | |
| 714 | - } | |
| 715 | - $item_name = $usces->getItemName($cart[0]['post_id']); | |
| 716 | - if( 1 < count($cart) ) $item_name .= ','.__('Others', 'usces'); | |
| 717 | - if( 46 < strlen($item_name) ) $item_name = mb_strimwidth( $item_name, 0, 50, '...' ); | |
| 718 | - $kakutei = ( empty($acting_opts['card_kakutei']) ) ? '0' : $acting_opts['card_kakutei']; | |
| 719 | - $html .= '<form id="purchase_form" name="purchase_form" action="'.$send_url.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 720 | - <input type="hidden" name="IP" value="'.$acting_opts['card_ip'].'" /> | |
| 721 | - <input type="hidden" name="SID" value="'.$sid.'" /> | |
| 722 | - <input type="hidden" name="N1" value="'.$item_name.'"> | |
| 723 | - <input type="hidden" name="K1" value="'.usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false).'"> | |
| 724 | - <input type="hidden" name="STORE" value="51" /> | |
| 725 | - <input type="hidden" name="KAKUTEI" value="'.$kakutei.'" /> | |
| 726 | - <input type="hidden" name="FUKA" value="'.$fuka.'" /> | |
| 727 | - <input type="hidden" name="NAME1" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name1'], 0, 20)).'" /> | |
| 728 | - <input type="hidden" name="NAME2" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name2'], 0, 20)).'" /> | |
| 729 | - <input type="hidden" name="KANA1" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name3'], 0, 20)).'" /> | |
| 730 | - <input type="hidden" name="KANA2" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name4'], 0, 20)).'" /> | |
| 731 | - <input type="hidden" name="YUBIN1" value="'.esc_attr(substr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['zipcode'], 'a', 'UTF-8')), 0, 7)).'" /> | |
| 732 | - <input type="hidden" name="TEL" value="'.esc_attr(substr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8')), 0, 11)).'" /> | |
| 733 | - <input type="hidden" name="ADR1" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['pref'].$usces_entries['customer']['address1'].$usces_entries['customer']['address2'], 0, 50)).'" /> | |
| 734 | - <input type="hidden" name="ADR2" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['address3'], 0, 50)).'" /> | |
| 735 | - <input type="hidden" name="MAIL" value="'.esc_attr($usces_entries['customer']['mailaddress1']).'" /> | |
| 736 | - '; | |
| 737 | - if( $ip_user_id ) { | |
| 738 | - $html .= '<input type="hidden" name="PASS" value="'.$acting_opts['card_pass'].'"> | |
| 739 | - <input type="hidden" name="IP_USER_ID" value="'.$ip_user_id.'"> | |
| 740 | - '; | |
| 741 | - } | |
| 742 | - if( $usces->use_ssl ) { | |
| 743 | - $ssl_url = $usces->options['ssl_url'].'/?page_id='.USCES_CART_NUMBER; | |
| 744 | - $html .= '<input type="hidden" name="OKURL" value="'.$ssl_url.$usces->delim.'acting=digitalcheck_card&acting_return=1" /> | |
| 745 | - <input type="hidden" name="RT" value="'.$ssl_url.$usces->delim.'acting=digitalcheck_card&confirm=1" /> | |
| 746 | - '; | |
| 747 | - } else { | |
| 748 | - $html .= '<input type="hidden" name="OKURL" value="'.USCES_CART_URL.$usces->delim.'acting=digitalcheck_card&acting_return=1" /> | |
| 749 | - <input type="hidden" name="RT" value="'.USCES_CART_URL.$usces->delim.'acting=digitalcheck_card&confirm=1" /> | |
| 750 | - '; | |
| 751 | - } | |
| 752 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 753 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"').$purchase_disabled.' /></div>'; | |
| 754 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $sid, $purchase_disabled); | |
| 755 | - $html .= '</form>'; | |
| 756 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 757 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 758 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 759 | - $html .= '</form>'."\n"; | |
| 760 | - break; | |
| 761 | - case 'acting_digitalcheck_conv'://コンビニ決済(デジタルチェック) | |
| 762 | - $acting_opts = $usces->options['acting_settings']['digitalcheck']; | |
| 763 | - $sid = uniqid(); | |
| 764 | - $usces->save_order_acting_data($sid); | |
| 765 | - $item_name = $usces->getItemName($cart[0]['post_id']); | |
| 766 | - if( 1 < count($cart) ) $item_name .= ','.__('Others', 'usces'); | |
| 767 | - if( 46 < strlen($item_name) ) $item_name = mb_strimwidth( $item_name, 0, 50, '...' ); | |
| 768 | - $today = date( 'Y-m-d', current_time('timestamp') ); | |
| 769 | - list( $year, $month, $day ) = explode( '-', $today ); | |
| 770 | - $kigen = date( 'Ymd', mktime(0, 0, 0, (int)$month, (int)$day + (int)$acting_opts['conv_kigen'], (int)$year) ); | |
| 771 | - $store = ( 1 < count($acting_opts['conv_store']) ) ? '99' : $acting_opts['conv_store'][0]; | |
| 772 | - //$html .= '<form id="purchase_form" name="purchase_form" action="'.$acting_opts['send_url_conv'].'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 773 | - $html .= '<form id="purchase_form" name="purchase_form" action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 774 | - <input type="hidden" name="IP" value="'.$acting_opts['conv_ip'].'" /> | |
| 775 | - <input type="hidden" name="SID" value="'.$sid.'" /> | |
| 776 | - <input type="hidden" name="N1" value="'.esc_attr($item_name).'"> | |
| 777 | - <input type="hidden" name="K1" value="'.usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false).'"> | |
| 778 | - <input type="hidden" name="STORE" value="'.$store.'" /> | |
| 779 | - <input type="hidden" name="FUKA" value="'.$acting_flag.'" /> | |
| 780 | - <input type="hidden" name="KIGEN" value="'.$kigen.'" /> | |
| 781 | - <input type="hidden" name="NAME1" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name1'], 0, 20)).'" /> | |
| 782 | - <input type="hidden" name="NAME2" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name2'], 0, 20)).'" /> | |
| 783 | - <input type="hidden" name="KANA1" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name3'], 0, 20)).'" /> | |
| 784 | - <input type="hidden" name="KANA2" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['name4'], 0, 20)).'" /> | |
| 785 | - <input type="hidden" name="YUBIN1" value="'.esc_attr(substr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['zipcode'], 'a', 'UTF-8')), 0, 7)).'" /> | |
| 786 | - <input type="hidden" name="TEL" value="'.esc_attr(substr(str_replace('-', '', mb_convert_kana($usces_entries['customer']['tel'], 'a', 'UTF-8')), 0, 11)).'" /> | |
| 787 | - <input type="hidden" name="ADR1" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['pref'].$usces_entries['customer']['address1'].$usces_entries['customer']['address2'], 0, 50)).'" /> | |
| 788 | - <input type="hidden" name="ADR2" value="'.esc_attr(mb_strimwidth($usces_entries['customer']['address3'], 0, 50)).'" /> | |
| 789 | - <input type="hidden" name="MAIL" value="'.esc_attr($usces_entries['customer']['mailaddress1']).'" /> | |
| 790 | - '; | |
| 791 | - if( $usces->use_ssl ) { | |
| 792 | - $ssl_url = $usces->options['ssl_url'].'/?page_id='.USCES_CART_NUMBER; | |
| 793 | - $html .= '<input type="hidden" name="OKURL" value="'.$ssl_url.$usces->delim.'acting=digitalcheck_conv&acting_return=1" /> | |
| 794 | - <input type="hidden" name="RT" value="'.$ssl_url.$usces->delim.'acting=digitalcheck_conv&confirm=1" /> | |
| 795 | - '; | |
| 796 | - } else { | |
| 797 | - $html .= '<input type="hidden" name="OKURL" value="'.USCES_CART_URL.$usces->delim.'acting=digitalcheck_conv&acting_return=1" /> | |
| 798 | - <input type="hidden" name="RT" value="'.USCES_CART_URL.$usces->delim.'acting=digitalcheck_conv&confirm=1" /> | |
| 799 | - '; | |
| 800 | - } | |
| 801 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 802 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"').$purchase_disabled.' /></div>'; | |
| 803 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $sid, $purchase_disabled); | |
| 804 | - $html .= '</form>'; | |
| 805 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 806 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 807 | - $html = apply_filters('usces_filter_confirm_inform_back', $html); | |
| 808 | - $html .= '</form>'."\n"; | |
| 809 | - break; | |
| 810 | -//20121206ysk end | |
| 811 | -//20130225ysk start | |
| 812 | - case 'acting_mizuho_card'://カード決済(みずほファクター) | |
| 813 | - $acting_opts = $usces->options['acting_settings']['mizuho']; | |
| 814 | - $send_url = ( 'public' == $acting_opts['ope'] ) ? $acting_opts['send_url'] : $acting_opts['send_url_test']; | |
| 815 | - $p_ver = '0200'; | |
| 816 | - $stdate = date( 'Ymd' ); | |
| 817 | - $stran = sprintf( '%06d', mt_rand(1, 999999) ); | |
| 818 | - $bkcode = 'bg01'; | |
| 819 | - $amount = apply_filters( 'usces_filter_acting_amount', usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false), $acting_flag ); | |
| 820 | - $schksum = $p_ver.$stdate.$stran.$bkcode.$acting_opts['shopid'].$acting_opts['cshopid'].$amount.$acting_opts['hash_pass']; | |
| 821 | - $schksum = htmlspecialchars( md5( $schksum ) ); | |
| 822 | - $html .= '<form id="purchase_form" action="'.$send_url.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 823 | - <input type="hidden" name="p_ver" value="'.$p_ver.'"> | |
| 824 | - <input type="hidden" name="stdate" value="'.$stdate.'"> | |
| 825 | - <input type="hidden" name="stran" value="'.$stran.'"> | |
| 826 | - <input type="hidden" name="bkcode" value="'.$bkcode.'"> | |
| 827 | - <input type="hidden" name="shopid" value="'.$acting_opts['shopid'].'"> | |
| 828 | - <input type="hidden" name="cshopid" value="'.$acting_opts['cshopid'].'"> | |
| 829 | - <input type="hidden" name="amount" value="'.$amount.'"> | |
| 830 | - <input type="hidden" name="schksum" value="'.$schksum.'"> | |
| 831 | - '; | |
| 832 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 833 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"').$purchase_disabled.' /></div>'; | |
| 834 | - $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 835 | - $html .= '</form>'; | |
| 836 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 837 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 838 | - $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 839 | - $html .= '</form>'; | |
| 840 | - break; | |
| 841 | - case 'acting_mizuho_conv1'://コンビニ・ウェルネット決済(みずほファクター) | |
| 842 | - case 'acting_mizuho_conv2'://コンビニ・セブンイレブン決済(みずほファクター) | |
| 843 | - $acting_opts = $usces->options['acting_settings']['mizuho']; | |
| 844 | - $send_url = ( 'public' == $acting_opts['ope'] ) ? $acting_opts['send_url'] : $acting_opts['send_url_test']; | |
| 845 | - $p_ver = '0200'; | |
| 846 | - $stdate = date( 'Ymd' ); | |
| 847 | - $stran = sprintf( '%06d', mt_rand(1, 999999) ); | |
| 848 | - $bkcode = 'cv0'.substr( $acting_flag, -1 ); | |
| 849 | - $amount = apply_filters( 'usces_filter_acting_amount', usces_crform($usces_entries['order']['total_full_price'], false, false, 'return', false), $acting_flag ); | |
| 850 | - $custmKanji = mb_strimwidth( $usces_entries['customer']['name1'].$usces_entries['customer']['name2'], 0, 40 ); | |
| 851 | - $mailaddr = esc_attr( $usces_entries['customer']['mailaddress1'] ); | |
| 852 | - $tel = str_replace( '-', '', $usces_entries['customer']['tel'] ); | |
| 853 | - $schksum = $p_ver.$stdate.$stran.$bkcode.$acting_opts['shopid'].$acting_opts['cshopid'].$amount.mb_convert_encoding($custmKanji, 'SJIS', 'UTF-8').$mailaddr.$tel.$acting_opts['hash_pass']; | |
| 854 | - $schksum = htmlspecialchars( md5( $schksum ) ); | |
| 855 | - $html .= '<form id="purchase_form" action="'.$send_url.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 856 | - <input type="hidden" name="p_ver" value="'.$p_ver.'"> | |
| 857 | - <input type="hidden" name="stdate" value="'.$stdate.'"> | |
| 858 | - <input type="hidden" name="stran" value="'.$stran.'"> | |
| 859 | - <input type="hidden" name="bkcode" value="'.$bkcode.'"> | |
| 860 | - <input type="hidden" name="shopid" value="'.$acting_opts['shopid'].'"> | |
| 861 | - <input type="hidden" name="cshopid" value="'.$acting_opts['cshopid'].'"> | |
| 862 | - <input type="hidden" name="amount" value="'.$amount.'"> | |
| 863 | - <input type="hidden" name="custmKanji" value="'.$custmKanji.'"> | |
| 864 | - <input type="hidden" name="mailaddr" value="'.$mailaddr.'"> | |
| 865 | - <input type="hidden" name="tel" value="'.$tel.'"> | |
| 866 | - <input type="hidden" name="schksum" value="'.$schksum.'"> | |
| 867 | - '; | |
| 868 | - $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 869 | - $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.apply_filters('usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"').$purchase_disabled.' /></div>'; | |
| 870 | - $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 871 | - $html .= '</form>'; | |
| 872 | - $html .= '<form action="'.USCES_CART_URL.'" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 873 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /></div>'; | |
| 874 | - $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 875 | - $html .= '</form>'; | |
| 876 | - break; | |
| 877 | -//20130225ysk end | |
| 878 | - | |
| 879 | - default: | |
| 880 | - $html .= '<form id="purchase_form" action="' . apply_filters('usces_filter_acting_url', USCES_CART_URL) . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 881 | - <div class="send"><input name="backDelivery" type="submit" id="back_button" value="'.__('Back', 'usces').'"'.apply_filters('usces_filter_confirm_prebutton', NULL).' /> | |
| 882 | - <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="'.__('Checkout', 'usces').'"'.$purchase_disabled.' /></div>'; | |
| 883 | - $html = apply_filters('usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled); | |
| 884 | - $html .= '</form>'; | |
| 885 | - } | |
| 886 | -} | |
| 887 | -?> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Processing of the “Purchase” button | |
| 4 | + * | |
| 5 | + * @package Welcart | |
| 6 | + */ | |
| 7 | + | |
| 8 | +if ( isset( $this ) ) { | |
| 9 | + $usces = &$this; | |
| 10 | +} | |
| 11 | + | |
| 12 | +$payments = usces_get_payments_by_name( $usces_entries['order']['payment_name'] ); | |
| 13 | +$acting_flag = ''; | |
| 14 | +$rand = usces_acting_key(); | |
| 15 | +$cart = $usces->cart->get_cart(); | |
| 16 | +$cart_count = ( $cart && is_array( $cart ) ) ? count( $cart ) : 0; | |
| 17 | + | |
| 18 | +$purchase_disabled = ''; | |
| 19 | +$purchase_html = ''; | |
| 20 | +$checkout_button_value = apply_filters( 'usces_filter_confirm_checkout_button_value', __( 'Checkout', 'usces' ) ); | |
| 21 | +$payment_settlement = $payments['settlement'] ?? ''; | |
| 22 | + | |
| 23 | +if ( 'acting' != substr( $payment_settlement, 0, 6 ) || 0 === (int) $usces_entries['order']['total_full_price'] ) { | |
| 24 | + $purchase_html = '<form id="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 25 | + ' . wp_nonce_field( 'wc_purchase_nonce', 'wc_purchase_nonce', true, false ) . ' | |
| 26 | + <div class="send"> | |
| 27 | + ' . apply_filters( 'usces_filter_confirm_before_backbutton', null, $payments, $acting_flag, $rand ) . ' | |
| 28 | + <input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . apply_filters( 'usces_filter_confirm_prebutton_value', __( 'Back', 'usces' ) ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /> | |
| 29 | + <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', null ) . $purchase_disabled . ' /></div>'; | |
| 30 | + $html .= apply_filters( 'usces_filter_confirm_inform', $purchase_html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 31 | + $html .= '</form>'; | |
| 32 | +} else { | |
| 33 | + $send_item_code = apply_filters( 'usces_filter_settlement_item_code', $usces->getItemCode( $cart[0]['post_id'] ) ); | |
| 34 | + $send_item_name = apply_filters( 'usces_filter_settlement_item_name', $usces->getItemName( $cart[0]['post_id'] ) ); | |
| 35 | + | |
| 36 | + $acting_flag = ( 'acting' == $payment_settlement ) ? $payments['module'] : $payment_settlement; | |
| 37 | + switch ( $acting_flag ) { | |
| 38 | + | |
| 39 | + case 'paypal.php': | |
| 40 | + break; | |
| 41 | + case 'epsilon.php': | |
| 42 | + break; | |
| 43 | + | |
| 44 | + case 'acting_remise_card': /* ルミーズ クレジットカード決済 */ | |
| 45 | + $have_continue_charge = usces_have_continue_charge( $cart ); | |
| 46 | + $acting_opts = $usces->options['acting_settings']['remise']; | |
| 47 | + $usces->save_order_acting_data( $rand ); | |
| 48 | + usces_save_order_acting_data( $rand ); | |
| 49 | + $member = $usces->get_member(); | |
| 50 | + $send_url = ( 'public' == $acting_opts['card_pc_ope'] ) ? $acting_opts['send_url_pc'] : $acting_opts['send_url_pc_test']; | |
| 51 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 52 | + <input type="hidden" name="SHOPCO" value="' . esc_attr( $acting_opts['SHOPCO'] ) . '" /> | |
| 53 | + <input type="hidden" name="HOSTID" value="' . esc_attr( $acting_opts['HOSTID'] ) . '" /> | |
| 54 | + <input type="hidden" name="REMARKS3" value="' . $acting_opts['REMARKS3'] . '" /> | |
| 55 | + <input type="hidden" name="S_TORIHIKI_NO" value="' . $rand . '" /> | |
| 56 | + <input type="hidden" name="JOB" value="' . apply_filters( 'usces_filter_remise_card_job', $acting_opts['card_jb'] ) . '" /> | |
| 57 | + <input type="hidden" name="MAIL" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /> | |
| 58 | + <input type="hidden" name="ITEM" value="' . apply_filters( 'usces_filter_remise_card_item', '0000120' ) . '" /> | |
| 59 | + <input type="hidden" name="TOTAL" value="' . usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ) . '" /> | |
| 60 | + <input type="hidden" name="AMOUNT" value="' . usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ) . '" /> | |
| 61 | + <input type="hidden" name="RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_card&acting_return=1" /> | |
| 62 | + <input type="hidden" name="NG_RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_card&acting_return=0" /> | |
| 63 | + <input type="hidden" name="EXITURL" value="' . USCES_CART_URL . $usces->delim . 'confirm=1" />'; | |
| 64 | + if ( 'on' == $acting_opts['payquick'] && $usces->is_member_logged_in() ) { | |
| 65 | + $pcid = $usces->get_member_meta_value( 'remise_pcid', $member['ID'] ); | |
| 66 | + $html .= '<input type="hidden" name="PAYQUICK" value="1">'; | |
| 67 | + if ( null != $pcid ) { | |
| 68 | + $html .= '<input type="hidden" name="PAYQUICKID" value="' . $pcid . '">'; | |
| 69 | + } | |
| 70 | + } | |
| 71 | + if ( 'on' == $acting_opts['howpay'] && isset( $usces_entries['order']['div'] ) && '0' !== $usces_entries['order']['div'] && ! $have_continue_charge ) { | |
| 72 | + $html .= '<input type="hidden" name="div" value="' . $usces_entries['order']['div'] . '">'; | |
| 73 | + switch ( $usces_entries['order']['div'] ) { | |
| 74 | + case '1': | |
| 75 | + $html .= '<input type="hidden" name="METHOD" value="61">'; | |
| 76 | + $html .= '<input type="hidden" name="PTIMES" value="2">'; | |
| 77 | + break; | |
| 78 | + case '2': | |
| 79 | + $html .= '<input type="hidden" name="METHOD" value="80">'; | |
| 80 | + break; | |
| 81 | + } | |
| 82 | + } else { | |
| 83 | + $html .= '<input type="hidden" name="div" value="0">'; | |
| 84 | + $html .= '<input type="hidden" name="METHOD" value="10">'; | |
| 85 | + } | |
| 86 | + if ( $have_continue_charge ) { | |
| 87 | + $frequency = $usces->getItemFrequency( $cart[0]['post_id'] ); | |
| 88 | + $nextdate = current_time( 'mysql' ); | |
| 89 | + $kana = ( ! empty( $usces_entries['customer']['name3'] ) ) ? $usces_entries['customer']['name3'] : ''; | |
| 90 | + if ( ! empty( $usces_entries['customer']['name4'] ) ) { | |
| 91 | + $kana .= $usces_entries['customer']['name4']; | |
| 92 | + } | |
| 93 | + if ( ! empty( $kana ) ) { | |
| 94 | + $kana = str_replace( '・', '', str_replace( ' ', '', mb_convert_kana( $kana, 'KVC', 'UTF-8' ) ) ); | |
| 95 | + $kana = mb_substr( $kana, 0, 20, 'UTF-8' ); | |
| 96 | + mb_regex_encoding( 'UTF-8' ); | |
| 97 | + if ( ! mb_ereg( '^[ァ-ヶー]+$', $kana ) ) { | |
| 98 | + $kana = ''; | |
| 99 | + } | |
| 100 | + } | |
| 101 | + $html .= ' | |
| 102 | + <input type="hidden" name="AUTOCHARGE" value="1"> | |
| 103 | + <input type="hidden" name="AC_S_KAIIN_NO" value="' . $member['ID'] . '"> | |
| 104 | + <input type="hidden" name="AC_NAME" value=""> | |
| 105 | + <input type="hidden" name="AC_KANA" value="' . esc_attr( $kana ) . '"> | |
| 106 | + <input type="hidden" name="AC_TEL" value="' . esc_attr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ) ) . '"> | |
| 107 | + <input type="hidden" name="AC_AMOUNT" value="' . $usces_entries['order']['total_full_price'] . '"> | |
| 108 | + <input type="hidden" name="AC_TOTAL" value="' . $usces_entries['order']['total_full_price'] . '"> | |
| 109 | + <input type="hidden" name="AC_NEXT_DATE" value="' . date( 'Ymd', dlseller_first_charging( $cart[0]['post_id'], 'time' ) ) . '"> | |
| 110 | + <input type="hidden" name="AC_INTERVAL" value="' . $frequency . 'M">'; | |
| 111 | + } | |
| 112 | + $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 113 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 114 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 115 | + $html .= '</form>'; | |
| 116 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 117 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 118 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 119 | + $html .= '</form>'; | |
| 120 | + break; | |
| 121 | + | |
| 122 | + case 'acting_remise_conv': /* ルミーズ マルチ決済 */ | |
| 123 | + if ( function_exists( 'mb_strlen' ) ) { | |
| 124 | + $biko = ( 22 < mb_strlen( $usces_entries['order']['note'], 'UTF-8' ) ) ? ( mb_substr( $usces_entries['order']['note'], 0, 22, 'UTF-8' ) . '...' ) : $usces_entries['order']['note']; | |
| 125 | + } else { | |
| 126 | + $biko = ( 44 < strlen( $usces_entries['order']['note'] ) ) ? ( substr( $usces_entries['order']['note'], 0, 44 ) . '...' ) : $usces_entries['order']['note']; | |
| 127 | + } | |
| 128 | + $datestr = get_date_from_gmt( gmdate( 'Y-m-d H:i:s', time() ) ); | |
| 129 | + $acting_opts = $usces->options['acting_settings']['remise']; | |
| 130 | + $usces->save_order_acting_data( $rand ); | |
| 131 | + usces_save_order_acting_data( $rand ); | |
| 132 | + $send_url = ( 'public' == $acting_opts['conv_pc_ope'] ) ? $acting_opts['send_url_cvs_pc'] : $acting_opts['send_url_cvs_pc_test']; | |
| 133 | + $kana1 = ( ! empty( $usces_entries['customer']['name3'] ) ) ? $usces_entries['customer']['name3'] : ''; | |
| 134 | + if ( ! empty( $kana1 ) ) { | |
| 135 | + $kana1 = str_replace( '・', '', str_replace( ' ', '', mb_convert_kana( $kana1, 'KVC', 'UTF-8' ) ) ); | |
| 136 | + $kana1 = mb_substr( $kana1, 0, 20, 'UTF-8' ); | |
| 137 | + mb_regex_encoding( 'UTF-8' ); | |
| 138 | + if ( ! mb_ereg( '^[ァ-ヶー]+$', $kana1 ) ) { | |
| 139 | + $kana1 = ''; | |
| 140 | + } | |
| 141 | + } | |
| 142 | + $kana2 = ( ! empty( $usces_entries['customer']['name4'] ) ) ? $usces_entries['customer']['name4'] : ''; | |
| 143 | + if ( ! empty( $kana2 ) ) { | |
| 144 | + $kana2 = str_replace( '・', '', str_replace( ' ', '', mb_convert_kana( $kana2, 'KVC', 'UTF-8' ) ) ); | |
| 145 | + $kana2 = mb_substr( $kana2, 0, 20, 'UTF-8' ); | |
| 146 | + mb_regex_encoding( 'UTF-8' ); | |
| 147 | + if ( ! mb_ereg( '^[ァ-ヶー]+$', $kana2 ) ) { | |
| 148 | + $kana2 = ''; | |
| 149 | + } | |
| 150 | + } | |
| 151 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 152 | + <input type="hidden" name="SHOPCO" value="' . esc_attr( $acting_opts['SHOPCO'] ) . '" /> | |
| 153 | + <input type="hidden" name="HOSTID" value="' . esc_attr( $acting_opts['HOSTID'] ) . '" /> | |
| 154 | + <input type="hidden" name="REMARKS3" value="' . $acting_opts['REMARKS3'] . '" /> | |
| 155 | + <input type="hidden" name="S_TORIHIKI_NO" value="' . $rand . '" /> | |
| 156 | + <input type="hidden" name="NAME1" value="' . esc_attr( mb_substr( $usces_entries['customer']['name1'], 0, 20, 'UTF-8' ) ) . '" /> | |
| 157 | + <input type="hidden" name="NAME2" value="' . esc_attr( mb_substr( $usces_entries['customer']['name2'], 0, 20, 'UTF-8' ) ) . '" /> | |
| 158 | + <input type="hidden" name="KANA1" value="' . esc_attr( $kana1 ) . '" /> | |
| 159 | + <input type="hidden" name="KANA2" value="' . esc_attr( $kana2 ) . '" /> | |
| 160 | + <input type="hidden" name="YUBIN1" value="' . esc_attr( substr( str_replace( '-', '', $usces_entries['customer']['zipcode'] ), 0, 3 ) ) . '" /> | |
| 161 | + <input type="hidden" name="YUBIN2" value="' . esc_attr( substr( str_replace( '-', '', $usces_entries['customer']['zipcode'] ), 3, 4 ) ) . '" /> | |
| 162 | + <input type="hidden" name="ADD1" value="' . esc_attr( $usces_entries['customer']['pref'] . $usces_entries['customer']['address1'] ) . '" /> | |
| 163 | + <input type="hidden" name="ADD2" value="' . esc_attr( $usces_entries['customer']['address2'] ) . '" /> | |
| 164 | + <input type="hidden" name="ADD3" value="' . esc_attr( $usces_entries['customer']['address3'] ) . '" /> | |
| 165 | + <input type="hidden" name="TEL" value="' . esc_attr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ) ) . '" /> | |
| 166 | + <input type="hidden" name="MAIL" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /> | |
| 167 | + <input type="hidden" name="TOTAL" value="' . $usces_entries['order']['total_full_price'] . '" /> | |
| 168 | + <input type="hidden" name="TAX" value="" /> | |
| 169 | + <input type="hidden" name="S_PAYDATE" value="' . date( 'Ymd', mktime( 0, 0, 0, (int) substr( $datestr, 5, 2 ), (int) substr( $datestr, 8, 2 ) + (int) $acting_opts['S_PAYDATE'], (int) substr( $datestr, 0, 4 ) ) ) . '" /> | |
| 170 | + <input type="hidden" name="SEIYAKUDATE" value="' . date( 'Ymd', mktime( 0, 0, 0, (int) substr( $datestr, 5, 2 ), (int) substr( $datestr, 8, 2 ), (int) substr( $datestr, 0, 4 ) ) ) . '" /> | |
| 171 | + <input type="hidden" name="BIKO" value="' . esc_attr( $biko ) . '" />'; | |
| 172 | + | |
| 173 | + $mname_01 = '商品総額'; | |
| 174 | + $html .= '<input type="hidden" name="MNAME_01" value="' . $mname_01 . '" /> | |
| 175 | + <input type="hidden" name="MSUM_01" value="' . usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ) . '" /> | |
| 176 | + <input type="hidden" name="MNAME_02" value="" /> | |
| 177 | + <input type="hidden" name="MSUM_02" value="0" /> | |
| 178 | + <input type="hidden" name="MNAME_03" value="" /> | |
| 179 | + <input type="hidden" name="MSUM_03" value="0" /> | |
| 180 | + <input type="hidden" name="MNAME_04" value="" /> | |
| 181 | + <input type="hidden" name="MSUM_04" value="0" /> | |
| 182 | + <input type="hidden" name="MNAME_05" value="" /> | |
| 183 | + <input type="hidden" name="MSUM_05" value="0" /> | |
| 184 | + <input type="hidden" name="MNAME_06" value="" /> | |
| 185 | + <input type="hidden" name="MSUM_06" value="0" /> | |
| 186 | + <input type="hidden" name="MNAME_07" value="" /> | |
| 187 | + <input type="hidden" name="MSUM_07" value="0" />'; | |
| 188 | + | |
| 189 | + $html .= '<input type="hidden" name="RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_conv&acting_return=1" /> | |
| 190 | + <input type="hidden" name="NG_RETURL" value="' . USCES_CART_URL . $usces->delim . 'acting=remise_conv&acting_return=0" /> | |
| 191 | + <input type="hidden" name="OPT" value="1" /> | |
| 192 | + <input type="hidden" name="EXITURL" value="' . USCES_CART_URL . $usces->delim . 'confirm=1" />'; | |
| 193 | + $html .= ' | |
| 194 | + <input type="hidden" name="dummy" value="�" /> | |
| 195 | + <div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 196 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 197 | + $html .= '</form>'; | |
| 198 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 199 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 200 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 201 | + $html .= '</form>'; | |
| 202 | + break; | |
| 203 | + | |
| 204 | + case 'acting_jpayment_card': /* ROBOT PAYMENT クレジット決済(旧J-Payment、旧クラウドペイメント) */ | |
| 205 | + $acting_opts = $usces->options['acting_settings']['jpayment']; | |
| 206 | + $usces->save_order_acting_data( $rand ); | |
| 207 | + usces_save_order_acting_data( $rand ); | |
| 208 | + $itemname = $usces->getItemName( $cart[0]['post_id'] ); | |
| 209 | + if ( 1 < $cart_count ) { | |
| 210 | + $itemname .= ',' . __( 'Others', 'usces' ); | |
| 211 | + } | |
| 212 | + if ( 50 < mb_strlen( $itemname, 'UTF-8' ) ) { | |
| 213 | + $itemname = mb_substr( $itemname, 0, 50, 'UTF-8' ) . '...'; | |
| 214 | + } | |
| 215 | + $quantity = 0; | |
| 216 | + foreach ( $cart as $cart_row ) { | |
| 217 | + $quantity += $cart_row['quantity']; | |
| 218 | + } | |
| 219 | + $desc = $itemname . ' ' . __( 'Quantity', 'usces' ) . ':' . $quantity; | |
| 220 | + | |
| 221 | + $tx = ( 'exclude' == $usces->options['tax_mode'] ) ? $usces_entries['order']['tax'] : 0; | |
| 222 | + $sf = ( ! empty( $usces_entries['order']['shipping_charge'] ) ) ? $usces_entries['order']['shipping_charge'] : 0; | |
| 223 | + $am = $usces_entries['order']['total_full_price'] - $tx - $sf; | |
| 224 | + if ( 0 > $am ) { | |
| 225 | + $tx = 0; | |
| 226 | + $sf = 0; | |
| 227 | + $am = $usces_entries['order']['total_full_price']; | |
| 228 | + } | |
| 229 | + | |
| 230 | + $purchase_html = '<form id="purchase_form" name="purchase_form" action="' . $acting_opts['send_url'] . '" method="post" onKeyDown="if(event.keyCode == 13) {return false;}" > | |
| 231 | + <input type="hidden" name="aid" value="' . $acting_opts['aid'] . '" /> | |
| 232 | + <input type="hidden" name="cod" value="' . $rand . '" /> | |
| 233 | + <input type="hidden" name="jb" value="' . $acting_opts['card_jb'] . '" /> | |
| 234 | + <input type="hidden" name="am" value="' . $am . '" /> | |
| 235 | + <input type="hidden" name="tx" value="' . $tx . '" /> | |
| 236 | + <input type="hidden" name="sf" value="' . $sf . '" /> | |
| 237 | + <input type="hidden" name="pt" value="1" /> | |
| 238 | + <input type="hidden" name="inm" value="' . esc_attr( $desc ) . '" /> | |
| 239 | + <input type="hidden" name="pn" value="' . esc_attr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ) ) . '" /> | |
| 240 | + <input type="hidden" name="em" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /> | |
| 241 | + <input type="hidden" name="acting" value="jpayment_card" /> | |
| 242 | + <input type="hidden" name="acting_return" value="1" /> | |
| 243 | + <input type="hidden" name="page_id" value="' . USCES_CART_NUMBER . '" /> | |
| 244 | + '; | |
| 245 | + $purchase_html .= '<div class="send"><input name="purchase_jpayment" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', null ) . $purchase_disabled . ' /></div>'; | |
| 246 | + $html .= apply_filters( 'usces_filter_confirm_inform', $purchase_html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 247 | + $html .= '</form>'; | |
| 248 | + $purchase_html = '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if(event.keyCode == 13) {return false;}"> | |
| 249 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 250 | + $html .= apply_filters( 'usces_filter_confirm_inform_back', $purchase_html ); | |
| 251 | + $html .= '</form>'; | |
| 252 | + break; | |
| 253 | + | |
| 254 | + case 'acting_jpayment_conv': /* ROBOT PAYMENT コンビニ・ペーパーレス決済(旧J-Payment、旧クラウドペイメント) */ | |
| 255 | + $acting_opts = $usces->options['acting_settings']['jpayment']; | |
| 256 | + $usces->save_order_acting_data( $rand ); | |
| 257 | + usces_save_order_acting_data( $rand ); | |
| 258 | + $itemname = $usces->getItemName( $cart[0]['post_id'] ); | |
| 259 | + if ( 1 < $cart_count ) { | |
| 260 | + $itemname .= ',' . __( 'Others', 'usces' ); | |
| 261 | + } | |
| 262 | + if ( 50 < mb_strlen( $itemname, 'UTF-8' ) ) { | |
| 263 | + $itemname = mb_substr( $itemname, 0, 50, 'UTF-8' ) . '...'; | |
| 264 | + } | |
| 265 | + $quantity = 0; | |
| 266 | + foreach ( $cart as $cart_row ) { | |
| 267 | + $quantity += $cart_row['quantity']; | |
| 268 | + } | |
| 269 | + $desc = $itemname . ' ' . __( 'Quantity', 'usces' ) . ':' . $quantity; | |
| 270 | + | |
| 271 | + $tx = ( 'exclude' == $usces->options['tax_mode'] ) ? $usces_entries['order']['tax'] : 0; | |
| 272 | + $sf = ( ! empty( $usces_entries['order']['shipping_charge'] ) ) ? $usces_entries['order']['shipping_charge'] : 0; | |
| 273 | + $am = $usces_entries['order']['total_full_price'] - $tx - $sf; | |
| 274 | + if ( 0 > $am ) { | |
| 275 | + $tx = 0; | |
| 276 | + $sf = 0; | |
| 277 | + $am = $usces_entries['order']['total_full_price']; | |
| 278 | + } | |
| 279 | + | |
| 280 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . $acting_opts['send_url'] . '" method="post" onKeyDown="if(event.keyCode == 13) {return false;}" > | |
| 281 | + <input type="hidden" name="aid" value="' . $acting_opts['aid'] . '" /> | |
| 282 | + <input type="hidden" name="cod" value="' . $rand . '" /> | |
| 283 | + <input type="hidden" name="jb" value="CAPTURE" /> | |
| 284 | + <input type="hidden" name="am" value="' . $am . '" /> | |
| 285 | + <input type="hidden" name="tx" value="' . $tx . '" /> | |
| 286 | + <input type="hidden" name="sf" value="' . $sf . '" /> | |
| 287 | + <input type="hidden" name="pt" value="2" /> | |
| 288 | + <input type="hidden" name="inm" value="' . esc_attr( $desc ) . '" /> | |
| 289 | + <input type="hidden" name="pn" value="' . esc_attr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ) ) . '" /> | |
| 290 | + <input type="hidden" name="em" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /> | |
| 291 | + <input type="hidden" name="acting" value="jpayment_conv" /> | |
| 292 | + <input type="hidden" name="acting_return" value="1" /> | |
| 293 | + <input type="hidden" name="page_id" value="' . USCES_CART_NUMBER . '" /> | |
| 294 | + '; | |
| 295 | + $html .= '<div class="send"><input name="purchase_jpayment" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', null ) . $purchase_disabled . ' /></div>'; | |
| 296 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 297 | + $html .= '</form>'; | |
| 298 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if(event.keyCode == 13) {return false;}"> | |
| 299 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 300 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 301 | + $html .= '</form>'; | |
| 302 | + break; | |
| 303 | + | |
| 304 | + case 'acting_jpayment_bank': /* ROBOT PAYMENT バンクチェック決済(旧J-Payment、旧クラウドペイメント) */ | |
| 305 | + $acting_opts = $usces->options['acting_settings']['jpayment']; | |
| 306 | + $usces->save_order_acting_data( $rand ); | |
| 307 | + usces_save_order_acting_data( $rand ); | |
| 308 | + $itemname = $usces->getItemName( $cart[0]['post_id'] ); | |
| 309 | + if ( 1 < $cart_count ) { | |
| 310 | + $itemname .= ',' . __( 'Others', 'usces' ); | |
| 311 | + } | |
| 312 | + if ( 50 < mb_strlen( $itemname, 'UTF-8' ) ) { | |
| 313 | + $itemname = mb_substr( $itemname, 0, 50, 'UTF-8' ) . '...'; | |
| 314 | + } | |
| 315 | + $quantity = 0; | |
| 316 | + foreach ( $cart as $cart_row ) { | |
| 317 | + $quantity += $cart_row['quantity']; | |
| 318 | + } | |
| 319 | + $desc = $itemname . ' ' . __( 'Quantity', 'usces' ) . ':' . $quantity; | |
| 320 | + | |
| 321 | + $tx = ( 'exclude' == $usces->options['tax_mode'] ) ? $usces_entries['order']['tax'] : 0; | |
| 322 | + $sf = ( ! empty( $usces_entries['order']['shipping_charge'] ) ) ? $usces_entries['order']['shipping_charge'] : 0; | |
| 323 | + $am = $usces_entries['order']['total_full_price'] - $tx - $sf; | |
| 324 | + if ( 0 > $am ) { | |
| 325 | + $tx = 0; | |
| 326 | + $sf = 0; | |
| 327 | + $am = $usces_entries['order']['total_full_price']; | |
| 328 | + } | |
| 329 | + | |
| 330 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . $acting_opts['send_url'] . '" method="post" onKeyDown="if(event.keyCode == 13) {return false;}" > | |
| 331 | + <input type="hidden" name="aid" value="' . $acting_opts['aid'] . '" /> | |
| 332 | + <input type="hidden" name="cod" value="' . $rand . '" /> | |
| 333 | + <input type="hidden" name="jb" value="CAPTURE" /> | |
| 334 | + <input type="hidden" name="am" value="' . $am . '" /> | |
| 335 | + <input type="hidden" name="tx" value="' . $tx . '" /> | |
| 336 | + <input type="hidden" name="sf" value="' . $sf . '" /> | |
| 337 | + <input type="hidden" name="pt" value="7" /> | |
| 338 | + <input type="hidden" name="inm" value="' . esc_attr( $desc ) . '" /> | |
| 339 | + <input type="hidden" name="pn" value="' . esc_attr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ) ) . '" /> | |
| 340 | + <input type="hidden" name="em" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" /> | |
| 341 | + <input type="hidden" name="acting" value="jpayment_bank" /> | |
| 342 | + <input type="hidden" name="acting_return" value="1" /> | |
| 343 | + <input type="hidden" name="page_id" value="' . USCES_CART_NUMBER . '" /> | |
| 344 | + '; | |
| 345 | + $html .= '<div class="send"><input name="purchase_jpayment" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', null ) . $purchase_disabled . ' /></div>'; | |
| 346 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 347 | + $html .= '</form>'; | |
| 348 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if(event.keyCode == 13) {return false;}"> | |
| 349 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 350 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 351 | + $html .= '</form>'; | |
| 352 | + break; | |
| 353 | + | |
| 354 | + case 'acting_telecom_card': /* テレコムクレジット カード決済 */ | |
| 355 | + usces_save_order_acting_data( $rand ); | |
| 356 | + $acting_opts = $usces->options['acting_settings']['telecom']; | |
| 357 | + $member = $usces->get_member(); | |
| 358 | + if ( empty( $member['ID'] ) || 'on' != $acting_opts['oneclick'] ) { | |
| 359 | + $memid = ( ! empty( $member['ID'] ) ) ? $member['ID'] : 99999999; | |
| 360 | + $send_url = $acting_opts['send_url']; | |
| 361 | + } else { | |
| 362 | + $memid = $member['ID']; | |
| 363 | + $oneclick = $usces->get_member_meta_value( 'telecom_oneclick', $member['ID'] ); | |
| 364 | + if ( null != $oneclick ) { | |
| 365 | + $send_url = $acting_opts['oneclick_send_url']; | |
| 366 | + } else { | |
| 367 | + $send_url = $acting_opts['send_url']; | |
| 368 | + } | |
| 369 | + } | |
| 370 | + $money = ( '$' == usces_get_cr_symbol() ) ? '$' : ''; | |
| 371 | + $money .= usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ); | |
| 372 | + $tel = str_replace( '-', '', $usces_entries['customer']['tel'] ); | |
| 373 | + $redirect_url = USCES_CART_URL . $usces->delim . 'acting=telecom_card&acting_return=1&result=1&option=' . $rand; | |
| 374 | + $redirect_back_url = USCES_CART_URL . $usces->delim . 'confirm=1'; | |
| 375 | + $html .= '<form id="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 376 | + <input type="hidden" name="clientip" value="' . $acting_opts['clientip'] . '"> | |
| 377 | + <input type="hidden" name="money" value="' . apply_filters( 'usces_filter_acting_amount', $money, $acting_flag ) . '"> | |
| 378 | + <input type="hidden" name="sendid" value="' . $memid . '"> | |
| 379 | + <input type="hidden" name="usrtel" value="' . $tel . '"> | |
| 380 | + <input type="hidden" name="usrmail" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '"> | |
| 381 | + <input type="hidden" name="redirect_url" value="' . $redirect_url . '"> | |
| 382 | + <input type="hidden" name="redirect_back_url" value="' . $redirect_back_url . '"> | |
| 383 | + <input type="hidden" name="option" value="' . $rand . '">'; | |
| 384 | + | |
| 385 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', null ) . $purchase_disabled . ' /></div>'; | |
| 386 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 387 | + $html .= '</form>'; | |
| 388 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 389 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 390 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 391 | + $html .= '</form>'; | |
| 392 | + break; | |
| 393 | + | |
| 394 | + case 'acting_telecom_edy': /* テレコムクレジット Edy決済 */ | |
| 395 | + usces_save_order_acting_data( $rand ); | |
| 396 | + $acting_opts = $usces->options['acting_settings']['telecom']; | |
| 397 | + $member = $usces->get_member(); | |
| 398 | + $memid = empty( $member['ID'] ) ? 99999999 : $member['ID']; | |
| 399 | + $money = ( '$' == usces_get_cr_symbol() ) ? '$' : ''; | |
| 400 | + $money .= usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ); | |
| 401 | + $redirect_back_url = USCES_CART_URL . $usces->delim . 'acting=telecom_edy&acting_return=1®_order=1'; | |
| 402 | + $html .= '<form id="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 403 | + <input type="hidden" name="clientip" value="' . $acting_opts['clientip'] . '"> | |
| 404 | + <input type="hidden" name="sendid" value="' . $memid . '"> | |
| 405 | + <input type="hidden" name="money" value="' . apply_filters( 'usces_filter_acting_amount', $money, $acting_flag ) . '"> | |
| 406 | + <input type="hidden" name="redirect_back_url" value="' . $redirect_back_url . '"> | |
| 407 | + <input type="hidden" name="option" value="' . $rand . '">'; | |
| 408 | + | |
| 409 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', null ) . $purchase_disabled . ' /></div>'; | |
| 410 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 411 | + $html .= '</form>'; | |
| 412 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 413 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 414 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 415 | + $html .= '</form>'; | |
| 416 | + break; | |
| 417 | + | |
| 418 | + case 'acting_digitalcheck_card': /* ペイメントフォー カード決済(旧メタップスペイメント、旧デジタルチェック、旧ペイデザイン) */ | |
| 419 | + $acting_opts = $usces->options['acting_settings']['digitalcheck']; | |
| 420 | + $sid = uniqid(); | |
| 421 | + $usces->save_order_acting_data( $sid ); | |
| 422 | + usces_save_order_acting_data( $sid ); | |
| 423 | + $member = $usces->get_member(); | |
| 424 | + if ( 'on' == $acting_opts['card_user_id'] && $usces->is_member_logged_in() ) { | |
| 425 | + $ip_user_id = $usces->get_member_meta_value( 'digitalcheck_ip_user_id', $member['ID'] ); | |
| 426 | + if ( empty( $ip_user_id ) ) { | |
| 427 | + $ip_user_id = $member['ID']; | |
| 428 | + $send_url = $acting_opts['send_url_card']; | |
| 429 | + $fuka = $acting_flag . $ip_user_id; | |
| 430 | + } else { | |
| 431 | + $send_url = USCES_CART_URL; | |
| 432 | + $fuka = $acting_flag; | |
| 433 | + } | |
| 434 | + } else { | |
| 435 | + $ip_user_id = false; | |
| 436 | + $send_url = $acting_opts['send_url_card']; | |
| 437 | + $fuka = $acting_flag; | |
| 438 | + } | |
| 439 | + $item_name = $usces->getItemName( $cart[0]['post_id'] ); | |
| 440 | + if ( 1 < $cart_count ) { | |
| 441 | + $item_name .= ',' . __( 'Others', 'usces' ); | |
| 442 | + } | |
| 443 | + if ( 22 < mb_strlen( $item_name ) ) { | |
| 444 | + $item_name = mb_strimwidth( $item_name, 0, 44, '...', 'UTF-8' ); | |
| 445 | + } | |
| 446 | + $kakutei = ( empty( $acting_opts['card_kakutei'] ) ) ? '0' : $acting_opts['card_kakutei']; | |
| 447 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 448 | + <input type="hidden" name="IP" value="' . $acting_opts['card_ip'] . '" /> | |
| 449 | + <input type="hidden" name="SID" value="' . $sid . '" /> | |
| 450 | + <input type="hidden" name="N1" value="' . esc_attr( $item_name ) . '"> | |
| 451 | + <input type="hidden" name="K1" value="' . usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ) . '"> | |
| 452 | + <input type="hidden" name="FUKA" value="' . $fuka . '" /> | |
| 453 | + <input type="hidden" name="KAKUTEI" value="' . $kakutei . '" /> | |
| 454 | + <input type="hidden" name="STORE" value="51" /> | |
| 455 | + <input type="hidden" name="NAME1" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name1'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 456 | + <input type="hidden" name="NAME2" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name2'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 457 | + <input type="hidden" name="KANA1" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name3'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 458 | + <input type="hidden" name="KANA2" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name4'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 459 | + <input type="hidden" name="YUBIN1" value="' . esc_attr( substr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['zipcode'], 'a', 'UTF-8' ) ), 0, 7 ) ) . '" /> | |
| 460 | + <input type="hidden" name="TEL" value="' . esc_attr( substr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ), 0, 11 ) ) . '" /> | |
| 461 | + <input type="hidden" name="ADR1" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['pref'] . $usces_entries['customer']['address1'] . $usces_entries['customer']['address2'], 0, 50, '', 'UTF-8' ) ) . '" /> | |
| 462 | + <input type="hidden" name="ADR2" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['address3'], 0, 50, '', 'UTF-8' ) ) . '" /> | |
| 463 | + <input type="hidden" name="MAIL" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" />'; | |
| 464 | + if ( $ip_user_id ) { | |
| 465 | + $html .= '<input type="hidden" name="PASS" value="' . $acting_opts['card_pass'] . '"> | |
| 466 | + <input type="hidden" name="IP_USER_ID" value="' . $ip_user_id . '">'; | |
| 467 | + } | |
| 468 | + if ( $usces->use_ssl ) { | |
| 469 | + $ssl_url = $usces->options['ssl_url'] . '/?page_id=' . USCES_CART_NUMBER; | |
| 470 | + $html .= '<input type="hidden" name="OKURL" value="' . $ssl_url . $usces->delim . 'acting=digitalcheck_card&acting_return=1" /> | |
| 471 | + <input type="hidden" name="RT" value="' . $ssl_url . $usces->delim . 'acting=digitalcheck_card&confirm=1" />'; | |
| 472 | + } else { | |
| 473 | + $html .= '<input type="hidden" name="OKURL" value="' . USCES_CART_URL . $usces->delim . 'acting=digitalcheck_card&acting_return=1" /> | |
| 474 | + <input type="hidden" name="RT" value="' . USCES_CART_URL . $usces->delim . 'acting=digitalcheck_card&confirm=1" />'; | |
| 475 | + } | |
| 476 | + $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 477 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 478 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $sid, $purchase_disabled ); | |
| 479 | + $html .= '</form>'; | |
| 480 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 481 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 482 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 483 | + $html .= '</form>'; | |
| 484 | + break; | |
| 485 | + | |
| 486 | + case 'acting_digitalcheck_conv': /* ペイメントフォー コンビニ決済(旧メタップスペイメント、旧デジタルチェック、旧ペイデザイン) */ | |
| 487 | + $acting_opts = $usces->options['acting_settings']['digitalcheck']; | |
| 488 | + $sid = uniqid(); | |
| 489 | + $usces->save_order_acting_data( $sid ); | |
| 490 | + usces_save_order_acting_data( $sid ); | |
| 491 | + $item_name = $usces->getItemName( $cart[0]['post_id'] ); | |
| 492 | + if ( 1 < $cart_count ) { | |
| 493 | + $item_name .= ',' . __( 'Others', 'usces' ); | |
| 494 | + } | |
| 495 | + if ( 22 < mb_strlen( $item_name ) ) { | |
| 496 | + $item_name = mb_strimwidth( $item_name, 0, 44, '...', 'UTF-8' ); | |
| 497 | + } | |
| 498 | + $today = wp_date( 'Y-m-d' ); | |
| 499 | + list( $year, $month, $day ) = explode( '-', $today ); | |
| 500 | + $kigen = date( 'Ymd', mktime( 0, 0, 0, (int) $month, (int) $day + (int) $acting_opts['conv_kigen'], (int) $year ) ); | |
| 501 | + $conv_store = ( isset( $acting_opts['conv_store'] ) && is_array( $acting_opts['conv_store'] ) ) ? $acting_opts['conv_store'] : array(); | |
| 502 | + $store = ( 1 == count( $conv_store ) ) ? $conv_store[0] : '99'; | |
| 503 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 504 | + <input type="hidden" name="IP" value="' . $acting_opts['conv_ip'] . '" /> | |
| 505 | + <input type="hidden" name="SID" value="' . $sid . '" /> | |
| 506 | + <input type="hidden" name="N1" value="' . esc_attr( $item_name ) . '"> | |
| 507 | + <input type="hidden" name="K1" value="' . usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ) . '"> | |
| 508 | + <input type="hidden" name="STORE" value="' . $store . '" /> | |
| 509 | + <input type="hidden" name="FUKA" value="' . $acting_flag . '" /> | |
| 510 | + <input type="hidden" name="KIGEN" value="' . $kigen . '" /> | |
| 511 | + <input type="hidden" name="NAME1" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name1'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 512 | + <input type="hidden" name="NAME2" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name2'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 513 | + <input type="hidden" name="KANA1" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name3'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 514 | + <input type="hidden" name="KANA2" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['name4'], 0, 20, '', 'UTF-8' ) ) . '" /> | |
| 515 | + <input type="hidden" name="YUBIN1" value="' . esc_attr( substr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['zipcode'], 'a', 'UTF-8' ) ), 0, 7 ) ) . '" /> | |
| 516 | + <input type="hidden" name="TEL" value="' . esc_attr( substr( str_replace( '-', '', mb_convert_kana( $usces_entries['customer']['tel'], 'a', 'UTF-8' ) ), 0, 11 ) ) . '" /> | |
| 517 | + <input type="hidden" name="ADR1" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['pref'] . $usces_entries['customer']['address1'] . $usces_entries['customer']['address2'], 0, 50, '', 'UTF-8' ) ) . '" /> | |
| 518 | + <input type="hidden" name="ADR2" value="' . esc_attr( mb_strimwidth( $usces_entries['customer']['address3'], 0, 50, '', 'UTF-8' ) ) . '" /> | |
| 519 | + <input type="hidden" name="MAIL" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '" />'; | |
| 520 | + if ( $usces->use_ssl ) { | |
| 521 | + $ssl_url = $usces->options['ssl_url'] . '/?page_id=' . USCES_CART_NUMBER; | |
| 522 | + $html .= '<input type="hidden" name="OKURL" value="' . $ssl_url . $usces->delim . 'acting=digitalcheck_conv&acting_return=1" /> | |
| 523 | + <input type="hidden" name="RT" value="' . $ssl_url . $usces->delim . 'acting=digitalcheck_conv&confirm=1" />'; | |
| 524 | + } else { | |
| 525 | + $html .= '<input type="hidden" name="OKURL" value="' . USCES_CART_URL . $usces->delim . 'acting=digitalcheck_conv&acting_return=1" /> | |
| 526 | + <input type="hidden" name="RT" value="' . USCES_CART_URL . $usces->delim . 'acting=digitalcheck_conv&confirm=1" />'; | |
| 527 | + } | |
| 528 | + $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 529 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 530 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $sid, $purchase_disabled ); | |
| 531 | + $html .= '</form>'; | |
| 532 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 533 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 534 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 535 | + $html .= '</form>'; | |
| 536 | + break; | |
| 537 | + | |
| 538 | + case 'acting_mizuho_card': /* みずほファクター カード決済 */ | |
| 539 | + $acting_opts = $usces->options['acting_settings']['mizuho']; | |
| 540 | + $send_url = ( 'public' == $acting_opts['ope'] ) ? $acting_opts['send_url'] : $acting_opts['send_url_test']; | |
| 541 | + $p_ver = '0200'; | |
| 542 | + $stdate = wp_date( 'Ymd' ); | |
| 543 | + $stran = usces_rand( 6 ); | |
| 544 | + usces_save_order_acting_data( $stran ); | |
| 545 | + $bkcode = 'bg01'; | |
| 546 | + $amount = apply_filters( 'usces_filter_acting_amount', usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ), $acting_flag ); | |
| 547 | + $schksum = $p_ver . $stdate . $stran . $bkcode . $acting_opts['shopid'] . $acting_opts['cshopid'] . $amount . $acting_opts['hash_pass']; | |
| 548 | + $schksum = htmlspecialchars( md5( $schksum ), ENT_COMPAT ); | |
| 549 | + $html .= '<form id="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="Shift_JIS"> | |
| 550 | + <input type="hidden" name="p_ver" value="' . $p_ver . '"> | |
| 551 | + <input type="hidden" name="stdate" value="' . $stdate . '"> | |
| 552 | + <input type="hidden" name="stran" value="' . $stran . '"> | |
| 553 | + <input type="hidden" name="bkcode" value="' . $bkcode . '"> | |
| 554 | + <input type="hidden" name="shopid" value="' . $acting_opts['shopid'] . '"> | |
| 555 | + <input type="hidden" name="cshopid" value="' . $acting_opts['cshopid'] . '"> | |
| 556 | + <input type="hidden" name="amount" value="' . $amount . '"> | |
| 557 | + <input type="hidden" name="schksum" value="' . $schksum . '">'; | |
| 558 | + $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 559 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 560 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 561 | + $html .= '</form>'; | |
| 562 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 563 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 564 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 565 | + $html .= '</form>'; | |
| 566 | + break; | |
| 567 | + | |
| 568 | + case 'acting_mizuho_conv1': /* みずほファクター コンビニ・ウェルネット決済 */ | |
| 569 | + case 'acting_mizuho_conv2': /* みずほファクター コンビニ・セブンイレブン決済 */ | |
| 570 | + $acting_opts = $usces->options['acting_settings']['mizuho']; | |
| 571 | + $send_url = ( 'public' == $acting_opts['ope'] ) ? $acting_opts['send_url'] : $acting_opts['send_url_test']; | |
| 572 | + $p_ver = '0200'; | |
| 573 | + $stdate = wp_date( 'Ymd' ); | |
| 574 | + $stran = usces_rand( 6 ); | |
| 575 | + usces_save_order_acting_data( $stran ); | |
| 576 | + $bkcode = 'cv0' . substr( $acting_flag, -1 ); | |
| 577 | + $amount = apply_filters( 'usces_filter_acting_amount', usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ), $acting_flag ); | |
| 578 | + $custmkanji = mb_strimwidth( $usces_entries['customer']['name1'] . $usces_entries['customer']['name2'], 0, 40, '', 'UTF-8' ); | |
| 579 | + $mailaddr = esc_attr( $usces_entries['customer']['mailaddress1'] ); | |
| 580 | + $tel = str_replace( '-', '', $usces_entries['customer']['tel'] ); | |
| 581 | + $schksum = $p_ver . $stdate . $stran . $bkcode . $acting_opts['shopid'] . $acting_opts['cshopid'] . $amount . mb_convert_encoding( $custmkanji, 'SJIS', 'UTF-8' ) . $mailaddr . $tel . $acting_opts['hash_pass']; | |
| 582 | + $schksum = htmlspecialchars( md5( $schksum ), ENT_COMPAT ); | |
| 583 | + $html .= '<form id="purchase_form" action="' . $send_url . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 584 | + <input type="hidden" name="p_ver" value="' . $p_ver . '"> | |
| 585 | + <input type="hidden" name="stdate" value="' . $stdate . '"> | |
| 586 | + <input type="hidden" name="stran" value="' . $stran . '"> | |
| 587 | + <input type="hidden" name="bkcode" value="' . $bkcode . '"> | |
| 588 | + <input type="hidden" name="shopid" value="' . $acting_opts['shopid'] . '"> | |
| 589 | + <input type="hidden" name="cshopid" value="' . $acting_opts['cshopid'] . '"> | |
| 590 | + <input type="hidden" name="amount" value="' . $amount . '"> | |
| 591 | + <input type="hidden" name="custmKanji" value="' . $custmkanji . '"> | |
| 592 | + <input type="hidden" name="mailaddr" value="' . $mailaddr . '"> | |
| 593 | + <input type="hidden" name="tel" value="' . $tel . '"> | |
| 594 | + <input type="hidden" name="schksum" value="' . $schksum . '">'; | |
| 595 | + $html .= '<input type="hidden" name="dummy" value="�" />'; | |
| 596 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 597 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 598 | + $html .= '</form>'; | |
| 599 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 600 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 601 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 602 | + $html .= '</form>'; | |
| 603 | + break; | |
| 604 | + | |
| 605 | + case 'acting_anotherlane_card': /* アナザーレーン カード決済 */ | |
| 606 | + $usces->save_order_acting_data( $rand ); | |
| 607 | + usces_save_order_acting_data( $rand ); | |
| 608 | + $acting_opts = $usces->options['acting_settings']['anotherlane']; | |
| 609 | + $amount = apply_filters( 'usces_filter_acting_amount', usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ), $acting_flag ); | |
| 610 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . $acting_opts['send_url'] . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}" accept-charset="UTF-8"> | |
| 611 | + <input type="hidden" name="SiteId" value="' . $acting_opts['siteid'] . '"> | |
| 612 | + <input type="hidden" name="SitePass" value="' . $acting_opts['sitepass'] . '"> | |
| 613 | + <input type="hidden" name="Amount" value="' . $amount . '"> | |
| 614 | + <input type="hidden" name="TransactionId" value=""> | |
| 615 | + <input type="hidden" name="zip" value="' . esc_attr( str_replace( '-', '', $usces_entries['customer']['zipcode'] ) ) . '"> | |
| 616 | + <input type="hidden" name="capital" value="' . esc_attr( $usces_entries['customer']['pref'] ) . '"> | |
| 617 | + <input type="hidden" name="adr1" value="' . esc_attr( $usces_entries['customer']['address1'] ) . '"> | |
| 618 | + <input type="hidden" name="adr2" value="' . esc_attr( $usces_entries['customer']['address2'] ) . '"> | |
| 619 | + <input type="hidden" name="adr3" value="' . esc_attr( $usces_entries['customer']['address3'] ) . '"> | |
| 620 | + <input type="hidden" name="name" value="' . esc_attr( mb_substr( $usces_entries['customer']['name1'] . $usces_entries['customer']['name2'], 0, 25, 'UTF-8' ) ) . '" /> | |
| 621 | + <input type="hidden" name="tel" value="' . esc_attr( str_replace( '-', '', $usces_entries['customer']['tel'] ) ) . '" /> | |
| 622 | + <input type="hidden" name="mail" value="' . esc_attr( $usces_entries['customer']['mailaddress1'] ) . '"> | |
| 623 | + <input type="hidden" name="rand" value="' . $rand . '"> | |
| 624 | + <input type="hidden" name="note" value="' . $rand . '">'; | |
| 625 | + if ( 'on' == $acting_opts['quickcharge'] && $usces->is_member_logged_in() ) { | |
| 626 | + $member = $usces->get_member(); | |
| 627 | + $html .= '<input type="hidden" name="CustomerId" value="' . esc_attr( $member['ID'] ) . '">'; | |
| 628 | + } | |
| 629 | + $html .= '<div class="send"><input name="purchase_ali" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', ' onClick="document.charset=\'Shift_JIS\';"' ) . $purchase_disabled . ' /></div>'; | |
| 630 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 631 | + $html .= '</form>'; | |
| 632 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 633 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 634 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 635 | + $html .= '</form>'; | |
| 636 | + break; | |
| 637 | + | |
| 638 | + case 'acting_veritrans_card': /* ベリトランス カード決済 */ | |
| 639 | + case 'acting_veritrans_conv': /* ベリトランス コンビニ決済 */ | |
| 640 | + $acting_opts = $usces->options['acting_settings']['veritrans']; | |
| 641 | + $usces->save_order_acting_data( $rand ); | |
| 642 | + usces_save_order_acting_data( $rand ); | |
| 643 | + $settlement_type = ( 'acting_veritrans_card' == $acting_flag ) ? '01' : '02'; | |
| 644 | + $amount = apply_filters( 'usces_filter_acting_amount', usces_crform( $usces_entries['order']['total_full_price'], false, false, 'return', false ), $acting_flag ); | |
| 645 | + $ctx = hash_init( 'sha512' ); | |
| 646 | + $str = $acting_opts['merchanthash'] . ',' . $acting_opts['merchant_id'] . ',' . $settlement_type . ',' . $rand . ',' . $amount; | |
| 647 | + hash_update( $ctx, $str ); | |
| 648 | + $hash = hash_final( $ctx, true ); | |
| 649 | + $merchanthash = bin2hex( $hash ); | |
| 650 | + $html .= '<form id="purchase_form" name="purchase_form" action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 651 | + <input type="hidden" name="MERCHANTHASH" value="' . esc_attr( $merchanthash ) . '"> | |
| 652 | + <input type="hidden" name="SETTLEMENT_TYPE" value="' . esc_attr( $settlement_type ) . '"> | |
| 653 | + <input type="hidden" name="ORDER_ID" value="' . esc_attr( $rand ) . '"> | |
| 654 | + <input type="hidden" name="AMOUNT" value="' . esc_attr( $amount ) . '">'; | |
| 655 | + $html .= '<div class="send"><input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . apply_filters( 'usces_filter_confirm_nextbutton', '' ) . $purchase_disabled . ' /></div>'; | |
| 656 | + $html = apply_filters( 'usces_filter_confirm_inform', $html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 657 | + $html .= '</form>'; | |
| 658 | + $html .= '<form action="' . USCES_CART_URL . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 659 | + <div class="send"><input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /></div>'; | |
| 660 | + $html = apply_filters( 'usces_filter_confirm_inform_back', $html ); | |
| 661 | + $html .= '</form>'; | |
| 662 | + break; | |
| 663 | + | |
| 664 | + default: | |
| 665 | + $purchase_html .= '<form id="purchase_form" action="' . apply_filters( 'usces_filter_acting_url', USCES_CART_URL ) . '" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> | |
| 666 | + ' . wp_nonce_field( 'wc_purchase_nonce', 'wc_purchase_nonce', true, false ) . ' | |
| 667 | + <div class="send"> | |
| 668 | + ' . apply_filters( 'usces_filter_confirm_before_backbutton', null, $payments, $acting_flag, $rand ) . ' | |
| 669 | + <input name="backDelivery" type="submit" id="back_button" class="back_to_delivery_button" value="' . __( 'Back', 'usces' ) . '"' . apply_filters( 'usces_filter_confirm_prebutton', null ) . ' /> | |
| 670 | + <input name="purchase" type="submit" id="purchase_button" class="checkout_button" value="' . $checkout_button_value . '"' . $purchase_disabled . ' /></div>'; | |
| 671 | + $html .= apply_filters( 'usces_filter_confirm_inform', $purchase_html, $payments, $acting_flag, $rand, $purchase_disabled ); | |
| 672 | + $html .= '</form>'; | |
| 673 | + } | |
| 674 | +} | |