Skip to content

Commit

Permalink
Add masterpass loyalty retrieve endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
onurpolattimur committed May 3, 2024
1 parent ca6c8bd commit 25a62d9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/config/sample_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class SampleConfig
public static function craftgate()
{
return new Craftgate(array(
'apiKey' => 'api-key',
'apiKey' => 'api-key-2',
'secretKey' => 'secret-key',
'baseUrl' => 'https://sandbox-api.craftgate.io'
'baseUrl' => 'http://localhost:8000'
));
}
}
File renamed without changes.
13 changes: 13 additions & 0 deletions samples/retrieve_masterpass_loyalties.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

require_once('config/sample_config.php');

$request = array(
'cardName' => "YKB Test Kart",
'msisdn' => "900000000000",
'binNumber' => "404809",
);

$response = SampleConfig::craftgate()->masterpass()->retrieveLoyalties($request);

print_r($response);
6 changes: 6 additions & 0 deletions src/Adapter/MasterpassPaymentAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ public function complete3DSMasterpassPayment(array $request)
$path = "/payment/v2/masterpass-payments/3ds-complete";
return $this->httpPost($path, $request);
}

public function retrieveLoyalties(array $request)
{
$path = "/payment/v2/masterpass-payments/loyalties/retrieve";
return $this->httpPost($path, $request);
}
}

0 comments on commit 25a62d9

Please sign in to comment.