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