Plugin Directory

Changeset 2077491


Ignore:
Timestamp:
04/30/2019 03:13:25 AM (7 years ago)
Author:
bight
Message:

version 1.0.3

Location:
bight-payment-gateway/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • bight-payment-gateway/trunk/bight-index.php

    r2065438 r2077491  
    55    Plugin URI: https://bight.io
    66    description: Accept Crypto currency as a form of payment for your products
    7     Version: 1.0.2
     7    Version: 1.0.3
    88*/
    99
  • bight-payment-gateway/trunk/bight-woocommerce/bight-plugin.php

    r2065438 r2077491  
    1515        // define('BIGHT_CHECKOUT_URL', 'http://localhost:8000');
    1616        $this->hash_alg     = 'sha256';
    17         // $this->title        = $this->settings['title'];
     17        $this->icon         = $this->bight_plugin_url() . '/images/bight-checkout-logo.png';        // $this->title        = $this->settings['title'];
    1818        // $this->description  = $this->settings['description'];
    1919        $this->title        = 'Bight';
     
    3535    }
    3636
     37    function bight_plugin_url() {
     38        if(isset($this->bight_plugin_url))
     39            return $this->bight_plugin_url;
     40
     41        if(is_ssl())
     42        {
     43            return $this->bight_plugin_url = str_replace( 'http://', 'https://', WP_PLUGIN_URL ) . '/' . plugin_basename( dirname( dirname( __FILE__ )));
     44        }
     45        else
     46        {
     47            return $this->bight_plugin_url = WP_PLUGIN_URL . '/' . plugin_basename( dirname( dirname( __FILE__ )));
     48        }
     49    }
     50
    3751    function bight_thankyou() {
    3852        $etherum_network = $this->bight_url === 'https://wallet.bight.io/purchase' ? 'www' : 'rinkeby' ;
     
    4862        if (!is_null($_GET['data'])) {
    4963
     64            error_log('Undecoded Data: ' . $_GET['data']);
     65
    5066            $decodedData = base64_decode($_GET['data']);
     67
     68            error_log('$decodedData: ' . $decodedData);
     69
    5170            $dataObj = json_decode($decodedData, TRUE);
     71
     72            error_log('$dataObj: ' . print_r($dataObj, true));
    5273
    5374            $order_id = absint( WC()->session->get('order_awaiting_payment'));
     
    6586                $hash = $this->hash_alg;
    6687                $signature = base64_encode(hash_hmac($hash, $decodedData, $secretKey, true));
     88                // error_log('$secretKey: ' . $secretKey);
     89                // error_log('Incoming $signature: ' . $_GET['signature']);
     90                // error_log('Generated $signature: ' . $signature);
    6791
    6892                if ($signature == $_GET['signature']) {
Note: See TracChangeset for help on using the changeset viewer.