Skip to content

Commit

Permalink
set url update
Browse files Browse the repository at this point in the history
  • Loading branch information
farukcam committed Jul 27, 2019
1 parent dea7375 commit feef84e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions src/Http/Base/BaseClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class BaseClass {
protected $orderid;
protected $amount;
protected $cardexpiredateyear;
protected $successurl = "";
protected $errorurl = "";
protected $cardtype = "MasterCard";
protected $InstallmentCount = 0;
protected $batchid = 0;
Expand Down Expand Up @@ -148,7 +150,27 @@ public function getBatchId()
return $this->batchid;
}

public function setErrorUrl($url)
{
$this->errorurl = $url;

return $this;
}

public function getErrorUrl()
{
return $this->errorurl;
}

public function setSuccessUrl($url)
{
$this->successurl = $url;

return $this;
}

public function getSuccessUrl()
{
return $this->successurl;
}
}
6 changes: 3 additions & 3 deletions src/Http/Base/Kuveytturk.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class Kuveytturk extends BaseClass {
protected function process()
{
$HashedPassword = base64_encode(sha1(Config::get("kuveytturk.Password"), "ISO-8859-9")); //md5($Password);
$HashData = base64_encode(sha1(Config::get("kuveytturk.MerchantId") . $this->orderid . $this->amount . Config::get("kuveytturk.OkUrl") . Config::get("kuveytturk.FailUrl") . Config::get("kuveytturk.UserName") . $HashedPassword, "ISO-8859-9"));
$HashData = base64_encode(sha1(Config::get("kuveytturk.MerchantId") . $this->orderid . $this->amount . ($this->successurl ? $this->successurl : Config::get("kuveytturk.OkUrl")) .( $this->errorurl ? $this->errorurl : Config::get("kuveytturk.FailUrl")) . Config::get("kuveytturk.UserName") . $HashedPassword, "ISO-8859-9"));
$xml= '<KuveytTurkVPosMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'
. '<APIVersion>' . Config::get("kuveytturk.APIVersion") . '</APIVersion>'
. '<OkUrl>' . Config::get("kuveytturk.OkUrl") . '</OkUrl>'
. '<FailUrl>' . Config::get("kuveytturk.FailUrl") . '</FailUrl>'
. '<OkUrl>' . ($this->successurl ? $this->successurl : Config::get("kuveytturk.OkUrl")) . '</OkUrl>'
. '<FailUrl>' . ( $this->errorurl ? $this->errorurl : Config::get("kuveytturk.FailUrl")) . '</FailUrl>'
. '<HashData>' . $HashData . '</HashData>'
. '<MerchantId>' . Config::get("kuveytturk.MerchantId") . '</MerchantId>'
. '<CustomerId>' . Config::get("kuveytturk.CustomerId") . '</CustomerId>'
Expand Down

0 comments on commit feef84e

Please sign in to comment.