| 1 |
<?php |
| 2 |
if(isset($this)) |
| 3 |
$usces = &$this; |
| 4 |
|
| 5 |
$payments = usces_get_system_option( 'usces_payment_method', 'sort' ); |
| 6 |
$payments = apply_filters( 'usces_filter_available_payment_method', $payments ); |
| 7 |
foreach ( (array)$payments as $id => $array ) { |
| 8 |
if( !empty( $array['settlement'] ) ){ |
| 9 |
|
| 10 |
switch( $array['settlement'] ){ |
| 11 |
case 'acting_zeus_card': |
| 12 |
$paymod_id = 'zeus'; |
| 13 |
|
| 14 |
if( 'on' != $usces->options['acting_settings'][$paymod_id]['card_activate'] |
| 15 |
|| 'on' != $usces->options['acting_settings'][$paymod_id]['activate'] ) |
| 16 |
continue; |
| 17 |
|
| 18 |
$cnum1 = isset( $_POST['cnum1'] ) ? esc_html($_POST['cnum1']) : ''; |
| 19 |
$cnum2 = isset( $_POST['cnum2'] ) ? esc_html($_POST['cnum2']) : ''; |
| 20 |
$cnum3 = isset( $_POST['cnum3'] ) ? esc_html($_POST['cnum3']) : ''; |
| 21 |
$cnum4 = isset( $_POST['cnum4'] ) ? esc_html($_POST['cnum4']) : ''; |
| 22 |
$securecode = isset( $_POST['securecode'] ) ? esc_html($_POST['securecode']) : ''; |
| 23 |
$expyy = isset( $_POST['expyy'] ) ? esc_html($_POST['expyy']) : ''; |
| 24 |
$expmm = isset( $_POST['expmm'] ) ? esc_html($_POST['expmm']) : ''; |
| 25 |
$username = isset( $_POST['username_card'] ) ? esc_html($_POST['username_card']) : ''; |
| 26 |
$howpay = isset( $_POST['howpay'] ) ? esc_html($_POST['howpay']) : '1'; |
| 27 |
$cbrand = isset( $_POST['cbrand'] ) ? esc_html($_POST['cbrand']) : ''; |
| 28 |
$div = isset( $_POST['div'] ) ? esc_html($_POST['div']) : ''; |
| 29 |
|
| 30 |
$html .= '<input type="hidden" name="acting" value="zeus">'."\n"; |
| 31 |
$html .= '<table class="customer_form" id="' . $paymod_id . '">'."\n"; |
| 32 |
|
| 33 |
$pcid = NULL; |
| 34 |
$partofcard = NULL; |
| 35 |
if( $usces->is_member_logged_in() ){ |
| 36 |
$member = $usces->get_member(); |
| 37 |
if( !isset($_GET['re-enter']) ) { |
| 38 |
$pcid = $usces->get_member_meta_value( 'zeus_pcid', $member['ID'] ); |
| 39 |
$partofcard = $usces->get_member_meta_value( 'zeus_partofcard', $member['ID'] ); |
| 40 |
} |
| 41 |
} |
| 42 |
//if( 2 == $usces->options['acting_settings'][$paymod_id]['security'] && 'on' == $usces->options['acting_settings'][$paymod_id]['quickcharge'] && $pcid != NULL ){ |
| 43 |
if( 'on' == $usces->options['acting_settings'][$paymod_id]['quickcharge'] && $pcid != NULL && $partofcard != NULL ){ |
| 44 |
$html .= '<input name="cnum1" type="hidden" value="8888888888888888" /> |
| 45 |
<input name="expyy" type="hidden" value="2010" /> |
| 46 |
<input name="expmm" type="hidden" value="01" /> |
| 47 |
<input name="username_card" type="hidden" value="QUICKCHARGE" />'; |
| 48 |
$html .= '<tr> |
| 49 |
<th scope="row">'.__('ご登録のカード番号下4桁', 'usces').'</th> |
| 50 |
<td colspan="2"><p>' . $usces->get_member_meta_value( 'zeus_partofcard', $member['ID'] ) . '(<a href="' . add_query_arg( array('page'=>'member_update_settlement', 're-enter'=>1), USCES_MEMBER_URL ) . '">カード� |
| 51 |
報の変更はこちら</a>)</p></td> |
| 52 |
</tr>'; |
| 53 |
if( 1 == $usces->options['acting_settings'][$paymod_id]['security'] ){ |
| 54 |
$html .= '<th scope="row">'.__('セキュリティコード', 'usces').'</th> |
| 55 |
<td colspan="2"><input name="securecode" type="text" size="6" value="' . esc_attr($securecode) . '" />(半角数字のみ)</td> |
| 56 |
</tr>'; |
| 57 |
} |
| 58 |
|
| 59 |
}else{ |
| 60 |
$html .= '<tr> |
| 61 |
<th scope="row">'.__('カード番号', 'usces').'<input name="acting" type="hidden" value="zeus" /></th> |
| 62 |
<td colspan="2"><input name="cnum1" type="text" size="16" value="' . esc_attr($cnum1) . '" />(半角数字のみ)</td> |
| 63 |
</tr>'; |
| 64 |
if( 1 == $usces->options['acting_settings'][$paymod_id]['security'] ){ |
| 65 |
$html .= '<tr> |
| 66 |
<th scope="row">'.__('セキュリティコード', 'usces').'</th> |
| 67 |
<td colspan="2"><input name="securecode" type="text" size="6" value="' . esc_attr($securecode) . '" />(半角数字のみ)</td> |
| 68 |
</tr>'; |
| 69 |
} |
| 70 |
$html .= '<tr> |
| 71 |
<th scope="row">'.__('カード有効期限', 'usces').'</th> |
| 72 |
<td colspan="2"> |
| 73 |
<select name="expmm"> |
| 74 |
<option value=""' . (empty($expmm) ? ' selected="selected"' : '') . '>----</option> |
| 75 |
<option value="01"' . (('01' === $expmm) ? ' selected="selected"' : '') . '> 1</option> |
| 76 |
<option value="02"' . (('02' === $expmm) ? ' selected="selected"' : '') . '> 2</option> |
| 77 |
<option value="03"' . (('03' === $expmm) ? ' selected="selected"' : '') . '> 3</option> |
| 78 |
<option value="04"' . (('04' === $expmm) ? ' selected="selected"' : '') . '> 4</option> |
| 79 |
<option value="05"' . (('05' === $expmm) ? ' selected="selected"' : '') . '> 5</option> |
| 80 |
<option value="06"' . (('06' === $expmm) ? ' selected="selected"' : '') . '> 6</option> |
| 81 |
<option value="07"' . (('07' === $expmm) ? ' selected="selected"' : '') . '> 7</option> |
| 82 |
<option value="08"' . (('08' === $expmm) ? ' selected="selected"' : '') . '> 8</option> |
| 83 |
<option value="09"' . (('09' === $expmm) ? ' selected="selected"' : '') . '> 9</option> |
| 84 |
<option value="10"' . (('10' === $expmm) ? ' selected="selected"' : '') . '>10</option> |
| 85 |
<option value="11"' . (('11' === $expmm) ? ' selected="selected"' : '') . '>11</option> |
| 86 |
<option value="12"' . (('12' === $expmm) ? ' selected="selected"' : '') . '>12</option> |
| 87 |
</select>月 <select name="expyy"> |
| 88 |
<option value=""' . (empty($expyy) ? ' selected="selected"' : '') . '>------</option> |
| 89 |
'; |
| 90 |
for($i=0; $i<10; $i++){ |
| 91 |
$year = date('Y') - 1 + $i; |
| 92 |
$html .= '<option value="' . $year . '"' . (($year == $expyy) ? ' selected="selected"' : '') . '>' . $year . '</option>'; |
| 93 |
} |
| 94 |
$html .= ' |
| 95 |
</select>年</td> |
| 96 |
</tr> |
| 97 |
<tr> |
| 98 |
<th scope="row">'.__('カード名義', 'usces').'</th> |
| 99 |
<td colspan="2"><input name="username_card" id="username_card" type="text" size="30" value="' . esc_attr($username) . '" />(半角英字)</td> |
| 100 |
</tr>'; |
| 101 |
} |
| 102 |
|
| 103 |
$html_howpay = ''; |
| 104 |
if( 'on' == $usces->options['acting_settings'][$paymod_id]['howpay'] ){ |
| 105 |
|
| 106 |
$html_howpay .= ' |
| 107 |
<tr> |
| 108 |
<th scope="row">'.__('支払方法', 'usces').'</th> |
| 109 |
<td><input name="offer[howpay]" type="radio" value="1" id="howdiv1"' . (('1' === $howpay) ? ' checked' : '') . ' /><label for="howdiv1">一括払い</label></td> |
| 110 |
<td><input name="offer[howpay]" type="radio" value="0" id="howdiv2"' . (('0' === $howpay) ? ' checked' : '') . ' /><label for="howdiv2">分割払い</label></td> |
| 111 |
</tr> |
| 112 |
<tr id="cbrand_zeus"> |
| 113 |
<th scope="row">'.__('カードブランド', 'usces').'</th> |
| 114 |
<td colspan="2"> |
| 115 |
<select name="offer[cbrand]"> |
| 116 |
<option value=""' . ((WCUtils::is_blank($cbrand)) ? ' selected="selected"' : '') . '>--------</option> |
| 117 |
<option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>JCB</option> |
| 118 |
<option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>VISA</option> |
| 119 |
<option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>MASTER</option> |
| 120 |
<option value="2"' . (('2' === $cbrand) ? ' selected="selected"' : '') . '>DINERS</option> |
| 121 |
<option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>AMEX</option> |
| 122 |
</select> |
| 123 |
</td> |
| 124 |
</tr> |
| 125 |
<tr id="div_zeus"> |
| 126 |
<th scope="row">'.__('分割回数', 'usces').'</th> |
| 127 |
<td colspan="2"> |
| 128 |
<select name="offer[div_1]" id="brand1"> |
| 129 |
<option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option> |
| 130 |
<option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option> |
| 131 |
<option value="03"' . (('03' === $cbrand) ? ' selected="selected"' : '') . '>3回</option> |
| 132 |
<option value="05"' . (('05' === $cbrand) ? ' selected="selected"' : '') . '>5回</option> |
| 133 |
<option value="06"' . (('06' === $cbrand) ? ' selected="selected"' : '') . '>6回</option> |
| 134 |
<option value="10"' . (('10' === $cbrand) ? ' selected="selected"' : '') . '>10回</option> |
| 135 |
<option value="12"' . (('12' === $cbrand) ? ' selected="selected"' : '') . '>12回</option> |
| 136 |
<option value="15"' . (('15' === $cbrand) ? ' selected="selected"' : '') . '>15回</option> |
| 137 |
<option value="18"' . (('18' === $cbrand) ? ' selected="selected"' : '') . '>18回</option> |
| 138 |
<option value="20"' . (('20' === $cbrand) ? ' selected="selected"' : '') . '>20回</option> |
| 139 |
<option value="24"' . (('24' === $cbrand) ? ' selected="selected"' : '') . '>24回</option> |
| 140 |
</select> |
| 141 |
<select name="offer[div_2]" id="brand2"> |
| 142 |
<option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option> |
| 143 |
<option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option> |
| 144 |
</select> |
| 145 |
<select name="offer[div_3]" id="brand3"> |
| 146 |
<option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払いのみ</option> |
| 147 |
</select> |
| 148 |
</td> |
| 149 |
</tr> |
| 150 |
'; |
| 151 |
} |
| 152 |
$html .= apply_filters( 'usces_filter_delivery_secure_form_howpay', $html_howpay ); |
| 153 |
$html .= ' |
| 154 |
</table>'; |
| 155 |
break; |
| 156 |
|
| 157 |
case 'acting_zeus_conv': |
| 158 |
$paymod_id = 'zeus'; |
| 159 |
|
| 160 |
if( 'on' != $usces->options['acting_settings'][$paymod_id]['conv_activate'] |
| 161 |
|| 'on' != $usces->options['acting_settings'][$paymod_id]['activate'] ) |
| 162 |
continue; |
| 163 |
|
| 164 |
$pay_cvs = isset( $_POST['pay_cvs'] ) ? esc_html($_POST['pay_cvs']) : 'D001'; |
| 165 |
$entry = $usces->cart->get_entry(); |
| 166 |
$username = isset( $_POST['username_conv'] ) ? esc_html($_POST['username_conv']) : $entry['customer']['name3'].$entry['customer']['name4']; |
| 167 |
|
| 168 |
$html .= ' |
| 169 |
<table class="customer_form" id="' . $paymod_id . '_conv"> |
| 170 |
<tr> |
| 171 |
<th scope="row">'.__('お支払いに利用するコンビニ', 'usces').'</th> |
| 172 |
<td colspan="2"> |
| 173 |
<select name="offer[pay_cvs]" id="pay_cvs_zeus"> |
| 174 |
<option value="D001"' . (('D001' == $pay_cvs) ? ' selected="selected"' : '') . '>セブンイレブン</option> |
| 175 |
<option value="D002"' . (('D002' == $pay_cvs) ? ' selected="selected"' : '') . '>ローソン</option> |
| 176 |
<option value="D030"' . (('D030' == $pay_cvs) ? ' selected="selected"' : '') . '>ファミリーマート</option> |
| 177 |
<option value="D040"' . (('D040' == $pay_cvs) ? ' selected="selected"' : '') . '>サークルKサンクス</option> |
| 178 |
<option value="D015"' . (('D015' == $pay_cvs) ? ' selected="selected"' : '') . '>セイコーマート</option> |
| 179 |
<option value="D050"' . (('D050' == $pay_cvs) ? ' selected="selected"' : '') . '>ミニストップ</option> |
| 180 |
<option value="D060"' . (('D060' == $pay_cvs) ? ' selected="selected"' : '') . '>デイリーヤマザキ</option> |
| 181 |
</select> |
| 182 |
</td> |
| 183 |
</tr> |
| 184 |
<tr> |
| 185 |
<th scope="row"><em>*</em>'.__('お名前', 'usces').'</th> |
| 186 |
<td colspan="2"><input name="username_conv" id="username_conv" type="text" size="30" value="'.esc_attr($username).'" />(� |
| 187 |
�角カナ)</td> |
| 188 |
</tr> |
| 189 |
</table>'; |
| 190 |
break; |
| 191 |
|
| 192 |
case 'acting_remise_card': |
| 193 |
$paymod_id = 'remise'; |
| 194 |
$charging_type = $usces->getItemChargingType($usces_carts[0]['post_id'], $usces_carts); |
| 195 |
|
| 196 |
if( 'on' != $usces->options['acting_settings'][$paymod_id]['card_activate'] |
| 197 |
|| 'on' != $usces->options['acting_settings'][$paymod_id]['howpay'] |
| 198 |
|| 'on' != $usces->options['acting_settings'][$paymod_id]['activate'] |
| 199 |
|| ('continue' == $charging_type || 'regular' == $charging_type) ){ |
| 200 |
continue; |
| 201 |
} |
| 202 |
|
| 203 |
$div = isset( $_POST['div'] ) ? esc_html($_POST['div']) : '0'; |
| 204 |
|
| 205 |
$html .= ' |
| 206 |
<table class="customer_form" id="' . $paymod_id . '"> |
| 207 |
<tr> |
| 208 |
<th scope="row">'.__('支払方法', 'usces').'</th> |
| 209 |
<td colspan="2"> |
| 210 |
<select name="offer[div]" id="div_remise"> |
| 211 |
<option value="0"' . (('0' === $div) ? ' selected="selected"' : '') . '> 一括払い</option> |
| 212 |
<option value="1"' . (('1' === $div) ? ' selected="selected"' : '') . '> 2回払い</option> |
| 213 |
<option value="2"' . (('2' === $div) ? ' selected="selected"' : '') . '> リボ払い</option> |
| 214 |
</select> |
| 215 |
</td> |
| 216 |
</tr> |
| 217 |
</table>'; |
| 218 |
break; |
| 219 |
} |
| 220 |
} |
| 221 |
} |
| 222 |
?> |
| 223 |
|