Skip to content

Commit

Permalink
Merge branch 'ok-new-version' into ok-payment-services
Browse files Browse the repository at this point in the history
  • Loading branch information
osman-keser committed Mar 18, 2024
2 parents a4b08ee + 5328d95 commit ae6fbae
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Iyzipay/DefaultHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ public function put($url, $header, $content)
));
}

public function patch($url, $header, $content)
{
return $this->curl->exec($url, array(
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => $content,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_VERBOSE => false,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => $header
));
}

public function delete($url, $header, $content = null)
{
return $this->curl->exec($url, array(
Expand Down
2 changes: 2 additions & 0 deletions src/Iyzipay/Model/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ class Status
{
const SUCCESS = "success";
const FAILURE = "failure";
const ACTIVE = "ACTIVE";
const PASSIVE = "PASSIVE";
}
4 changes: 4 additions & 0 deletions src/Iyzipay/RequestStringBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ public static function requestToStringQuery(Request $request, $type = null)
$stringQuery .= "&locale=" . $request->getLocale();
}

if ($type == 'locale') {
$stringQuery = "?locale=" . $request->getLocale();
}

if($type == 'defaultParams' ) {
if($request->getConversationId()) {
$stringQuery = "?conversationId=" . $request->getConversationId();
Expand Down

0 comments on commit ae6fbae

Please sign in to comment.