PluginProbe
Welcart e-Commerce / 1.4.11
Welcart e-Commerce v1.4.11
2.12.4 2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 All 292 releases
usc-e-shop / includes / delivery_secure_form.php

delivery_secure_form.php in Welcart e-Commerce 1.4.11, at includes/delivery_secure_form.php

231 lines 11.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 if( isset($_GET['page'] ) and 'member_update_settlement' == $_GET['page'] ) {
61 $html .= '<tr>
62 <th scope="row">'.__('ご登録のカード番号下4桁', 'usces').'</th>
63 <td colspan="2"><p>' . $usces->get_member_meta_value( 'zeus_partofcard', $member['ID'] ). '</p></td>
64 </tr>';
65 $label = __('変更後のカード番号', 'usces').'<div style="font-size: 0.7em;color: inherit;font-weight: normal;">(変更しない場合は空白にしてください)</div>';
66 } else {
67 $label = __('カード番号', 'usces');
68 }
69 $html .= '<tr>
70 <th scope="row">'.$label.'<input name="acting" type="hidden" value="zeus" /></th>
71 <td colspan="2"><input name="cnum1" type="text" size="16" value="' . esc_attr($cnum1) . '" />(半角数字のみ)</td>
72 </tr>';
73 if( 1 == $usces->options['acting_settings'][$paymod_id]['security'] ){
74 $html .= '<tr>
75 <th scope="row">'.__('セキュリティコード', 'usces').'</th>
76 <td colspan="2"><input name="securecode" type="text" size="6" value="' . esc_attr($securecode) . '" />(半角数字のみ)</td>
77 </tr>';
78 }
79 $html .= '<tr>
80 <th scope="row">'.__('カード有効期限', 'usces').'</th>
81 <td colspan="2">
82 <select name="expmm">
83 <option value=""' . (empty($expmm) ? ' selected="selected"' : '') . '>----</option>
84 <option value="01"' . (('01' === $expmm) ? ' selected="selected"' : '') . '> 1</option>
85 <option value="02"' . (('02' === $expmm) ? ' selected="selected"' : '') . '> 2</option>
86 <option value="03"' . (('03' === $expmm) ? ' selected="selected"' : '') . '> 3</option>
87 <option value="04"' . (('04' === $expmm) ? ' selected="selected"' : '') . '> 4</option>
88 <option value="05"' . (('05' === $expmm) ? ' selected="selected"' : '') . '> 5</option>
89 <option value="06"' . (('06' === $expmm) ? ' selected="selected"' : '') . '> 6</option>
90 <option value="07"' . (('07' === $expmm) ? ' selected="selected"' : '') . '> 7</option>
91 <option value="08"' . (('08' === $expmm) ? ' selected="selected"' : '') . '> 8</option>
92 <option value="09"' . (('09' === $expmm) ? ' selected="selected"' : '') . '> 9</option>
93 <option value="10"' . (('10' === $expmm) ? ' selected="selected"' : '') . '>10</option>
94 <option value="11"' . (('11' === $expmm) ? ' selected="selected"' : '') . '>11</option>
95 <option value="12"' . (('12' === $expmm) ? ' selected="selected"' : '') . '>12</option>
96 </select>月&nbsp;<select name="expyy">
97 <option value=""' . (empty($expyy) ? ' selected="selected"' : '') . '>------</option>
98 ';
99 for($i=0; $i<10; $i++){
100 $year = date('Y') - 1 + $i;
101 $html .= '<option value="' . $year . '"' . (($year == $expyy) ? ' selected="selected"' : '') . '>' . $year . '</option>';
102 }
103 $html .= '
104 </select>年</td>
105 </tr>
106 <tr>
107 <th scope="row">'.__('カード名義', 'usces').'</th>
108 <td colspan="2"><input name="username_card" id="username_card" type="text" size="30" value="' . esc_attr($username) . '" />(半角英字)</td>
109 </tr>';
110 }
111
112 $html_howpay = '';
113 if( 'on' == $usces->options['acting_settings'][$paymod_id]['howpay'] ){
114
115 $html_howpay .= '
116 <tr>
117 <th scope="row">'.__('支払方法', 'usces').'</th>
118 <td><input name="offer[howpay]" type="radio" value="1" id="howdiv1"' . (('1' === $howpay) ? ' checked' : '') . ' /><label for="howdiv1">一括払い</label></td>
119 <td><input name="offer[howpay]" type="radio" value="0" id="howdiv2"' . (('0' === $howpay) ? ' checked' : '') . ' /><label for="howdiv2">分割払い</label></td>
120 </tr>
121 <tr id="cbrand_zeus">
122 <th scope="row">'.__('カードブランド', 'usces').'</th>
123 <td colspan="2">
124 <select name="offer[cbrand]">
125 <option value=""' . ((WCUtils::is_blank($cbrand)) ? ' selected="selected"' : '') . '>--------</option>
126 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>JCB</option>
127 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>VISA</option>
128 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>MASTER</option>
129 <option value="2"' . (('2' === $cbrand) ? ' selected="selected"' : '') . '>DINERS</option>
130 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>AMEX</option>
131 </select>
132 </td>
133 </tr>
134 <tr id="div_zeus">
135 <th scope="row">'.__('分割回数', 'usces').'</th>
136 <td colspan="2">
137 <select name="offer[div_1]" id="brand1">
138 <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option>
139 <option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option>
140 <option value="03"' . (('03' === $cbrand) ? ' selected="selected"' : '') . '>3回</option>
141 <option value="05"' . (('05' === $cbrand) ? ' selected="selected"' : '') . '>5回</option>
142 <option value="06"' . (('06' === $cbrand) ? ' selected="selected"' : '') . '>6回</option>
143 <option value="10"' . (('10' === $cbrand) ? ' selected="selected"' : '') . '>10回</option>
144 <option value="12"' . (('12' === $cbrand) ? ' selected="selected"' : '') . '>12回</option>
145 <option value="15"' . (('15' === $cbrand) ? ' selected="selected"' : '') . '>15回</option>
146 <option value="18"' . (('18' === $cbrand) ? ' selected="selected"' : '') . '>18回</option>
147 <option value="20"' . (('20' === $cbrand) ? ' selected="selected"' : '') . '>20回</option>
148 <option value="24"' . (('24' === $cbrand) ? ' selected="selected"' : '') . '>24回</option>
149 </select>
150 <select name="offer[div_2]" id="brand2">
151 <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option>
152 <option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option>
153 </select>
154 <select name="offer[div_3]" id="brand3">
155 <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払いのみ</option>
156 </select>
157 </td>
158 </tr>
159 ';
160 }
161 $html .= apply_filters( 'usces_filter_delivery_secure_form_howpay', $html_howpay );
162 $html .= '
163 </table>';
164 break;
165
166 case 'acting_zeus_conv':
167 $paymod_id = 'zeus';
168
169 if( 'on' != $usces->options['acting_settings'][$paymod_id]['conv_activate']
170 || 'on' != $usces->options['acting_settings'][$paymod_id]['activate'] )
171 continue;
172
173 $pay_cvs = isset( $_POST['pay_cvs'] ) ? esc_html($_POST['pay_cvs']) : '';
174 $entry = $usces->cart->get_entry();
175 $username = isset( $_POST['username_conv'] ) ? esc_html($_POST['username_conv']) : $entry['customer']['name3'].$entry['customer']['name4'];
176
177 $html .= '
178 <table class="customer_form" id="' . $paymod_id . '_conv">
179 <tr>
180 <th scope="row">'.__('お支払いに利用するコンビニ', 'usces').'</th>
181 <td colspan="2">
182 <select name="offer[pay_cvs]" id="pay_cvs_zeus">';
183 foreach( (array)$usces->options['acting_settings'][$paymod_id]['pay_cvs'] as $pay_cvs_code ) {
184 $selected = ( $pay_cvs_code == $pay_cvs ) ? ' selected="selected"' : '';
185 $html .= '
186 <option value="'.$pay_cvs_code.'"'.$selected.'>'.usces_get_conv_name( $pay_cvs_code ).'</option>';
187 }
188 $html .= '
189 </select>
190 </td>
191 </tr>
192 <tr>
193 <th scope="row"><em>*</em>'.__('お名前', 'usces').'</th>
194 <td colspan="2"><input name="username_conv" id="username_conv" type="text" size="30" value="'.esc_attr($username).'" />(�
195 �角カナ)</td>
196 </tr>
197 </table>';
198 break;
199
200 case 'acting_remise_card':
201 $paymod_id = 'remise';
202 $charging_type = $usces->getItemChargingType($usces_carts[0]['post_id'], $usces_carts);
203
204 if( 'on' != $usces->options['acting_settings'][$paymod_id]['card_activate']
205 || 'on' != $usces->options['acting_settings'][$paymod_id]['howpay']
206 || 'on' != $usces->options['acting_settings'][$paymod_id]['activate']
207 || ('continue' == $charging_type || 'regular' == $charging_type) ){
208 continue;
209 }
210
211 $div = isset( $_POST['div'] ) ? esc_html($_POST['div']) : '0';
212
213 $html .= '
214 <table class="customer_form" id="' . $paymod_id . '">
215 <tr>
216 <th scope="row">'.__('支払方法', 'usces').'</th>
217 <td colspan="2">
218 <select name="offer[div]" id="div_remise">
219 <option value="0"' . (('0' === $div) ? ' selected="selected"' : '') . '> 一括払い</option>
220 <option value="1"' . (('1' === $div) ? ' selected="selected"' : '') . '> 2回払い</option>
221 <option value="2"' . (('2' === $div) ? ' selected="selected"' : '') . '> リボ払い</option>
222 </select>
223 </td>
224 </tr>
225 </table>';
226 break;
227 }
228 }
229 }
230 ?>
231