Changeset 1885021
- Timestamp:
- 05/31/2018 05:46:48 PM (8 years ago)
- Location:
- ezcount/trunk
- Files:
-
- 3 edited
-
EZcount.php (modified) (9 diffs)
-
EZcount_helpers.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ezcount/trunk/EZcount.php
r1861091 r1885021 76 76 */ 77 77 public function init_form_fields() { 78 $env = [78 $env = array( 79 79 'demo.ezcount.co.il' => 'DEMO', 80 80 'api.ezcount.co.il' => 'PRODUCTION', 81 ];81 ); 82 82 if (strpos(get_site_url(), 'devapp') !== false) { 83 83 $env['devapp.ezcount.co.il/EZcountHead'] = 'DEV'; … … 245 245 246 246 $api_url = EZcount_helpers::getApiBase() . 'payment/prepareSafeUrl/clearingFormForWeb'; 247 $data = [247 $data = array( 248 248 "sum" => $sum, 249 249 "payments" => $this->maxpayments_list, … … 251 251 "successUrl" => get_site_url() . '?wc-api=WC_Gateway_EZcount&response=success&order_id=' . $order_id, 252 252 "failedUrl" => get_site_url() . '?wc-api=WC_Gateway_EZcount&response=failed&order_id=' . $order_id, 253 ];253 ); 254 254 $result = EZcount_helpers::sendJsonRequest($api_url, $data); 255 255 … … 310 310 } 311 311 // ----------------------- Get order items -------------------------------- 312 $itemArray = [];313 $items = [];312 $itemArray = array(); 313 $items = array(); 314 314 foreach ($order->get_items() as $item_key => $item_data) { 315 315 //caculate the item … … 368 368 //-------------------------------XXXXXX---------------------------------- 369 369 370 $customer_address = [];370 $customer_address = array(); 371 371 if (trim($customer_address_1)) { 372 372 $customer_address[] = $customer_address_1; … … 384 384 385 385 $invoice_post = 386 [386 array( 387 387 // CUSTOMER credentials 388 388 'api_key' => $zc_payment->get_option('api_key'), … … 395 395 'item' => $itemArray, 396 396 'payment' => 397 [398 [397 array( 398 array( 399 399 'payment_type' => 3,/*CC*/ 400 400 'payment' => $paymentTotal, … … 403 403 'cc_num_of_payments' => $cc_num_of_payments, 404 404 'auto_calc_payments' => true 405 ]406 ],405 ) 406 ), 407 407 'price_total' => $paymentTotal, 408 408 'comment' => "", … … 410 410 "cgp_id" => $cgp_id, 411 411 'ua_uuid' => $this->different_account_uuid 412 ];412 ); 413 413 414 414 //invoice! -
ezcount/trunk/EZcount_helpers.php
r1861091 r1885021 11 11 } 12 12 13 public static function sendJsonRequest($url, $data = []) {13 public static function sendJsonRequest($url, $data = array()) { 14 14 //do validation 15 15 $zc_payment = new WC_Gateway_EZcount(); … … 29 29 ), 30 30 //node agent is using this method, the certificate is not wirking on private network IP so ignore SSL errors 31 'ssl' => [31 'ssl' => array( 32 32 "verify_peer" => false, 33 33 "verify_peer_name" => false 34 ]34 ) 35 35 ); 36 36 //execute API request -
ezcount/trunk/readme.txt
r1861101 r1885021 4 4 Tags : invoicing, clearing and paypal integration plugin. 5 5 Tested up to: 4.9.1 6 Version : 1.0 26 Version : 1.03 7 7 Stable tag: trunk 8 Requires PHP: 5. 2.49 Requires at least: 5. 2.48 Requires PHP: 5.3 9 Requires at least: 5.3 10 10 11 11 … … 40 40 1.0 - Initial relese 41 41 1.02 - Add more functionality 42 1.04 - improve support for PHP 5.3 42 43 43 44 == Upgrade notice ==
Note: See TracChangeset
for help on using the changeset viewer.