<?php 
    include_once("config.php");
    
                                    
                                    
                                    
                                    
                                        
                                        
                                            $curl = curl_init();
                                            
                                            curl_setopt_array($curl, array(
                                            CURLOPT_URL => 'https://janteriapp.com/NOTIFICATION/firebaseMatka.php',
                                            CURLOPT_RETURNTRANSFER => true,
                                            CURLOPT_ENCODING => '',
                                            CURLOPT_MAXREDIRS => 10,
                                            CURLOPT_TIMEOUT => 0,
                                            CURLOPT_FOLLOWLOCATION => true,
                                            CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
                                            CURLOPT_CUSTOMREQUEST => 'POST',
                                            CURLOPT_POSTFIELDS => array('token' => 'eVwxpZA_TamkJggsZ6qSsC:APA91bHj2eIc4j93umVVThV-WL1ILFAzMqC3vZEaoS-V-6LYCUvv1wO7TRusDtJQkxtTygp22c0MfgfPznnq8_NphsmFEf672UliyJ_SjhvNL6j2SZkUovs','title' => 'Wel com Vijay Saheb','message' => 'Hello Dailypay','audiourl' => '""'),
                                            ));
                                            
                                            $response = curl_exec($curl);
                                            
                                            curl_close($curl);
                                            echo $response;
                                            die;
                                    
                                    
                                  
                                                                    
                                    $access_token = '';  
                                    $ch = curl_init('https://api.payout.v1.runpaisa.com/payout/token');                                             
                                    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
                                    curl_setopt($ch, CURLOPT_POSTFIELDS, $access_token);                                                                  
                                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
                                    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
                                    'x-tera-tenant-region: IN', 
                                    'client_id: 67bc15a2d007e',  
                                    'client_secret: b16411207668bf8a6f742910f5cbd203', 
                                    'content-type: application/json', 
                                    'Content-Length: ' . strlen($access_token))                                                                       
                                    );       																		 
                                    $response = curl_exec($ch);   
                                    $Data = json_decode($response); 
                                    $Token = $Data->data->token;     
                                    
                                 
                                    
                             
                                    
                                    $orderId = '4svA9FkhoibypDg1SqndE3W5V6tKOZuI';// $Decode->data->order_id;  
    								//$orderId = mt_rand(23435,23232323); 
    							    $access_token = '{"order_id":"'.$orderId.'"}';  
                                    $ch = curl_init('https://api.payout.v1.runpaisa.com/payout/status');                                             
                                    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
                                    curl_setopt($ch, CURLOPT_POSTFIELDS, $access_token);                                                                  
                                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
                                    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
                                    'x-tera-tenant-region: IN', 
                                    'token: '.$Token, 
                                    'Content-Type: application/json', 
                                    'Content-Length: ' . strlen($access_token))                                                                       
                                    );       																		 
                                    $response = curl_exec($ch); 
                                    
                                    $Data = json_decode($response);  
                                    echo $Data->utr_no; 
                                    die;
                                    
                                     
        							
    					 
    							
    							$orderId = mt_rand(23435,23232323);
    							$amount = 10;
    							$access_token = '{"beneficiaryName":"Aarti Kachare","orderId":"'.$orderId.'","amount":"'.$amount.'","beneficiaryAccountNumber":"6445319288","beneficiaryIfscCode":"KKBK0001889","paymentMode":"IMPS","callbackurl":"https://www.dailypayservices.in/mob/test1.php"}';  
    					 
    					        echo $access_token;die;
    							$ch = curl_init('https://dev.api.runpaisa.com/payment');                                             
    							curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    							curl_setopt($ch, CURLOPT_POSTFIELDS, $access_token);                                                                  
    							curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    							curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
    							'x-tera-tenant-region: IN', 
    							'client_id: 1234567890',  
    							'token: '.$Token, 
    							'Content-Type: application/json', 
    							'Content-Length: ' . strlen($access_token))                                                                       
    							);       																		 
    							$response = curl_exec($ch); 
    							echo $response; 
    							
    							
    							
    							die;
    							
    							
    							
                                
                                     
                                $URL  = 'https://daemon.takshitsolutions.com/api/app/v1/get-token?projectName=VIJAYx9A4ZkP2w7VfM1r8JdQ3L6tB0HxG7H8&userName=vsn.national@gmail.com';  
                                $crl = curl_init();
                                curl_setopt($crl, CURLOPT_URL, $URL);
                                curl_setopt($crl, CURLOPT_FRESH_CONNECT, true);
                                curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);  
                                $response = curl_exec($crl); 
                                $Data = json_decode($response); 
                                
                                
                              
                                 
                                
                                 $data_string = ' { 
                                "TxtId":"259021459e5754c5c00d5bf171f500c7e68ca844a84f5e340538f3203b863f73",
                                "decimals":"6"
                                }';
                                $ch = curl_init();
                                curl_setopt($ch, CURLOPT_URL,'https://daemon.takshitsolutions.com/api/app/v1/get-transaction-receipt');
                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
                                curl_setopt($ch, CURLOPT_POST, 1);
                                $headers = array();
                                $headers[] = "Accept: application/json";
                                $headers[] = "Authorization: Bearer ".$Data->data;
                                $headers[] = "Content-Type: application/json";
                                curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                                $result = curl_exec($ch); 
                                echo  $result;
                                
                                die;
                            
                               
                            
                                $data_string = '{ 
                                "coinname":"USDT",
                                "fromaddress":"TQHD8d25cyrzdVPBynrPDhip5YVv28J17C",
                                "privatekey":"",
                                "toaddress":"THHu7b4iSqExw6Jvz8TM9Bk3erS2VVSagU",
                                "amount":"1.00",
                                "contractaddress":"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
                                "network":"Tron",
                                "decimals":"6"
                                }';
											
											
                                $ch = curl_init();
                                curl_setopt($ch, CURLOPT_URL,'https://daemon.takshitsolutions.com/api/app/v1/transfer-token');
                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
                                curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
                                curl_setopt($ch, CURLOPT_POST, 1);
                                $headers = array();
                                $headers[] = "Accept: application/json";
                                $headers[] = "Authorization: Bearer ".$Data->data;
                                $headers[] = "Content-Type: application/json";
                                curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                                $result = curl_exec($ch); 
                                echo  $result;
                                
                                
                                
                                die;
                                
                                       
                                    $str_result = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; 
                                    $length_of_string = 32;
                                    $orderId  = substr(str_shuffle($str_result),0, $length_of_string); 
    								//$orderId = mt_rand(23435,23232323);
    							    $amount = 10;
    							    $access_token = '{"beneficiary_name":"Aarti Kachare","order_id":"'.$orderId.'","amount":"'.$amount.'","account_number":"6445319288","ifsc_code":"KKBK0001889","payment_mode":"IMPS"}';  
                                   
                                    echo $access_token; die;
                                    $ch = curl_init('https://api.payout.v1.runpaisa.com/payout/payment');                                             
                                    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
                                    curl_setopt($ch, CURLOPT_POSTFIELDS, $access_token);                                                                  
                                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
                                    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
                                    'x-tera-tenant-region: IN', 
                                    'token: '.$Token, 
                                    'Content-Type: application/json', 
                                    'Content-Length: ' . strlen($access_token))                                                                       
                                    );       																		 
                                    $response = curl_exec($ch);  
                                    echo $response;die;
                                    $Decode = json_decode($response);
                                    
                                    die;
                                    
                                    echo "Txn Request : ".$access_token.'<br>';
                                    echo  '<br><br><br><br><br><br>';
                                    echo "Txn Reponse : ".$response.'<br>';
                                    echo  '<br><br><br><br><br><br>';
                                    die;
                                