Changeset 2077491
- Timestamp:
- 04/30/2019 03:13:25 AM (7 years ago)
- Location:
- bight-payment-gateway/trunk
- Files:
-
- 1 added
- 2 edited
-
bight-index.php (modified) (1 diff)
-
bight-woocommerce/bight-plugin.php (modified) (4 diffs)
-
images/bight-checkout-logo.png (added)
Legend:
- Unmodified
- Added
- Removed
-
bight-payment-gateway/trunk/bight-index.php
r2065438 r2077491 5 5 Plugin URI: https://bight.io 6 6 description: Accept Crypto currency as a form of payment for your products 7 Version: 1.0. 27 Version: 1.0.3 8 8 */ 9 9 -
bight-payment-gateway/trunk/bight-woocommerce/bight-plugin.php
r2065438 r2077491 15 15 // define('BIGHT_CHECKOUT_URL', 'http://localhost:8000'); 16 16 $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']; 18 18 // $this->description = $this->settings['description']; 19 19 $this->title = 'Bight'; … … 35 35 } 36 36 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 37 51 function bight_thankyou() { 38 52 $etherum_network = $this->bight_url === 'https://wallet.bight.io/purchase' ? 'www' : 'rinkeby' ; … … 48 62 if (!is_null($_GET['data'])) { 49 63 64 error_log('Undecoded Data: ' . $_GET['data']); 65 50 66 $decodedData = base64_decode($_GET['data']); 67 68 error_log('$decodedData: ' . $decodedData); 69 51 70 $dataObj = json_decode($decodedData, TRUE); 71 72 error_log('$dataObj: ' . print_r($dataObj, true)); 52 73 53 74 $order_id = absint( WC()->session->get('order_awaiting_payment')); … … 65 86 $hash = $this->hash_alg; 66 87 $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); 67 91 68 92 if ($signature == $_GET['signature']) {
Note: See TracChangeset
for help on using the changeset viewer.