Skip to content

Commit

Permalink
BKM Express flow improvements (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
deryacakmak authored Jan 3, 2025
1 parent 5600f9f commit f316fbc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions samples/complete_bkm_express_payment_by_token.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

require_once('config/sample_config.php');

$request = array(
'status' => true,
'message' => 'İşlem Başarılı',
'ticketId' => '7c0f7c89-e954-46d5-ad37-2a5c0b5f0356',
'bkmExpressPaymentToken' => '23f4e147-2c4e-4a2c-8a67-9c783d813b79'
);

$response = SampleConfig::craftgate()->bkmExpress()->complete($request);

print_r($response);
7 changes: 7 additions & 0 deletions samples/retrieve_bkm_express_payment_by_token.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

require_once('config/sample_config.php');

$response = SampleConfig::craftgate()->bkmExpress()->retrievePaymentByToken("23f4e147-2c4e-4a2c-8a67-9c783d813b79");

print_r($response);
6 changes: 6 additions & 0 deletions src/Adapter/BkmExpressPaymentAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ public function retrievePayment($ticketId)
$path = "/payment/v1/bkm-express/payments/" . $ticketId;
return $this->httpGet($path);
}

public function retrievePaymentByToken($token)
{
$path = "/payment/v1/bkm-express/" . $token;
return $this->httpGet($path);
}
}

0 comments on commit f316fbc

Please sign in to comment.