Plugin Directory

Changeset 2847764


Ignore:
Timestamp:
01/13/2023 07:29:45 AM (3 years ago)
Author:
hblpay
Message:

2.0.1 with recent changes. Implemented version configurations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hblpay-payment-gateway-for-woocommerce/trunk/hblpay-paymentgateway-woocommerce.php

    r2840865 r2847764  
    1 
    21<?php
    32/**
     
    872871
    873872                $f_response = callAPI('POST', $api_url, $jsondata,$order_id);
    874 
     873                error_log('::::::::::::::::API RESPONSE:::::::::ORDERID:::::::::'.$order_id.'::::'.print_r($f_response,1));
    875874            }
    876875             catch (Exception $e)
     
    925924                error_log('::::::::::::::::getRequestObject STARTED::::::::::::::::::ORDERID::::'.$order_id );
    926925            global $post;
     926
     927            global $wp_version;
     928            $php_version = phpversion();
     929        //  $plugin_version = '2.0.1';
     930        //  $php_version = $version;
     931        //  $versions =
    927932
    928933            $shippingPackageName = '';
     
    12361241    && $ShipToState == '' && $ShipToCountry == '' && $ShipToPostalCode == '' ) {
    12371242
    1238 // $main_data = array (
    1239 //  'Data1' => $USER_ID,
    1240 //  'Data2' => encryptData($PASSWORD,$enc_key),
    1241 //  'Data3' => "Aeskey",
    1242 //  'Data4' => "$custom_data"
    1243 // );
    1244 
    12451243            $custom_data = array (//all fields will be plain text
    12461244                 'USER_ID' => $USER_ID,
     
    12591257                    'SUBTOTAL' => encryptData($SUBTOTAL,$enc_key)
    12601258                ),
     1259
     1260                // Plugin Related versions
     1261                'EXTERNAL_DETAIL' => array (
     1262                    'MERCHANT_PLATFORM' => encryptData('Wordpress',$enc_key),
     1263                //  'PLUGIN_VERSION' => encryptData($versions,$enc_key),
     1264                  'PLUGIN_VERSION' => encryptData('2.0.1|'.$php_version,$enc_key),
     1265                    'BUILD_VERSION' => encryptData($wp_version,$enc_key),
     1266                    'RELEASE_DATE' => encryptData('1-11-2022',$enc_key)
     1267                ),
     1268
    12611269                'ADDITIONAL_DATA' => array (
    12621270                    'BILL_TO_FORENAME' => encryptData($bill_to_forename,$enc_key),
     
    12711279
    12721280                    //'SHIP_TO_PHONE' => encryptData($ShipToPhone,$enc_key),
    1273 
    12741281                    'CURRENCY' => encryptData($currency_code,$enc_key),
    12751282                    'REFERENCE_NUMBER' => encryptData($order_id,$enc_key),
     
    13091316                    'SUBTOTAL' => encryptData($SUBTOTAL,$enc_key)
    13101317                ),
     1318
     1319                // Plugin Related versions
     1320                'EXTERNAL_DETAIL' => array (
     1321                    'MERCHANT_PLATFORM' => encryptData('Wordpress',$enc_key),
     1322                    //  'PLUGIN_VERSION' => encryptData($versions,$enc_key),
     1323                  'PLUGIN_VERSION' => encryptData('2.0.1|'.$php_version,$enc_key),
     1324                    'BUILD_VERSION' => encryptData($wp_version,$enc_key),
     1325                    'RELEASE_DATE' => encryptData('1-11-2022',$enc_key)
     1326
     1327                ),
     1328
    13111329                'ADDITIONAL_DATA' => array (
    13121330                    'BILL_TO_FORENAME' => encryptData($bill_to_forename,$enc_key),
     
    15181536    function encodeString($plainData)
    15191537    {
    1520         $plainData=utf8_encode($plainData);
     1538        $plainData=utf8_encode($plainData ?? '');
    15211539        return base64_encode($plainData);
    15221540    }
Note: See TracChangeset for help on using the changeset viewer.