Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $wsdl = "https://uatsky.yesbank.in/app/uat/InwardRemittanceByPartnerService2SSL?wsdl";
- $uri = "https://uatsky.yesbank.in/app/uat/InwardRemittanceByPartnerService2SSL";
- $username = "testclient";
- $password = "test@123";
- $clientId = "iN8wU3yQ7wR7bO5xJ7vB4pS2pN5sH7hG2pO5eT8rJ2gI2uX1oL";
- $clientSecret = "8ec936f3-5f7f-4360-b0f1-3a37ffb05fb1";
- $basicAuth = base64_encode($username.":".$password);
- $params = array(
- 'getBalance' => array( 'version' => '1',
- 'partnerCode' => 'PLACID'
- ),
- );
- $client = new SoapClient(null, array(
- "location" => $wsdl,
- "uri" => $uri,
- "trace"=>1,
- "exceptions"=>0,
- /* 'stream_context' => stream_context_create(
- [
- 'http' =>
- [
- 'header' => implode(
- "\r\n",
- [
- 'Accept: application/soap+xml',
- 'X-IBM-Client-Id: ' . $clientId,
- 'X-IBM-Client-Secret: ' . $clientSecret,
- ]
- ),
- ],
- ]
- )*/
- ));
- $auth = array(
- 'Username' => $username,
- 'Password' => $password,
- 'X-IBM-Client-Id' => $clientId,
- 'X-IBM-Client-Secret' => $clientSecret,
- );
- $header[] = new SOAPHeader($wsdl, 'authenticate', $auth, false);
- $header[] = new SoapHeader('header','Authorization: Basic '.$basicAuth);
- $client->__setSoapHeaders($header);
- $result = $client->getBalance($params);
- echo "<pre>";
- var_dump($result);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement