Skip to content

Commit 44ca3dd

Browse files
committed
wip
1 parent 46175c6 commit 44ca3dd

38 files changed

+153
-4836
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
composer.phar
22
/composer.lock
33
/vendor/
4+
/tests/
45

56
# php-cs-fixer cache
67
.php_cs.cache

openapi.json

Lines changed: 152 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,132 @@
791791
}
792792
}
793793
},
794-
"/tokenquery": {},
795-
"/tokencancel": {},
794+
"/tokenquery": {
795+
"post": {
796+
"tags": [
797+
"Transaction"
798+
],
799+
"summary": "Query a saved token",
800+
"description": "Get the info about a saved token",
801+
"operationId": "tokenquery",
802+
"parameters": [
803+
{
804+
"$ref": "#/components/parameters/Signature"
805+
}
806+
],
807+
"requestBody": {
808+
"description": "The token object you would query.",
809+
"required": true,
810+
"content": {
811+
"application/json": {
812+
"schema": {
813+
"$ref": "#/components/schemas/TokenQuery"
814+
}
815+
}
816+
}
817+
},
818+
"responses": {
819+
"200": {
820+
"description": "Success response",
821+
"headers": {
822+
"Signature": {
823+
"$ref": "#/components/headers/Signature"
824+
}
825+
},
826+
"content": {
827+
"application/json": {
828+
"schema": {
829+
"properties": {
830+
"salt": {
831+
"type": "string",
832+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
833+
},
834+
"merchant": {
835+
"type": "string",
836+
"example": "PUBLICTESTHUF"
837+
},
838+
"token": {
839+
"$ref": "#/components/schemas/Token"
840+
},
841+
"status": {
842+
"$ref": "#/components/schemas/TokenStatus"
843+
},
844+
"expiry": {
845+
"type": "string",
846+
"description": "The ISO 8601 format of the token expiry date.",
847+
"example": "2004-02-12T15:19:21+00:00"
848+
}
849+
}
850+
}
851+
}
852+
}
853+
}
854+
}
855+
}
856+
},
857+
"/tokencancel": {
858+
"post": {
859+
"tags": [
860+
"Transaction"
861+
],
862+
"summary": "Cancel a saved token",
863+
"description": "Cancel a saved token",
864+
"operationId": "tokencancel",
865+
"parameters": [
866+
{
867+
"$ref": "#/components/parameters/Signature"
868+
}
869+
],
870+
"requestBody": {
871+
"description": "The token object you would cancel.",
872+
"required": true,
873+
"content": {
874+
"application/json": {
875+
"schema": {
876+
"$ref": "#/components/schemas/TokenCancel"
877+
}
878+
}
879+
}
880+
},
881+
"responses": {
882+
"200": {
883+
"description": "Success response",
884+
"headers": {
885+
"Signature": {
886+
"$ref": "#/components/headers/Signature"
887+
}
888+
},
889+
"content": {
890+
"application/json": {
891+
"schema": {
892+
"properties": {
893+
"salt": {
894+
"type": "string",
895+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
896+
},
897+
"merchant": {
898+
"type": "string",
899+
"example": "PUBLICTESTHUF"
900+
},
901+
"token": {
902+
"$ref": "#/components/schemas/Token"
903+
},
904+
"status": {
905+
"$ref": "#/components/schemas/TokenStatus"
906+
},
907+
"expiry": {
908+
"type": "string",
909+
"description": "The ISO 8601 format of the card expiry date.",
910+
"example": "2004-02-12T15:19:21+00:00"
911+
}
912+
}
913+
}
914+
}
915+
}
916+
}
917+
}
918+
}
919+
},
796920
"/starteam": {},
797921
"/startapplepay": {},
798922
"/doapplepay": {}
@@ -1339,6 +1463,10 @@
13391463
"type": "string",
13401464
"enum": ["CIT", "MIT"]
13411465
},
1466+
"TokenStatus": {
1467+
"type": "string",
1468+
"enum": ["active", "used", "cancelled"]
1469+
},
13421470
"CardStatus": {
13431471
"type": "string",
13441472
"enum": ["ACTIVE", "DISABLED"]
@@ -1368,6 +1496,28 @@
13681496
"$ref": "#/components/schemas/TransactionId"
13691497
}
13701498
}
1499+
},
1500+
"TokenQuery": {
1501+
"type": "object",
1502+
"required": [
1503+
"token"
1504+
],
1505+
"properties": {
1506+
"token": {
1507+
"$ref": "#/components/schemas/Token"
1508+
}
1509+
}
1510+
},
1511+
"TokenCancel": {
1512+
"type": "object",
1513+
"required": [
1514+
"token"
1515+
],
1516+
"properties": {
1517+
"token": {
1518+
"$ref": "#/components/schemas/TransactionId"
1519+
}
1520+
}
13711521
}
13721522
}
13731523
}

tests/Api/TransactionApiTest.php

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)