Skip to content

Commit 7cafa69

Browse files
authored
Merge pull request #4 from alexminza/MerchantHandlerURI
MaibDescription merchantHandler
2 parents e174b32 + 0efb51f commit 7cafa69

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

MaibDescription.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@
77
class MaibDescription extends Description {
88
/**
99
* @param array $options Custom options to apply to the description
10+
* @param string $merchantHandler Merchant Handler URI
1011
* - formatter: Can provide a custom SchemaFormatter class
1112
*/
12-
public function __construct( array $options = [ ] ) {
13+
public function __construct( array $options = [ ], $merchantHandler = '/ecomm2/MerchantHandler' ) {
1314
parent::__construct( [
1415
'name' => 'Maib API',
1516
// 'baseUrl' => 'https://ecomm.maib.md:4455/ecomm2/MerchantHandler/', // demo server
1617
'operations' => [
1718
'registerSmsTransaction' => [
1819
'httpMethod' => 'POST',
19-
'uri' => '/ecomm2/MerchantHandler',
20+
'uri' => $merchantHandler,
2021
'description' => 'identifies the request for register SMS transaction',
2122
'responseModel' => 'getResponse',
2223
'parameters' => [
@@ -65,7 +66,7 @@ public function __construct( array $options = [ ] ) {
6566
],
6667
'registerDmsAuthorization' => [
6768
'httpMethod' => 'POST',
68-
'uri' => '/ecomm2/MerchantHandler',
69+
'uri' => $merchantHandler,
6970
'description' => 'identifies the request for register DMS transaction',
7071
'responseModel' => 'getResponse',
7172
'parameters' => [
@@ -115,7 +116,7 @@ public function __construct( array $options = [ ] ) {
115116
],
116117
'makeDMSTrans' => [
117118
'httpMethod' => 'POST',
118-
'uri' => '/ecomm2/MerchantHandler',
119+
'uri' => $merchantHandler,
119120
'description' => 'identifies the request for execute DMS transaction',
120121
'responseModel' => 'getResponse',
121122
'parameters' => [
@@ -170,7 +171,7 @@ public function __construct( array $options = [ ] ) {
170171
],
171172
'getTransactionResult' => [
172173
'httpMethod' => 'POST',
173-
'uri' => '/ecomm2/MerchantHandler',
174+
'uri' => $merchantHandler,
174175
'description' => 'identifies the request for get transaction result',
175176
'responseModel' => 'getResponse',
176177
'parameters' => [
@@ -195,7 +196,7 @@ public function __construct( array $options = [ ] ) {
195196
],
196197
'revertTransaction' => [
197198
'httpMethod' => 'POST',
198-
'uri' => '/ecomm2/MerchantHandler',
199+
'uri' => $merchantHandler,
199200
'description' => 'identifies the request for revert transaction',
200201
'responseModel' => 'getResponse',
201202
'parameters' => [
@@ -219,7 +220,7 @@ public function __construct( array $options = [ ] ) {
219220
],
220221
'closeDay' => [
221222
'httpMethod' => 'POST',
222-
'uri' => '/ecomm2/MerchantHandler',
223+
'uri' => $merchantHandler,
223224
'description' => 'End of business day',
224225
'responseModel' => 'getResponse',
225226
'parameters' => [

0 commit comments

Comments
 (0)