Plugin Directory

Changeset 2590475


Ignore:
Timestamp:
08/29/2021 01:57:33 PM (5 years ago)
Author:
infinitools
Message:

small bugs fixed

Location:
decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/cron.php

    r2590458 r2590475  
    1616    $hashExists = null;
    1717    $res = null;
     18    // TODO:: to options::
    1819    $ttl = 60 * 60 * 4; // 4 hours payment awaiting time then cancel.
    19     $ttlh = 60 * 60 * 6; // 24 hours to get 3+ confirmations
     20    $ttlh = 60 * 60 * 48; // 48 hours to get 3+ confirmations
    2021
    2122    $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  
    22namespace Itls\CryptoWp;
    33
    4 include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php'; // !!!
     4include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php';
    55include_once plugin_dir_path(__FILE__) . '../lib/btclib/autoload.php';
    66
     
    4343
    4444            }
    45             //$ret = '';
    4645            return $ret;
    4746        }
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/itls-crypto-dec-payment-gateway-class.php

    r2590458 r2590475  
    9797                      <div style="display: block; margin-left: auto; margin-right: auto; width: 50%;">
    9898                      <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; ?>" />
    100100                    </div></div>
    101101<?php
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/tags/2.0.1/inc/plugin.php

    r2590458 r2590475  
    105105        }
    106106
    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); ?>
    110112        <div class="form-field form-field-wide">
    111113            <img src='<?php echo plugin_dir_url(__FILE__) . '../assets/images/logo-gw.png'; ?>' alt="CryptoDec">
     
    169171            ?>
    170172                  <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>
    172174<?php
    173175        } else {
     
    220222
    221223function cryptodec_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
     224
     225    $tmpMyOrderID = $order->get_id(); // $order->id !!!
    222226    $fields['best_btc_wallet'] = array(
    223227        '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 ),
    225229    );
    226230    $fields['order_total'] = array(
    227231        'label' => __( 'Total BTC' ),
    228         'value' => get_post_meta( $order->id, '_cryptodec_total', true ),
     232        'value' => get_post_meta( $tmpMyOrderID, '_cryptodec_total', true ),
    229233    );
    230234    return $fields;
     
    233237add_action( 'woocommerce_email_after_order_table', 'cryptodec_woocommerce_email_after_order_table_func' );
    234238function cryptodec_woocommerce_email_after_order_table_func( $order ) {
    235     ?>
     239
     240    $tmpMyOrderID = $order->get_id(); // $order->id !!!
     241?>
    236242
    237243    <h3>Bitcoin Payment Details</h3>
     
    239245        <tr>
    240246            <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>
    242248        </tr>
    243249        <tr>
    244250            <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>
    246252        </tr>
    247253        <tr>
     
    251257    </table>
    252258
    253     <?php
    254 }
     259<?php
     260}
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/cron.php

    r2465341 r2590475  
    1616    $hashExists = null;
    1717    $res = null;
     18    // TODO:: to options::
    1819    $ttl = 60 * 60 * 4; // 4 hours payment awaiting time then cancel.
    19     $ttlh = 60 * 60 * 6; // 24 hours to get 3+ confirmations
     20    $ttlh = 60 * 60 * 48; // 48 hours to get 3+ confirmations
    2021
    2122    $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  
    22namespace Itls\CryptoWp;
    33
    4 include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php'; // !!!
     4include_once plugin_dir_path(__FILE__) . '../lib/qrlib/autoload.php';
    55include_once plugin_dir_path(__FILE__) . '../lib/btclib/autoload.php';
    66
     
    4343
    4444            }
    45             //$ret = '';
    4645            return $ret;
    4746        }
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/itls-crypto-dec-payment-gateway-class.php

    r2590458 r2590475  
    9797                      <div style="display: block; margin-left: auto; margin-right: auto; width: 50%;">
    9898                      <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; ?>" />
    100100                    </div></div>
    101101<?php
  • decentralized-bitcoin-cryptodec-payment-gateway-for-woocommerce/trunk/inc/plugin.php

    r2590458 r2590475  
    105105        }
    106106
    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); ?>
    110112        <div class="form-field form-field-wide">
    111113            <img src='<?php echo plugin_dir_url(__FILE__) . '../assets/images/logo-gw.png'; ?>' alt="CryptoDec">
     
    169171            ?>
    170172                  <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>
    172174<?php
    173175        } else {
     
    220222
    221223function cryptodec_woocommerce_email_order_meta_fields( $fields, $sent_to_admin, $order ) {
     224
     225    $tmpMyOrderID = $order->get_id(); // $order->id !!!
    222226    $fields['best_btc_wallet'] = array(
    223227        '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 ),
    225229    );
    226230    $fields['order_total'] = array(
    227231        'label' => __( 'Total BTC' ),
    228         'value' => get_post_meta( $order->id, '_cryptodec_total', true ),
     232        'value' => get_post_meta( $tmpMyOrderID, '_cryptodec_total', true ),
    229233    );
    230234    return $fields;
     
    233237add_action( 'woocommerce_email_after_order_table', 'cryptodec_woocommerce_email_after_order_table_func' );
    234238function cryptodec_woocommerce_email_after_order_table_func( $order ) {
    235     ?>
     239
     240    $tmpMyOrderID = $order->get_id(); // $order->id !!!
     241?>
    236242
    237243    <h3>Bitcoin Payment Details</h3>
     
    239245        <tr>
    240246            <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>
    242248        </tr>
    243249        <tr>
    244250            <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>
    246252        </tr>
    247253        <tr>
     
    251257    </table>
    252258
    253     <?php
    254 }
     259<?php
     260}
Note: See TracChangeset for help on using the changeset viewer.