Plugin Directory

Changeset 1885021


Ignore:
Timestamp:
05/31/2018 05:46:48 PM (8 years ago)
Author:
alonezcount
Message:

convert array to old syntax in order to support PHP5.3

Location:
ezcount/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ezcount/trunk/EZcount.php

    r1861091 r1885021  
    7676         */
    7777        public function init_form_fields() {
    78             $env = [
     78            $env = array(
    7979                'demo.ezcount.co.il' => 'DEMO',
    8080                'api.ezcount.co.il' => 'PRODUCTION',
    81             ];
     81            );
    8282            if (strpos(get_site_url(), 'devapp') !== false) {
    8383                $env['devapp.ezcount.co.il/EZcountHead'] = 'DEV';
     
    245245
    246246            $api_url = EZcount_helpers::getApiBase() . 'payment/prepareSafeUrl/clearingFormForWeb';
    247             $data = [
     247            $data = array(
    248248                "sum" => $sum,
    249249                "payments" => $this->maxpayments_list,
     
    251251                "successUrl" => get_site_url() . '?wc-api=WC_Gateway_EZcount&response=success&order_id=' . $order_id,
    252252                "failedUrl" => get_site_url() . '?wc-api=WC_Gateway_EZcount&response=failed&order_id=' . $order_id,
    253             ];
     253            );
    254254            $result = EZcount_helpers::sendJsonRequest($api_url, $data);
    255255
     
    310310                    }
    311311                    // ----------------------- Get order items --------------------------------
    312                     $itemArray = [];
    313                     $items = [];
     312                    $itemArray = array();
     313                    $items = array();
    314314                    foreach ($order->get_items() as $item_key => $item_data) {
    315315                        //caculate the item
     
    368368                    //-------------------------------XXXXXX----------------------------------
    369369
    370                     $customer_address = [];
     370                    $customer_address = array();
    371371                    if (trim($customer_address_1)) {
    372372                        $customer_address[] = $customer_address_1;
     
    384384
    385385                    $invoice_post =
    386                         [
     386                        array(
    387387                            // CUSTOMER credentials
    388388                            'api_key' => $zc_payment->get_option('api_key'),
     
    395395                            'item' => $itemArray,
    396396                            'payment' =>
    397                                 [
    398                                     [
     397                                array(
     398                                    array(
    399399                                        'payment_type' => 3,/*CC*/
    400400                                        'payment' => $paymentTotal,
     
    403403                                        'cc_num_of_payments' => $cc_num_of_payments,
    404404                                        'auto_calc_payments' => true
    405                                     ]
    406                                 ],
     405                                    )
     406                                ),
    407407                            'price_total' => $paymentTotal,
    408408                            'comment' => "",
     
    410410                            "cgp_id" => $cgp_id,
    411411                            'ua_uuid' => $this->different_account_uuid
    412                         ];
     412                        );
    413413
    414414                    //invoice!
  • ezcount/trunk/EZcount_helpers.php

    r1861091 r1885021  
    1111    }
    1212
    13     public static function sendJsonRequest($url, $data = []) {
     13    public static function sendJsonRequest($url, $data = array()) {
    1414        //do validation
    1515        $zc_payment = new WC_Gateway_EZcount();
     
    2929            ),
    3030            //node agent is using this method, the certificate is not wirking on private network IP so ignore SSL errors
    31             'ssl' => [
     31            'ssl' => array(
    3232                "verify_peer" => false,
    3333                "verify_peer_name" => false
    34             ]
     34            )
    3535        );
    3636        //execute API request
  • ezcount/trunk/readme.txt

    r1861101 r1885021  
    44Tags        : invoicing, clearing and paypal integration plugin.
    55Tested up to: 4.9.1
    6 Version     : 1.02
     6Version     : 1.03
    77Stable tag: trunk
    8 Requires PHP: 5.2.4
    9 Requires at least:  5.2.4
     8Requires PHP: 5.3
     9Requires at least:  5.3
    1010
    1111
     
    40401.0  - Initial relese
    41411.02 - Add more functionality
     421.04 - improve support for PHP 5.3
    4243
    4344== Upgrade notice ==
Note: See TracChangeset for help on using the changeset viewer.