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 -202 1.3.72.12.4 View file →
@@ -1,202 +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'] ) ? 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 - $pcid = $usces->get_member_meta_value('zeus_pcid', $member['ID']);
37 - }
38 - //if( 2 == $usces->options['acting_settings'][$paymod_id]['security'] && 'on' == $usces->options['acting_settings'][$paymod_id]['quickcharge'] && $pcid != NULL ){
39 - if( 'on' == $usces->options['acting_settings'][$paymod_id]['quickcharge'] && $pcid != NULL ){
40 - $html .= '<input name="cnum1" type="hidden" value="8888888888888888" />
41 - <input name="expyy" type="hidden" value="2010" />
42 - <input name="expmm" type="hidden" value="01" />
43 - <input name="username" type="hidden" value="QUICKCHARGE" />';
44 -
45 - }else{
46 - $html .= '<tr>
47 - <th scope="row">'.__('カード番号', 'usces').'<input name="acting" type="hidden" value="zeus" /></th>
48 - <td colspan="2"><input name="cnum1" type="text" size="16" value="' . esc_attr($cnum1) . '" />(半角数字のみ)</td>
49 - </tr>';
50 - if( 1 == $usces->options['acting_settings'][$paymod_id]['security'] ){
51 - $html .= '<tr>
52 - <th scope="row">'.__('セキュリティコード', 'usces').'</th>
53 - <td colspan="2"><input name="securecode" type="text" size="6" value="' . esc_attr($securecode) . '" />(半角数字のみ)</td>
54 - </tr>';
55 - }
56 - $html .= '<tr>
57 - <th scope="row">'.__('カード有効期限', 'usces').'</th>
58 - <td colspan="2">
59 - <select name="expyy">
60 - <option value=""' . (empty($expyy) ? ' selected="selected"' : '') . '>------</option>
61 - ';
62 - for($i=0; $i<10; $i++){
63 - $year = date('Y') - 1 + $i;
64 - $html .= '<option value="' . $year . '"' . (($year == $expyy) ? ' selected="selected"' : '') . '>' . $year . '</option>';
65 - }
66 - $html .= '
67 - </select>年
68 - <select name="expmm">
69 - <option value=""' . (empty($expmm) ? ' selected="selected"' : '') . '>----</option>
70 - <option value="01"' . (('01' === $expmm) ? ' selected="selected"' : '') . '> 1</option>
71 - <option value="02"' . (('02' === $expmm) ? ' selected="selected"' : '') . '> 2</option>
72 - <option value="03"' . (('03' === $expmm) ? ' selected="selected"' : '') . '> 3</option>
73 - <option value="04"' . (('04' === $expmm) ? ' selected="selected"' : '') . '> 4</option>
74 - <option value="05"' . (('05' === $expmm) ? ' selected="selected"' : '') . '> 5</option>
75 - <option value="06"' . (('06' === $expmm) ? ' selected="selected"' : '') . '> 6</option>
76 - <option value="07"' . (('07' === $expmm) ? ' selected="selected"' : '') . '> 7</option>
77 - <option value="08"' . (('08' === $expmm) ? ' selected="selected"' : '') . '> 8</option>
78 - <option value="09"' . (('09' === $expmm) ? ' selected="selected"' : '') . '> 9</option>
79 - <option value="10"' . (('10' === $expmm) ? ' selected="selected"' : '') . '>10</option>
80 - <option value="11"' . (('11' === $expmm) ? ' selected="selected"' : '') . '>11</option>
81 - <option value="12"' . (('12' === $expmm) ? ' selected="selected"' : '') . '>12</option>
82 - </select>月</td>
83 - </tr>
84 - <tr>
85 - <th scope="row">'.__('カード名義', 'usces').'</th>
86 - <td colspan="2"><input name="username" type="text" size="30" value="' . esc_attr($username) . '" />(半角英字)</td>
87 - </tr>';
88 - }
89 -
90 - if( 'on' == $usces->options['acting_settings'][$paymod_id]['howpay'] ){
91 -
92 - $html .= '
93 - <tr>
94 - <th scope="row">'.__('支払方法', 'usces').'</th>
95 - <td><input name="howpay" type="radio" value="1" id="howdiv1"' . (('1' === $howpay) ? ' checked' : '') . ' /><label for="howdiv1">一括払い</label></td>
96 - <td><input name="howpay" type="radio" value="0" id="howdiv2"' . (('0' === $howpay) ? ' checked' : '') . ' /><label for="howdiv2">分割払い</label></td>
97 - </tr>
98 - <tr id="cbrand_zeus">
99 - <th scope="row">'.__('カードブランド', 'usces').'</th>
100 - <td colspan="2">
101 - <select name="cbrand">
102 - <option value=""' . ((WCUtils::is_blank($cbrand)) ? ' selected="selected"' : '') . '>--------</option>
103 - <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>JCB</option>
104 - <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>VISA</option>
105 - <option value="1"' . (('1' === $cbrand) ? ' selected="selected"' : '') . '>MASTER</option>
106 - <option value="2"' . (('2' === $cbrand) ? ' selected="selected"' : '') . '>DINERS</option>
107 - <option value="3"' . (('3' === $cbrand) ? ' selected="selected"' : '') . '>AMEX</option>
108 - </select>
109 - </td>
110 - </tr>
111 - <tr id="div_zeus">
112 - <th scope="row">'.__('分割回数', 'usces').'</th>
113 - <td colspan="2">
114 - <select name="div_1" id="brand1">
115 - <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option>
116 - <option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option>
117 - <option value="03"' . (('03' === $cbrand) ? ' selected="selected"' : '') . '>3回</option>
118 - <option value="05"' . (('05' === $cbrand) ? ' selected="selected"' : '') . '>5回</option>
119 - <option value="06"' . (('06' === $cbrand) ? ' selected="selected"' : '') . '>6回</option>
120 - <option value="10"' . (('10' === $cbrand) ? ' selected="selected"' : '') . '>10回</option>
121 - <option value="12"' . (('12' === $cbrand) ? ' selected="selected"' : '') . '>12回</option>
122 - <option value="15"' . (('15' === $cbrand) ? ' selected="selected"' : '') . '>15回</option>
123 - <option value="18"' . (('18' === $cbrand) ? ' selected="selected"' : '') . '>18回</option>
124 - <option value="20"' . (('20' === $cbrand) ? ' selected="selected"' : '') . '>20回</option>
125 - <option value="24"' . (('24' === $cbrand) ? ' selected="selected"' : '') . '>24回</option>
126 - </select>
127 - <select name="div_2" id="brand2">
128 - <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払い</option>
129 - <option value="99"' . (('99' === $cbrand) ? ' selected="selected"' : '') . '>リボ払い</option>
130 - </select>
131 - <select name="div_3" id="brand3">
132 - <option value="01"' . (('01' === $cbrand) ? ' selected="selected"' : '') . '>一括払いのみ</option>
133 - </select>
134 - </td>
135 - </tr>
136 - ';
137 -
138 - }
139 -
140 - $html .= '
141 - </table>';
142 - break;
143 -
144 - case 'acting_zeus_conv':
145 - $paymod_id = 'zeus';
146 -
147 - if( 'on' != $usces->options['acting_settings'][$paymod_id]['conv_activate']
148 - || 'on' != $usces->options['acting_settings'][$paymod_id]['activate'] )
149 - continue;
150 -
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 -
183 - $div = isset( $_POST['div'] ) ? esc_html($_POST['div']) : '0';
184 -
185 - $html .= '
186 - <table class="customer_form" id="' . $paymod_id . '">
187 - <tr>
188 - <th scope="row">'.__('支払方法', 'usces').'</th>
189 - <td colspan="2">
190 - <select name="div" id="div_remise">
191 - <option value="0"' . (('0' === $div) ? ' selected="selected"' : '') . '> 一括払い</option>
192 - <option value="1"' . (('1' === $div) ? ' selected="selected"' : '') . '> 2回払い</option>
193 - <option value="2"' . (('2' === $div) ? ' selected="selected"' : '') . '> リボ払い</option>
194 - </select>
195 - </td>
196 - </tr>
197 - </table>';
198 - break;
199 - }
200 - }
201 -}
202 -?>
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 );