Changeset 2590475
- Timestamp:
- 08/29/2021 01:57:33 PM (5 years ago)
- Location:
- decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce
- Files:
-
- 8 edited
-
tags/2.0.1/inc/cron.php (modified) (1 diff)
-
tags/2.0.1/inc/itls-btc-wp-class.php (modified) (2 diffs)
-
tags/2.0.1/inc/itls-crypto-dec-payment-gateway-class.php (modified) (1 diff)
-
tags/2.0.1/inc/plugin.php (modified) (6 diffs)
-
trunk/inc/cron.php (modified) (1 diff)
-
trunk/inc/itls-btc-wp-class.php (modified) (2 diffs)
-
trunk/inc/itls-crypto-dec-payment-gateway-class.php (modified) (1 diff)
-
trunk/inc/plugin.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/cron.php
r2590458 r2590475 16 16 $hashExists = null; 17 17 $res = null; 18 // TODO:: to options:: 18 19 $ttl = 60 * 60 * 4; // 4 hours payment awaiting time then cancel. 19 $ttlh = 60 * 60 * 6; // 24hours to get 3+ confirmations20 $ttlh = 60 * 60 * 48; // 48 hours to get 3+ confirmations 20 21 21 22 $query = "SELECT * FROM `$tableName` WHERE `order_status` = 'ONHOLD' OR `order_status` = 'PENDING' "; -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/itls-btc-wp-class.php
r2590458 r2590475 2 2 namespace Itls\CryptoWp; 3 3 4 include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php'; // !!!4 include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php'; 5 5 include_once plugin_dir_path(__FILE__) . '../lib/btclib/autoload.php'; 6 6 … … 43 43 44 44 } 45 //$ret = '';46 45 return $ret; 47 46 } -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/itls-crypto-dec-payment-gateway-class.php
r2590458 r2590475 97 97 <div style="display: block; margin-left: auto; margin-right: auto; width: 50%;"> 98 98 <p>Copy/Scan</p> 99 <img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> />99 <img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> alt="<?php echo $this->cryptodec_btc_address; ?>" /> 100 100 </div></div> 101 101 <?php -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/plugin.php
r2590458 r2590475 105 105 } 106 106 107 $my_wallet = get_post_meta($order->id, '_cryptodec_best_btc_wallet', true); 108 $my_total = get_post_meta($order->id, '_cryptodec_total', true); 109 $transaction = get_post_meta($order->id, '_cryptodec_transaction_id', true); ?> 107 $tmpMyOrderID = $order->get_id(); // $order->id !!! 108 109 $my_wallet = get_post_meta($tmpMyOrderID, '_cryptodec_best_btc_wallet', true); 110 $my_total = get_post_meta($tmpMyOrderID, '_cryptodec_total', true); 111 $transaction = get_post_meta($tmpMyOrderID, '_cryptodec_transaction_id', true); ?> 110 112 <div class="form-field form-field-wide"> 111 113 <img src='<?php echo plugin_dir_url(__FILE__) . '../assets/images/logo-gw.png'; ?>' alt="CryptoDec"> … … 169 171 ?> 170 172 <th>QR Code</th> 171 <td><img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> /></td>173 <td><img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> alt="<?php echo $wallet; ?>" /></td> 172 174 <?php 173 175 } else { … … 220 222 221 223 function cryptodec_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) { 224 225 $tmpMyOrderID = $order->get_id(); // $order->id !!! 222 226 $fields['best_btc_wallet'] = array( 223 227 'label' => __( 'Wallet Address' ), 224 'value' => get_post_meta( $ order->id, '_cryptodec_best_btc_wallet', true ),228 'value' => get_post_meta( $tmpMyOrderID, '_cryptodec_best_btc_wallet', true ), 225 229 ); 226 230 $fields['order_total'] = array( 227 231 'label' => __( 'Total BTC' ), 228 'value' => get_post_meta( $ order->id, '_cryptodec_total', true ),232 'value' => get_post_meta( $tmpMyOrderID, '_cryptodec_total', true ), 229 233 ); 230 234 return $fields; … … 233 237 add_action( 'woocommerce_email_after_order_table', 'cryptodec_woocommerce_email_after_order_table_func' ); 234 238 function cryptodec_woocommerce_email_after_order_table_func( $order ) { 235 ?> 239 240 $tmpMyOrderID = $order->get_id(); // $order->id !!! 241 ?> 236 242 237 243 <h3>Bitcoin Payment Details</h3> … … 239 245 <tr> 240 246 <td>Bitcoin Wallet Address: </td> 241 <td><?php echo wptexturize( get_post_meta( $ order->id, '_cryptodec_best_btc_wallet', true ) ); ?></td>247 <td><?php echo wptexturize( get_post_meta( $tmpMyOrderID, '_cryptodec_best_btc_wallet', true ) ); ?></td> 242 248 </tr> 243 249 <tr> 244 250 <td>Amount in BTC to transfer: </td> 245 <td><?php echo wptexturize( get_post_meta( $ order->id, '_cryptodec_total', true ) ); ?></td>251 <td><?php echo wptexturize( get_post_meta( $tmpMyOrderID, '_cryptodec_total', true ) ); ?></td> 246 252 </tr> 247 253 <tr> … … 251 257 </table> 252 258 253 <?php254 } 259 <?php 260 } -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/cron.php
r2465341 r2590475 16 16 $hashExists = null; 17 17 $res = null; 18 // TODO:: to options:: 18 19 $ttl = 60 * 60 * 4; // 4 hours payment awaiting time then cancel. 19 $ttlh = 60 * 60 * 6; // 24hours to get 3+ confirmations20 $ttlh = 60 * 60 * 48; // 48 hours to get 3+ confirmations 20 21 21 22 $query = "SELECT * FROM `$tableName` WHERE `order_status` = 'ONHOLD' OR `order_status` = 'PENDING' "; -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/itls-btc-wp-class.php
r2590458 r2590475 2 2 namespace Itls\CryptoWp; 3 3 4 include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php'; // !!!4 include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php'; 5 5 include_once plugin_dir_path(__FILE__) . '../lib/btclib/autoload.php'; 6 6 … … 43 43 44 44 } 45 //$ret = '';46 45 return $ret; 47 46 } -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/itls-crypto-dec-payment-gateway-class.php
r2590458 r2590475 97 97 <div style="display: block; margin-left: auto; margin-right: auto; width: 50%;"> 98 98 <p>Copy/Scan</p> 99 <img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> />99 <img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> alt="<?php echo $this->cryptodec_btc_address; ?>" /> 100 100 </div></div> 101 101 <?php -
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/plugin.php
r2590458 r2590475 105 105 } 106 106 107 $my_wallet = get_post_meta($order->id, '_cryptodec_best_btc_wallet', true); 108 $my_total = get_post_meta($order->id, '_cryptodec_total', true); 109 $transaction = get_post_meta($order->id, '_cryptodec_transaction_id', true); ?> 107 $tmpMyOrderID = $order->get_id(); // $order->id !!! 108 109 $my_wallet = get_post_meta($tmpMyOrderID, '_cryptodec_best_btc_wallet', true); 110 $my_total = get_post_meta($tmpMyOrderID, '_cryptodec_total', true); 111 $transaction = get_post_meta($tmpMyOrderID, '_cryptodec_transaction_id', true); ?> 110 112 <div class="form-field form-field-wide"> 111 113 <img src='<?php echo plugin_dir_url(__FILE__) . '../assets/images/logo-gw.png'; ?>' alt="CryptoDec"> … … 169 171 ?> 170 172 <th>QR Code</th> 171 <td><img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> /></td>173 <td><img height="120" width="120" style="display: block; max-width:120px; max-height:120px; width: auto; height: auto;" src=<?php echo $qrCode; ?> alt="<?php echo $wallet; ?>" /></td> 172 174 <?php 173 175 } else { … … 220 222 221 223 function cryptodec_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) { 224 225 $tmpMyOrderID = $order->get_id(); // $order->id !!! 222 226 $fields['best_btc_wallet'] = array( 223 227 'label' => __( 'Wallet Address' ), 224 'value' => get_post_meta( $ order->id, '_cryptodec_best_btc_wallet', true ),228 'value' => get_post_meta( $tmpMyOrderID, '_cryptodec_best_btc_wallet', true ), 225 229 ); 226 230 $fields['order_total'] = array( 227 231 'label' => __( 'Total BTC' ), 228 'value' => get_post_meta( $ order->id, '_cryptodec_total', true ),232 'value' => get_post_meta( $tmpMyOrderID, '_cryptodec_total', true ), 229 233 ); 230 234 return $fields; … … 233 237 add_action( 'woocommerce_email_after_order_table', 'cryptodec_woocommerce_email_after_order_table_func' ); 234 238 function cryptodec_woocommerce_email_after_order_table_func( $order ) { 235 ?> 239 240 $tmpMyOrderID = $order->get_id(); // $order->id !!! 241 ?> 236 242 237 243 <h3>Bitcoin Payment Details</h3> … … 239 245 <tr> 240 246 <td>Bitcoin Wallet Address: </td> 241 <td><?php echo wptexturize( get_post_meta( $ order->id, '_cryptodec_best_btc_wallet', true ) ); ?></td>247 <td><?php echo wptexturize( get_post_meta( $tmpMyOrderID, '_cryptodec_best_btc_wallet', true ) ); ?></td> 242 248 </tr> 243 249 <tr> 244 250 <td>Amount in BTC to transfer: </td> 245 <td><?php echo wptexturize( get_post_meta( $ order->id, '_cryptodec_total', true ) ); ?></td>251 <td><?php echo wptexturize( get_post_meta( $tmpMyOrderID, '_cryptodec_total', true ) ); ?></td> 246 252 </tr> 247 253 <tr> … … 251 257 </table> 252 258 253 <?php254 } 259 <?php 260 }
Note: See TracChangeset
for help on using the changeset viewer.