Plugin Directory

Changeset 2627751


Ignore:
Timestamp:
11/10/2021 10:08:07 PM (4 years ago)
Author:
nellalink
Message:

New Withdrawal Format Integrated, refer to docs on how to use

Location:
rimplenet/trunk/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rimplenet/trunk/includes/class-wallets.php

    r2609583 r2627751  
    936936}
    937937
     938
     939 //NEW METHOD for checking Txn Exist
     940 function rimplenet_txn_exists($user_id,$txn_id){
     941        global $wpdb;
     942     
     943                  $txn_request_id = $user_id."_".$txn_id;
     944                  $row_result = $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_key='txn_request_id' AND meta_value='$txn_request_id'" );
     945                  if(!empty($row_result)){//it means txn has already exist
     946         
     947                      $funds_id = $row_result->post_id;
     948                      $status = "transaction_already_executed";
     949                      $response_message = "Transaction Already Executed";
     950                      $data = array("txn_id"=>$funds_id);
     951                   }
     952                   else{
     953                       
     954                      $funds_id = $row_result->post_id;
     955                      $status = "transaction_does_not_exist";
     956                      $response_message = "Transaction does not exist";
     957                      $data = array("info"=>"transaction_does_not_exist");
     958                   }
     959   
     960     
     961                if(!empty($status)){
     962                  $result = array("status"=>$status,
     963                                  "message"=>$response_message,
     964                                  "data"=>$data);
     965                }else{
     966                   $result = array("status"=>"unknown_error",
     967                          "message"=>"Unknown Error",
     968                          "data"=>array(
     969                                      "error"=>"unknown_error"
     970                                        )
     971                        );
     972                }
     973               
     974               
     975        return $result;
     976 }
     977
    938978 
    939979 function rimplenet_txn_exist($user_id,$external_txn_id){
  • rimplenet/trunk/includes/class-withdrawals.php

    r2609583 r2627751  
    5353         
    5454        }
     55        elseif($user_wdr_bal<=0){
     56          $status = "user_wdr_bal_is_zero_or_less";
     57          $response_message = "User Withdrawable Balance should not be Zero or Less";
     58          $data = array("error"=>"User Withdrawable Balance should not be Zero or Less");
     59       }
    5560        elseif($amount_to_withdraw<=0){
    5661          $status = "amount_is_zero_or_less";
     
    98103             $status = "success";
    99104             $response_message = "Withdrawal Request Submitted Successful";
     105             do_action('rimplenet_withdraw_user_wallet_bal_submitted_success',$txn_wdr_id, $wallet_id, $amount_to_withdraw, $user_id_withdrawing );
    100106             $data = array("txn_id"=>$txn_wdr_id);
    101107          }
  • rimplenet/trunk/includes/layouts/rimplenet-withdrawal-form.php

    r2610704 r2627751  
    1010  <center>
    1111   <div class="alert alert-danger alert-dismissible fade show" role="alert">
    12           <strong> ERROR: </strong> Please Login or Register to Procced
     12          <strong> ERROR: </strong> Please Login or Register by clicking account tab
    1313          <button type="button" class="close" data-dismiss="alert" aria-label="Close">
    1414            <span aria-hidden="true">&times;</span>
Note: See TracChangeset for help on using the changeset viewer.