Plugin Directory

Changeset 3039359


Ignore:
Timestamp:
02/21/2024 06:50:50 PM (2 years ago)
Author:
qisstpay
Message:

Minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qisstpay/trunk/gateways/QPBaseConfiguration.php

    r3039350 r3039359  
    22
    33class QPBaseConfiguration extends WC_Payment_Gateway{
    4 
    5 
    64
    75    /*
     
    5149    }
    5250
    53 
    54 
    5551    function athenticatedToken()
    5652    {
    57 
    58 
    5953        $token = $this->_this->get_option( 'merchant_token' );
    6054        $result = array(
     
    156150    }
    157151
    158 
    159 
    160152    function getMerchantGatewaysView() {
    161153
     
    170162            if ( $resultToken['status'] ) {
    171163
    172 
    173164                $curl = curl_init();
    174165
    175 
    176166                $url = $this->getQPBaseUrl() . "ms-web-external-apis/merchants/v1/payment/methods";
    177 
    178167
    179168                curl_setopt_array( $curl, array(
     
    221210
    222211        return $result;
    223 
    224     }
    225 
     212    }
    226213
    227214    function createPayload( $order_id,$transaction_number,$callbackUrl=null) {
    228215        $order = wc_get_order( $order_id );
    229216
    230 
    231217        if ( $order ) {
    232218
     
    234220
    235221            $line_item= [];
    236 
    237 
    238222
    239223            foreach ($wpLineItems as $row){
     
    247231                $description = $productDetail->get_description();
    248232
    249 
    250233                $terms = get_the_terms($item_data['product_id'], 'product_cat');
    251234
    252235                //$product_cats_ids = wc_get_product_term_ids( $product->get_id(), 'product_cat' );
    253 
    254 
    255236                $categories = [];
    256237                $sub_categories = [];
     
    264245                }
    265246
    266 
    267 
    268 
    269 
    270 
    271247                if (is_array($categories) && is_array($categories) >0){
    272248
     
    278254                }
    279255
    280 
    281 
    282 
    283 
    284256                $attributes = $this->getVariations($product);
    285 
    286 
    287 
    288257
    289258                $imgUrl = null;
     
    297266                $sku = $productDetail->get_sku();
    298267
    299 
    300268                $tags = [];
    301269
    302270                $itemtags = $product->tag_ids;
    303 
    304271
    305272                foreach($itemtags as $tag) {
     
    346313            }
    347314
    348 
    349 
    350315            $line_item = json_encode($line_item);
    351 
    352316
    353317            $paymentGtway = "ubl";
     
    360324            $qp_account_number=null;
    361325            $customer_cnic=null;
    362 
    363 
    364 
    365 
    366 
    367326
    368327            $payload = '{
     
    415374            return false;
    416375        }
    417 
    418 
    419     }
    420 
     376    }
    421377
    422378    function getVariations($product)
     
    501457            curl_close( $curl );
    502458        }catch (\Exception $exception){
    503 
    504         }
    505 
     459        }
    506460        return json_decode( $response );
    507 
    508461    }
    509462
Note: See TracChangeset for help on using the changeset viewer.