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