PluginProbe
Welcart e-Commerce / 1.3.9
Welcart e-Commerce v1.3.9
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.3.9, at includes/delivery_secure_form.php

202 lines 10.1 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'] ) ? esc_html($_POST['username']) : '';
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 if( $usces->is_member_logged_in() ){
35 $member = $usces->get_member();
36 if( !isset($_GET['re-enter']) ) {
37 $pcid = $usces->get_member_meta_value( 'zeus_pcid', $member['ID'] );
38 }
39 }
40 //if( 2 == $usces->options['acting_settings'][$paymod_id]['security'] && 'on' == $usces->options['acting_settings'][$paymod_id]['quickcharge'] && $pcid != NULL ){
41 if( 'on' == $usces->options['acting_settings'][$paymod_id]['quickcharge'] && $pcid != NULL ){
42 $html .= '<input name="cnum1" type="hidden" value="8888888888888888" />
43 <input name="expyy" type="hidden" value="2010" />
44 <input name="expmm" type="hidden" value="01" />
45 <input name="username" type="hidden" value="QUICKCHARGE" />';
46
47 }else{
48 $html .= '<tr>
49 <th scope="row">'.__('カード番号', 'usces').'<input name="acting" type="hidden" value="zeus" /></th>
50 <td colspan="2"><input name="cnum1" type="text" size="16" value="' . esc_attr($cnum1) . '" />(半角数字のみ)</td>
51 </tr>';
52 if( 1 == $usces->options['acting_settings'][$paymod_id]['security'] ){
53 $html .= '<tr>
54 <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 $html .= '<tr>
59 <th scope="row">'.__('カード有効期限', 'usces').'</th>
60 <td colspan="2">
61 <select name="expmm">
62 <option value=""' . (empty($expmm) ? ' selected="selected"' : '') . '>----</option>
63 <option value="01"' . (('01' === $expmm) ? ' selected="selected"' : '') . '> 1</option>
64 <option value="02"' . (('02' === $expmm) ? ' selected="selected"' : '') . '> 2</option>
65 <option value="03"' . (('03' === $expmm) ? ' selected="selected"' : '') . '> 3</option>
66 <option value="04"' . (('04' === $expmm) ? ' selected="selected"' : '') . '> 4</option>
67 <option value="05"' . (('05' === $expmm) ? ' selected="selected"' : '') . '> 5</option>
68 <option value="06"' . (('06' === $expmm) ? ' selected="selected"' : '') . '> 6</option>
69 <option value="07"' . (('07' === $expmm) ? ' selected="selected"' : '') . '> 7</option>
70 <option value="08"' . (('08' === $expmm) ? ' selected="selected"' : '') . '> 8</option>
71 <option value="09"' . (('09' === $expmm) ? ' selected="selected"' : '') . '> 9</option>
72 <option value="10"' . (('10' === $expmm) ? ' selected="selected"' : '') . '>10</option>
73 <option value="11"' . (('11' === $expmm) ? ' selected="selected"' : '') . '>11</option>
74 <option value="12"' . (('12' === $expmm) ? ' selected="selected"' : '') . '>12</option>
75 </select>月&nbsp;<select name="expyy">
76 <option value=""' . (empty($expyy) ? ' selected="selected"' : '') . '>------</option>
77 ';
78 for($i=0; $i<10; $i++){
79 $year = date('Y') - 1 + $i;
80 $html .= '<option value="' . $year . '"' . (($year == $expyy) ? ' selected="selected"' : '') . '>' . $year . '</option>';
81 }
82 $html .= '
83 </select>年</td>
84 </tr>
85 <tr>
86 <th scope="row">'.__('カード名義', 'usces').'</th>
87 <td colspan="2"><input name="username" type="text" size="30" value="' . esc_attr($username) . '" />(半角英字)</td>
88 </tr>';
89 }
90
91 $html_howpay = '';
92 if( 'on' == $usces->options['acting_settings'][$paymod_id]['howpay'] ){
93
94 $html_howpay .= '
95 <tr>
96 <th scope="row">'.__('支払方法', 'usces').'</th>
97 <td><input name="howpay" type="radio" value="1" id="howdiv1"' . (('1' === $howpay) ? ' checked' : '') . ' /><label for="howdiv1">一括払い</label></td>
98 <td><input name="howpay" type="radio" value="0" id="howdiv2"' . (('0' === $howpay) ? ' checked' : '') . ' /><label for="howdiv2">分割払い</label></td>
99 </tr>
100 <tr id="cbrand_zeus">
101 <th scope="row">'.__('カードブランド', 'usces').'</th>
102 <td colspan="2">
103 <select name="cbrand">
104 <option value=""' . ((WCUtils::is_blank($cbrand)) ? ' selected="selected"' : '') . '>--------</option>
105 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>JCB</option>
106 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>VISA</option>
107 <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>MASTER</option>
108 <option value="2"' . (('2' === $cbrand) ? ' selected="selected"' : '') . '>DINERS</option>
109 <option value="3"' . (('3' === $cbrand) ? ' selected="selected"' : '') . '>AMEX</option>
110 </select>
111 </td>
112 </tr>
113 <tr id="div_zeus">
114 <th scope="row">'.__('分割回数', 'usces').'</th>
115 <td colspan="2">
116 <select name="div_1" id="brand1">
117 <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option>
118 <option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option>
119 <option value="03"' . (('03' === $cbrand) ? ' selected="selected"' : '') . '>3回</option>
120 <option value="05"' . (('05' === $cbrand) ? ' selected="selected"' : '') . '>5回</option>
121 <option value="06"' . (('06' === $cbrand) ? ' selected="selected"' : '') . '>6回</option>
122 <option value="10"' . (('10' === $cbrand) ? ' selected="selected"' : '') . '>10回</option>
123 <option value="12"' . (('12' === $cbrand) ? ' selected="selected"' : '') . '>12回</option>
124 <option value="15"' . (('15' === $cbrand) ? ' selected="selected"' : '') . '>15回</option>
125 <option value="18"' . (('18' === $cbrand) ? ' selected="selected"' : '') . '>18回</option>
126 <option value="20"' . (('20' === $cbrand) ? ' selected="selected"' : '') . '>20回</option>
127 <option value="24"' . (('24' === $cbrand) ? ' selected="selected"' : '') . '>24回</option>
128 </select>
129 <select name="div_2" id="brand2">
130 <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option>
131 <option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option>
132 </select>
133 <select name="div_3" id="brand3">
134 <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払いのみ</option>
135 </select>
136 </td>
137 </tr>
138 ';
139 }
140 $html .= apply_filters( 'usces_filter_delivery_secure_form_howpay', $html_howpay );
141 $html .= '
142 </table>';
143 break;
144
145 case 'acting_zeus_conv':
146 $paymod_id = 'zeus';
147
148 if( 'on' != $usces->options['acting_settings'][$paymod_id]['conv_activate']
149 || 'on' != $usces->options['acting_settings'][$paymod_id]['activate'] )
150 continue;
151
152 $pay_cvs = isset( $_POST['pay_cvs'] ) ? esc_html($_POST['pay_cvs']) : 'D001';
153
154 $html .= '
155 <table class="customer_form" id="' . $paymod_id . '_conv">
156 <tr>
157 <th scope="row">'.__('お支払いに利用するコンビニ', 'usces').'</th>
158 <td colspan="2">
159 <select name="pay_cvs" id="pay_cvs_zeus">
160 <option value="D001"' . (('D001' == $pay_cvs) ? ' selected="selected"' : '') . '>セブンイレブン</option>
161 <option value="D002"' . (('D002' == $pay_cvs) ? ' selected="selected"' : '') . '>ローソン</option>
162 <option value="D030"' . (('D030' == $pay_cvs) ? ' selected="selected"' : '') . '>ファミリーマート</option>
163 <option value="D040"' . (('D040' == $pay_cvs) ? ' selected="selected"' : '') . '>サークルKサンクス</option>
164 <option value="D015"' . (('D015' == $pay_cvs) ? ' selected="selected"' : '') . '>セイコーマート</option>
165 </select>
166 </td>
167 </tr>
168 </table>';
169 break;
170
171 case 'acting_remise_card':
172 $paymod_id = 'remise';
173 $charging_type = $usces->getItemChargingType($usces_carts[0]['post_id'], $usces_carts);
174
175 if( 'on' != $usces->options['acting_settings'][$paymod_id]['card_activate']
176 || 'on' != $usces->options['acting_settings'][$paymod_id]['howpay']
177 || 'on' != $usces->options['acting_settings'][$paymod_id]['activate']
178 || ('continue' == $charging_type || 'regular' == $charging_type) ){
179 continue;
180 }
181
182 $div = isset( $_POST['div'] ) ? esc_html($_POST['div']) : '0';
183
184 $html .= '
185 <table class="customer_form" id="' . $paymod_id . '">
186 <tr>
187 <th scope="row">'.__('支払方法', 'usces').'</th>
188 <td colspan="2">
189 <select name="div" id="div_remise">
190 <option value="0"' . (('0' === $div) ? ' selected="selected"' : '') . '> 一括払い</option>
191 <option value="1"' . (('1' === $div) ? ' selected="selected"' : '') . '> 2回払い</option>
192 <option value="2"' . (('2' === $div) ? ' selected="selected"' : '') . '> リボ払い</option>
193 </select>
194 </td>
195 </tr>
196 </table>';
197 break;
198 }
199 }
200 }
201 ?>
202