Skip to content

Commit 8d2c142

Browse files
committed
wip
1 parent 58ebbec commit 8d2c142

File tree

1 file changed

+195
-13
lines changed

1 file changed

+195
-13
lines changed

openapi.json

Lines changed: 195 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,83 @@
503503
}
504504
}
505505
},
506-
"/do": {},
506+
"/do": {
507+
"post": {
508+
"tags": [
509+
"Transaction"
510+
],
511+
"summary": "Do a one-click transaction",
512+
"description": "Do a one-click transaction with a saved card",
513+
"operationId": "do",
514+
"parameters": [
515+
{
516+
"$ref": "#/components/parameters/Signature"
517+
}
518+
],
519+
"requestBody": {
520+
"description": "The transaction object you would init.",
521+
"required": true,
522+
"content": {
523+
"application/json": {
524+
"schema": {
525+
"$ref": "#/components/schemas/OneClickTransaction"
526+
}
527+
}
528+
}
529+
},
530+
"responses": {
531+
"200": {
532+
"description": "Success response",
533+
"headers": {
534+
"Signature": {
535+
"$ref": "#/components/headers/Signature"
536+
}
537+
},
538+
"content": {
539+
"application/json": {
540+
"schema": {
541+
"properties": {
542+
"salt": {
543+
"type": "string",
544+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
545+
},
546+
"merchant": {
547+
"type": "string",
548+
"example": "PUBLICTESTHUF"
549+
},
550+
"transactionId": {
551+
"$ref": "#/components/schemas/TransactionId"
552+
},
553+
"orderRef": {
554+
"$ref": "#/components/schemas/OrderRef"
555+
},
556+
"currency": {
557+
"$ref": "#/components/schemas/Currency"
558+
},
559+
"total": {
560+
"type": "number",
561+
"example": 25.0
562+
},
563+
"redirectUrl": {
564+
"type": "string",
565+
"example": "https://sandbox.simplepay.hu/pay/pay/pspHU/8f4oKRec5R1B696xlxbOcj1jRhhABA2pwSLQDPW60zoGSDWzDU",
566+
"description": "The 3DS challange interface URL."
567+
},
568+
"tokens": {
569+
"type": "array",
570+
"items": {
571+
"$ref": "#/components/schemas/Token"
572+
},
573+
"description": "The recurring payment tokens. Provided only for the initial recurring payment."
574+
}
575+
}
576+
}
577+
}
578+
}
579+
}
580+
}
581+
}
582+
},
507583
"/dorecurring": {},
508584
"/cardcancel": {},
509585
"/tokencancel": {},
@@ -535,7 +611,11 @@
535611
"schemas": {
536612
"Transaction": {
537613
"required": [
538-
"currency"
614+
"currency",
615+
"language",
616+
"timeout",
617+
"methods",
618+
"customerEmail"
539619
],
540620
"properties": {
541621
"customer": {
@@ -916,7 +996,7 @@
916996
"type": "string",
917997
"example": "SPTBXPQFKRNB2NEKBNXJ42KON6VMVME7M82IK5JX3JX7HISC34KU2LVNC4NVXLLB"
918998
},
919-
"TokenTransaction": {
999+
"OneClickTransaction": {
9201000
"type": "object",
9211001
"allOf": [
9221002
{
@@ -926,26 +1006,128 @@
9261006
"type": "object",
9271007
"properties": {
9281008
"threeDSReqAuthMethod": {
929-
"type": "string",
930-
"example": "02"
1009+
"allOf": [
1010+
{
1011+
"$ref": "#/components/schemas/AuthMethod"
1012+
},
1013+
{
1014+
"example": "02"
1015+
}
1016+
]
9311017
},
9321018
"type": {
1019+
"allOf": [
1020+
{
1021+
"$ref": "#/components/schemas/TransactionType"
1022+
},
1023+
{
1024+
"example": "CIT",
1025+
"description": "For one-click payments this should be always 'CIT'."
1026+
}
1027+
]
1028+
},
1029+
"cardId": {
1030+
"$ref": "#/components/schemas/TransactionId"
1031+
},
1032+
"cardSecret": {
9331033
"type": "string",
934-
"example": "MIT"
1034+
"example": "secret-card-password"
1035+
},
1036+
"browser": {
1037+
"type": "object",
1038+
"properties": {
1039+
"ip": {
1040+
"type": "string",
1041+
"example": "127.0.0.1"
1042+
},
1043+
"accept": {
1044+
"type": "string",
1045+
"example": "*/*"
1046+
},
1047+
"agent": {
1048+
"type": "string",
1049+
"example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0",
1050+
"description": "You may use 'navigator.userAgent' in JS."
1051+
},
1052+
"color": {
1053+
"type": "integer",
1054+
"example": 30,
1055+
"description": "You may use 'screen.colorDepth' in JS."
1056+
},
1057+
"height": {
1058+
"type": "integer",
1059+
"example": 900,
1060+
"description": "You may use 'screen.height' in JS."
1061+
},
1062+
"width": {
1063+
"type": "integer",
1064+
"example": 1440,
1065+
"description": "You may use 'screen.width' in JS."
1066+
},
1067+
"java": {
1068+
"type": "boolean",
1069+
"description": "You may use 'navigator.javaEnabled()' in JS."
1070+
},
1071+
"lang": {
1072+
"type": "string",
1073+
"example": "hu-HU",
1074+
"description": "You may use 'navigator.language' in JS."
1075+
},
1076+
"tz": {
1077+
"type": "integer",
1078+
"example": -120,
1079+
"description": "You may use 'new Date().getTimezoneOffset()' in JS."
1080+
}
1081+
}
1082+
}
1083+
}
1084+
}
1085+
]
1086+
},
1087+
"TokenTransaction": {
1088+
"type": "object",
1089+
"allOf": [
1090+
{
1091+
"$ref": "#/components/schemas/Transaction"
1092+
},
1093+
{
1094+
"type": "object",
1095+
"properties": {
1096+
"threeDSReqAuthMethod": {
1097+
"allOf": [
1098+
{
1099+
"$ref": "#/components/schemas/AuthMethod",
1100+
},
1101+
{
1102+
"example": "02"
1103+
}
1104+
]
1105+
},
1106+
"type": {
1107+
"allOf": [
1108+
{
1109+
"$ref": "#/components/schemas/TransactionType",
1110+
},
1111+
{
1112+
"example": "MIT",
1113+
"description": "For token payments this should be always 'MIT'."
1114+
}
1115+
]
9351116
},
9361117
"token": {
9371118
"$ref": "#/components/schemas/Token"
938-
},
939-
"total": {
940-
"type": "number",
941-
"default": 0,
942-
"exclusiveMinimum": true,
943-
"minimum": 0,
944-
"example": 25.0
9451119
}
9461120
}
9471121
}
9481122
]
1123+
},
1124+
"AuthMethod": {
1125+
"type": "string",
1126+
"enum": ["01", "02", "05"]
1127+
},
1128+
"TransactionType": {
1129+
"type": "string",
1130+
"enum": ["CIT", "MIT"]
9491131
}
9501132
}
9511133
}

0 commit comments

Comments
 (0)