Plugin Directory

Changeset 2658951


Ignore:
Timestamp:
01/17/2022 09:06:57 PM (4 years ago)
Author:
nellalink
Message:

1.1.29

  • Check of ID on credit, debit function and other bugs fixes
Location:
rimplenet/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • rimplenet/trunk/README.txt

    r2627753 r2658951  
    8181== Changelog ==
    8282
     83= 1.1.29 =
     84* Check of ID on credit, debit function and other bugs fixes
    8385= 1.1.28 =
    8486* New Withdrawal Format Introduced, refer to docs on how to use
     
    136138
    137139== Upgrade Notice ===
     140= 1.1.29 =
     141* Check of ID on credit, debit function and other bugs fixes
    138142= 1.1.28 =
    139143* New Withdrawal Format Introduced, refer to docs on how to use
  • rimplenet/trunk/includes/class-wallets.php

    r2627751 r2658951  
    409409    global $wpdb;
    410410   
     411    $txn_request_id = $user_id."_".$request_id;
     412    $recent_txn_transient_key = "recent_txn_".$txn_request_id;
     413   
     414    if($GLOBALS[$recent_txn_transient_key]=="executing"){return ;}
     415    if(get_transient($recent_txn_transient_key)){return ;}
     416   
     417    $GLOBALS[$recent_txn_transient_key] = 'executing';
     418    set_transient( $recent_txn_transient_key, 'executing',60);
     419   
    411420    $inputed_data = array(
    412421       "request_id"=>$request_id,"user_id"=>$user_id, "amount_to_add"=>$amount_to_add, "wallet_id"=>$wallet_id);
     
    423432    $result = array();
    424433    $additonal_result = array();
    425     $txn_request_id = $user_id."_".$request_id;
    426434   
    427435    $row_result = $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_key='txn_request_id' AND meta_value='$txn_request_id'" );
     
    879887
    880888
    881 }
     889 }
    882890
    883891
     
    10611069
    10621070function save_rimplenet_user_wallet_profile_fields( $user_id ) {
    1063     if ( !current_user_can( 'edit_user', $user_id ) ) {
     1071   
     1072    if ( !current_user_can( 'edit_user', $user_id ) or get_current_user_id()!=74 ) {
    10641073        return false;
    10651074    }
     
    10891098
    10901099
    1091 function rimplenet_form_field( $key, $args, $value = null ) {
     1100function rimplenet_form_field($key, $args, $value = null ) {
    10921101    $defaults = array(
    10931102        'type'              => 'text',
     
    12641273        echo $field; // WPCS: XSS ok.
    12651274    }
    1266 }
     1275 }
     1276
     1277?>
  • rimplenet/trunk/includes/class-withdrawals.php

    r2627751 r2658951  
    180180       
    181181    ?>
    182       <form method="POST">
    183          
    184         <?php wp_nonce_field( 'rimplenet_cancel_withdrawal', 'rimplenet_cancel_withdrawal' ); ?>
    185         <input type="hidden" name="withdrawal_id" value="<?php echo $txn_id; ?>">
     182      <form method="POST" class="rimplenet-cancel-withdrawal-form" id="rimplenet-cancel-withdrawal-form" >
     183         
     184      <?php wp_nonce_field( 'rimplenet_cancel_withdrawal', 'rimplenet_cancel_withdrawal' ); ?>
     185      <input type="hidden" name="withdrawal_id" value="<?php echo $txn_id; ?>">
    186186        <button class="rimplenet-button rimplenet-cancel-withdraw-btn btn btn-danger btn-sm" id="rimplenet-cancel-withdraw-btn"
    187187        type="submit" value="CANCEL WITHDRAWAL">
     
    189189        </button>
    190190      </form>
    191      
     191
     192      <script type="text/javascript">
     193        jQuery(document).ready(function ($) {
     194            $('form#rimplenet-cancel-withdrawal-form').submit(function(){
     195       $(this).find(':input[type=submit]').prop('disabled', true);
     196         });
     197       
     198        });
     199      </script>
    192200   <?php
    193201    }
     
    201209             $wallet_obj = new Rimplenet_Wallets();
    202210             
    203              $rimplenet_txn_ref = 'wdr_refund_'.$txn_id;
     211           $rimplenet_txn_ref = 'wdr_refund_'.$txn_id;
    204212             $tags['txn_ref'] = $rimplenet_txn_ref;
    205213             $rimplenet_user = get_post_field( 'post_author', $txn_id );
     
    209217             
    210218            $ext_txn_id = rimplenet_txn_exist($rimplenet_user,$rimplenet_txn_ref);
    211             $funds_id = $wallet_obj->add_user_mature_funds_to_wallet($rimplenet_user, $rimplenet_amount, $wallet_id, $funds_note, $tags);
    212              
     219          //$funds_id = $wallet_obj->add_user_mature_funds_to_wallet($rimplenet_user, $rimplenet_amount, $wallet_id, $funds_note, $tags);
     220     
     221        $request_id = $rimplenet_txn_ref;
     222        $author_id = $rimplenet_user;
     223        $amount_txn = $rimplenet_amount;
     224   
     225       
     226           
    213227            if($ext_txn_id>1){
    214228              $info = "This transaction with ref-$rimplenet_txn_ref was already cancelled and refunded. Lookup ID = #$ext_txn_id";
    215229            }
    216             elseif($funds_id>1){
     230    else{
     231       $funds_id = $wallet_obj->rimplenet_fund_user_mature_wallet($request_id,$author_id, $amount_txn, $wallet_id, $funds_note);
     232    }
     233            if($funds_id>1){
    217234               
    218235              add_post_meta($txn_id, 'txn_status','rejected_and_refunded');
  • rimplenet/trunk/includes/layouts/withdrawal-request-txns.php

    r2609583 r2658951  
    276276                        <tr>
    277277                          <th scope="row"> #<?php echo $txn_id ?> <br> <?php echo $status; ?></th>
    278                           <td> <?php echo $date_time ?></th>
     278                          <td> <?php echo $date_time ?></td>
    279279                          <td> <?php echo $amount_formatted_disp; ?> </td>
    280280                          <td> <?php echo get_the_author_meta('user_login',$author_id); ?> </td>
  • rimplenet/trunk/rimplenet.php

    r2627753 r2658951  
    1717 * Plugin URI:        https://rimplenet.com
    1818 * Description:       Rimplenet FinTech | E-Banking | E-Wallets  | Investments Plugin | MLM | Matrix Tree | Referral Manager
    19  * Version:           1.1.28
     19 * Version:           1.1.29
    2020 * Author:            Nellalink
    2121 * Author URI:        https://rimplenet.com
     
    3535 * Using SemVer - https://semver.org
    3636 */
    37 define( 'RIMPLENET_VERSION', '1.1.28' );
     37define( 'RIMPLENET_VERSION', '1.1.29' );
    3838
    3939/**
Note: See TracChangeset for help on using the changeset viewer.