Changeset 2658951
- Timestamp:
- 01/17/2022 09:06:57 PM (4 years ago)
- Location:
- rimplenet/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
includes/class-wallets.php (modified) (6 diffs)
-
includes/class-withdrawals.php (modified) (4 diffs)
-
includes/layouts/withdrawal-request-txns.php (modified) (1 diff)
-
rimplenet.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rimplenet/trunk/README.txt
r2627753 r2658951 81 81 == Changelog == 82 82 83 = 1.1.29 = 84 * Check of ID on credit, debit function and other bugs fixes 83 85 = 1.1.28 = 84 86 * New Withdrawal Format Introduced, refer to docs on how to use … … 136 138 137 139 == Upgrade Notice === 140 = 1.1.29 = 141 * Check of ID on credit, debit function and other bugs fixes 138 142 = 1.1.28 = 139 143 * New Withdrawal Format Introduced, refer to docs on how to use -
rimplenet/trunk/includes/class-wallets.php
r2627751 r2658951 409 409 global $wpdb; 410 410 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 411 420 $inputed_data = array( 412 421 "request_id"=>$request_id,"user_id"=>$user_id, "amount_to_add"=>$amount_to_add, "wallet_id"=>$wallet_id); … … 423 432 $result = array(); 424 433 $additonal_result = array(); 425 $txn_request_id = $user_id."_".$request_id;426 434 427 435 $row_result = $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_key='txn_request_id' AND meta_value='$txn_request_id'" ); … … 879 887 880 888 881 }889 } 882 890 883 891 … … 1061 1069 1062 1070 function 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 ) { 1064 1073 return false; 1065 1074 } … … 1089 1098 1090 1099 1091 function rimplenet_form_field( $key, $args, $value = null ) {1100 function rimplenet_form_field($key, $args, $value = null ) { 1092 1101 $defaults = array( 1093 1102 'type' => 'text', … … 1264 1273 echo $field; // WPCS: XSS ok. 1265 1274 } 1266 } 1275 } 1276 1277 ?> -
rimplenet/trunk/includes/class-withdrawals.php
r2627751 r2658951 180 180 181 181 ?> 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; ?>"> 186 186 <button class="rimplenet-button rimplenet-cancel-withdraw-btn btn btn-danger btn-sm" id="rimplenet-cancel-withdraw-btn" 187 187 type="submit" value="CANCEL WITHDRAWAL"> … … 189 189 </button> 190 190 </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> 192 200 <?php 193 201 } … … 201 209 $wallet_obj = new Rimplenet_Wallets(); 202 210 203 $rimplenet_txn_ref = 'wdr_refund_'.$txn_id;211 $rimplenet_txn_ref = 'wdr_refund_'.$txn_id; 204 212 $tags['txn_ref'] = $rimplenet_txn_ref; 205 213 $rimplenet_user = get_post_field( 'post_author', $txn_id ); … … 209 217 210 218 $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 213 227 if($ext_txn_id>1){ 214 228 $info = "This transaction with ref-$rimplenet_txn_ref was already cancelled and refunded. Lookup ID = #$ext_txn_id"; 215 229 } 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){ 217 234 218 235 add_post_meta($txn_id, 'txn_status','rejected_and_refunded'); -
rimplenet/trunk/includes/layouts/withdrawal-request-txns.php
r2609583 r2658951 276 276 <tr> 277 277 <th scope="row"> #<?php echo $txn_id ?> <br> <?php echo $status; ?></th> 278 <td> <?php echo $date_time ?></t h>278 <td> <?php echo $date_time ?></td> 279 279 <td> <?php echo $amount_formatted_disp; ?> </td> 280 280 <td> <?php echo get_the_author_meta('user_login',$author_id); ?> </td> -
rimplenet/trunk/rimplenet.php
r2627753 r2658951 17 17 * Plugin URI: https://rimplenet.com 18 18 * Description: Rimplenet FinTech | E-Banking | E-Wallets | Investments Plugin | MLM | Matrix Tree | Referral Manager 19 * Version: 1.1.2 819 * Version: 1.1.29 20 20 * Author: Nellalink 21 21 * Author URI: https://rimplenet.com … … 35 35 * Using SemVer - https://semver.org 36 36 */ 37 define( 'RIMPLENET_VERSION', '1.1.2 8' );37 define( 'RIMPLENET_VERSION', '1.1.29' ); 38 38 39 39 /**
Note: See TracChangeset
for help on using the changeset viewer.