Changeset 3111028
- Timestamp:
- 07/02/2024 09:48:02 AM (21 months ago)
- File:
-
- 1 edited
-
robokassa/trunk/wp_robokassa.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
robokassa/trunk/wp_robokassa.php
r3106617 r3111028 1161 1161 } 1162 1162 1163 if (is_plugin_active('woocommerce-checkout-add-ons/woocommerce-checkout-add-ons.php')) { 1164 $additional_items = $order->get_items('fee'); 1165 1166 foreach ($additional_items as $additional_item) { 1167 $additional_item_name = $additional_item->get_name(); 1168 $additional_item_total = floatval($additional_item->get_total()); 1169 1170 $products_items = array( 1171 'name' => $additional_item_name, 1172 'quantity' => 1, 1173 'cost' => $additional_item_total, 1174 'sum' => $additional_item_total, 1175 'payment_object' => \get_option('robokassa_payment_paymentObject'), 1176 'payment_method' => 'full_payment', 1177 'tax' => $tax, 1178 ); 1179 1180 $fields['items'][] = $products_items; 1181 1182 switch ($tax) { 1183 case "vat0": 1184 $fields['vats'][] = ['type' => $tax, 'sum' => 0]; 1185 break; 1186 case "none": 1187 $fields['vats'][] = ['type' => $tax, 'sum' => 0]; 1188 break; 1189 case "vat10": 1190 $fields['vats'][] = ['type' => $tax, 'sum' => ($shipping_total / 100) * 10]; 1191 break; 1192 case "vat20": 1193 $fields['vats'][] = ['type' => $tax, 'sum' => ($shipping_total / 100) * 20]; 1194 break; 1195 default: 1196 $fields['vats'][] = ['type' => 'novat', 'sum' => 0]; 1197 break; 1198 } 1199 } 1200 } 1201 1163 1202 foreach ($items as $item) { 1164 1203 $products_items = [
Note: See TracChangeset
for help on using the changeset viewer.