From: indresh singh bhadoria Date: Thu, 04 May 2017 20:00:13 +0530 Subject: change functionality,view and add sharing document alert message --- change functionality,view and add sharing document alert message --- --- 'a/accountstatement.php' +++ b/accountstatement.php @@ -1,18 +1,40 @@ $code, + 'grant_type' => 'authorization_code', + 'client_id' => 'NIELN3M9', + 'client_secret' => 'DQ3pWgCtB0I3EhSrtTXU', + 'redirect_uri' => 'http://localhost/digibank/loanapproval.php', +); +$vh = curl_init($url); +curl_setopt($vh, CURLOPT_CUSTOMREQUEST, "POST"); +curl_setopt($vh, CURLOPT_POST, true); +curl_setopt($vh, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds +curl_setopt($vh, CURLOPT_POSTFIELDS, $post); +//curl_setopt($vh, CURLOPT_HTTPHEADER, $headers); +curl_setopt($vh, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($vh, CURLOPT_SSL_VERIFYHOST, 0); +curl_setopt($vh, CURLOPT_RETURNTRANSFER, true); +$result = curl_exec($vh); +curl_close($vh); +$notgettingdata = explode('¿', $result); +$getToken = json_decode($notgettingdata[1]); +$access_token = $getToken->access_token; + + + $headers = array( 'Authorization: Bearer ' . $access_token //'Authorization: Basic '. base64_encode("$username:$password") ); $urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'; $vhf = curl_init($urlFile); -//curl_setopt($vhf, CURLOPT_CUSTOMREQUEST, "POST"); -//curl_setopt($vhf, CURLOPT_POST, true); curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers); -//curl_setopt($vhf, CURLOPT_POSTFIELDS, $post); -//curl_setopt($vhf, CURLOPT_FOLLOWLOCATION, true); curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true); @@ -20,24 +42,8 @@ $resFile = curl_exec($vhf); curl_close($vhf); $resFileNew = explode('¿', $resFile); $dataF = json_decode($resFileNew[1], TRUE); +print_r($dataF); - -$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued'; -$vhi = curl_init($urlissued); -//curl_setopt($vhi, CURLOPT_CUSTOMREQUEST, "GET"); -//curl_setopt($vhi, CURLOPT_POST, true); -curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds -curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers); -//curl_setopt($vhi, CURLOPT_POSTFIELDS, $post); -//curl_setopt($vhi, CURLOPT_FOLLOWLOCATION, true); -curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0); -curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0); -curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true); -$resissued = curl_exec($vhi); -$resissuedErr = curl_error($vhi); -curl_close($vhi); -$issuedNew = explode('¿', $resissued); -$dataI = json_decode($issuedNew[1], TRUE); ?> @@ -118,7 +124,7 @@ $dataI = json_decode($issuedNew[1], TRUE
- + @@ -139,10 +145,8 @@ $dataI = json_decode($issuedNew[1], TRUE - - @@ -150,8 +154,7 @@ $dataI = json_decode($issuedNew[1], TRUE - - - - - - - - - - -
- - -
-
- -
-
-
- -
-
-
-
-
-
-
-
- - - - - - - - - &uri=&id="> - * * */ ?> - - - -
NameSizeDate
- "; - echo($api_detail['name']); - } elseif ($api_detail['type'] == "file") { - echo " "; - echo($api_detail['name']); - } - ?> -
- -
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - -
NameSizeDate
- "; - echo($issued_detail['name']); - ?> - - -
- -
-
-
-
-
-
-
-
-
-
-
-
- -
-
- - - - - - - - --- 'a/loanapproval.php' +++ b/loanapproval.php @@ -2,9 +2,6 @@ include 'header.php'; $code = $_GET['code']; $state = $_GET['state']; -$headers = array( - 'Content-Type:application/json' -); $url = "https://developers.digitallocker.gov.in/public/oauth2/1/token"; $post = array( 'code' => $code, @@ -27,65 +24,280 @@ curl_close($vh); $notgettingdata = explode('¿', $result); $getToken = json_decode($notgettingdata[1]); $access_token = $getToken->access_token; + + +$headers = array( + 'Authorization: Bearer ' . $access_token + //'Authorization: Basic '. base64_encode("$username:$password") +); +$urlFile = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'; +$vhf = curl_init($urlFile); +curl_setopt($vhf, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds +curl_setopt($vhf, CURLOPT_HTTPHEADER, $headers); +curl_setopt($vhf, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($vhf, CURLOPT_SSL_VERIFYHOST, 0); +curl_setopt($vhf, CURLOPT_RETURNTRANSFER, true); +$resFile = curl_exec($vhf); +curl_close($vhf); +$resFileNew = explode('¿', $resFile); +$dataF = json_decode($resFileNew[1], TRUE); + + + + +$headers = array( + 'Authorization: Bearer ' . $access_token + //'Authorization: Basic '. base64_encode("$username:$password") +); +$urlissued = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/issued'; +$vhi = curl_init($urlissued); +curl_setopt($vhi, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds +curl_setopt($vhi, CURLOPT_HTTPHEADER, $headers); +curl_setopt($vhi, CURLOPT_SSL_VERIFYPEER, 0); +curl_setopt($vhi, CURLOPT_SSL_VERIFYHOST, 0); +curl_setopt($vhi, CURLOPT_RETURNTRANSFER, true); +$resissued = curl_exec($vhi); +$resissuedErr = curl_error($vhi); +curl_close($vhi); +$issuedNew = explode('¿', $resissued); +$dataI = json_decode($issuedNew[1], TRUE); ?> -
-
-
-
-
-

- Important security information: -

-
+ + + + + + + + + DigiLocker Service Center + + + + + + + + + + +
-
    -
  • - Before logging in, please ensure that the URL address on the address bar of your internet browser starts with digilockerservicecenter.gov.in. -
  • -
  • - Never provide your User ID or password to any one on phone or in response to a mail. Report a suspicious mail. -
  • -
  • - Do not enter login or other sensitive information in any pop up window. -
  • -
  • - Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, click here. -
  • -
+
+
+
+
+

+ Important security information: +

+
+
+
    +
  • + Before logging in, please ensure that the URL address on the address bar of your internet browser starts with digilockerservicecenter.gov.in. +
  • +
  • + Never provide your User ID or password to any one on phone or in response to a mail. Report a suspicious mail. +
  • +
  • + Do not enter login or other sensitive information in any pop up window. +
  • +
  • + Verify the site's security certificate by clicking on the padlock icon of your internet browser. For more details, click here. +
  • +
+
+
-
+ +
+
+ +
+ + +
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + &uri=&id="> + * * */ ?> + + + +
NameSizeDate
)"> + "; + echo($api_detail['name']); + } elseif ($api_detail['type'] == "file") { + echo " "; + echo($api_detail['name']); + } + ?> +
+ + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + + -
-
-
Proceed
+
+ + + + + + +
NameSizeDate
+ "; + echo($issued_detail['name']); + ?> + + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
-
+ + + + - - - - \ No newline at end of file + + + + \ No newline at end of file --- 'a/uri.php' +++ b/uri.php @@ -7,16 +7,12 @@ $headers = array( $urlUri = 'https://developers.digitallocker.gov.in/public/oauth2/1/files/'.$id; $uri = curl_init($urlUri); curl_setopt($uri, CURLOPT_CUSTOMREQUEST, "GET"); -//curl_setopt($uri, CURLOPT_POST, true); curl_setopt($uri, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds curl_setopt($uri, CURLOPT_HTTPHEADER, $headers); -//curl_setopt($uri, CURLOPT_POSTFIELDS, $post); -//curl_setopt($uri, CURLOPT_FOLLOWLOCATION, true); curl_setopt($uri, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($uri, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($uri, CURLOPT_RETURNTRANSFER, true); $uriResissued = curl_exec($uri); - curl_close($uri); print_r($uriResissued); ?>