<?php
	include_once('../config.php');   
  
  
        function TokenCall()
        {
                $Remail =  "dailypay2024@gmail.com";
                $Rd =  "ztw35i";  
                
                $MPwdkey = "Uf~,OY{3=;KyN=eX";    
                //$Remail = openssl_decrypt(hex2bin('4969503438756462504655734542614873467764466b49713153776a6a2f484b36327853472f4b5a794b553d'),'AES-128-CBC',$MPwdkey);
                //$Rd = openssl_decrypt(hex2bin('6e73456b743532766f784476723959387954692f7a413d3d'),'AES-128-CBC',$MPwdkey);
                 
                $access_token = '{"email":"'.$Remail.'","password":"'.$Rd.'"}'; 
                $ch = curl_init('https://api.pay2all.in/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', 
                'Content-Type: application/json', 
                'Content-Length: ' . strlen($access_token))                                                                       
                );       																		 
                $response = curl_exec($ch); 
                $json_response = json_decode($response);   
                $RechargeAccess_token = $json_response->access_token; 
                return $RechargeAccess_token;    
        }