Skip to content

Commit

Permalink
space timed
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Apr 3, 2024
1 parent 516e116 commit 3f9c84a
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/Vendors/IslamiBankApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ public function __construct()
*/
public function fetchBalance(string $currency): SimpleXMLElement
{
$xmlString = '
<ns2:userID>'.$this->config[$this->status]['username'].'</ns2:userID>
<ns2:password>'.$this->config[$this->status]['password'].'</ns2:password>
<ns2: currency>'.$currency.'</ns2: currency>
';
$xmlString = "
<ns2:userID>{$this->config[$this->status]['username']}</ns2:userID>
<ns2:password>{$this->config[$this->status]['password']}</ns2:password>
<ns2:currency>{$currency}</ns2:currency>";
$soapMethod = 'fetchBalance';
$response = $this->connectionCheck($xmlString, $soapMethod);

Expand Down Expand Up @@ -301,16 +300,15 @@ private function connectionCheck($xml_post_string, $method): SimpleXMLElement

public function xmlGenerate($string, $method): string
{
return '<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://service.ws.mt.ibbl" xmlns:xsd="http://bean.ws.mt.ibbl/xsd">
<soapenv:Header/>
<soapenv:Body>
<ns2:'.$method.' xmlns:ns2="http://service.ws.mt.ibbl">
'.$string.'
</ns2:'.$method.'>
</soapenv:Body>
</soapenv:Envelope>
';
return <<<XML
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ser="http://service.ws.mt.ibbl" xmlns:xsd="http://bean.ws.mt.ibbl/xsd">
<soapenv:Header/>
<soapenv:Body>
<ns2:{$method} xmlns:ns2="http://service.ws.mt.ibbl">{$string}</ns2:{$method}>
</soapenv:Body>
</soapenv:Envelope>
XML;
}

/**
Expand Down

0 comments on commit 3f9c84a

Please sign in to comment.