Skip to content

Commit cb4c90e

Browse files
committed
wip
1 parent 14c4acd commit cb4c90e

File tree

2 files changed

+109
-5
lines changed

2 files changed

+109
-5
lines changed

openapi.json

Lines changed: 109 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,13 @@
6767
"example": "PUBLICTESTHUF"
6868
},
6969
"orderRef": {
70-
"type": "string",
71-
"example": "101010515680292482600"
70+
"$ref": "#/components/schemas/OrderRef"
7271
},
7372
"currency": {
7473
"$ref": "#/components/schemas/Currency"
7574
},
7675
"transactionId": {
77-
"type": "number",
78-
"example": "99844942"
76+
"$ref": "#/components/schemas/TransactionId"
7977
},
8078
"timeout": {
8179
"type": "string",
@@ -106,6 +104,71 @@
106104
}
107105
}
108106
}
107+
},
108+
"/finish": {
109+
"post": {
110+
"tags": [
111+
"Transaction"
112+
],
113+
"summary": "Finish a two-step transaction",
114+
"description": "Finish an authorized two-step transaction.",
115+
"operationId": "finish",
116+
"parameters": [
117+
{
118+
"$ref": "#/components/parameters/Signature"
119+
}
120+
],
121+
"requestBody": {
122+
"description": "The authorized transaction object you would like to finish.",
123+
"required": true,
124+
"content": {
125+
"application/json": {
126+
"schema": {
127+
"$ref": "#/components/schemas/AuthorizedTransaction"
128+
}
129+
}
130+
}
131+
},
132+
"responses": {
133+
"200": {
134+
"description": "Success response",
135+
"headers": {
136+
"Signature": {
137+
"$ref": "#/components/headers/Signature"
138+
}
139+
},
140+
"content": {
141+
"application/json": {
142+
"schema": {
143+
"properties": {
144+
"salt": {
145+
"type": "string",
146+
"example": "KAC6ZRUacmQit98nFKOpjXgkwdC0Grzl"
147+
},
148+
"merchant": {
149+
"type": "string",
150+
"example": "PUBLICTESTHUF"
151+
},
152+
"orderRef": {
153+
"$ref": "#/components/schemas/OrderRef"
154+
},
155+
"currency": {
156+
"$ref": "#/components/schemas/Currency"
157+
},
158+
"transactionId": {
159+
"$ref": "#/components/schemas/TransactionId"
160+
},
161+
"total": {
162+
"type": "number",
163+
"example": 25.0
164+
}
165+
}
166+
}
167+
}
168+
}
169+
}
170+
}
171+
}
109172
}
110173
},
111174
"components": {
@@ -245,6 +308,48 @@
245308
},
246309
"type": "object"
247310
},
311+
"AuthorizedTransaction": {
312+
"type": "object",
313+
"required": [
314+
"originalTotal",
315+
"approveTotal",
316+
"currency",
317+
"orderRef",
318+
"transactionId"
319+
],
320+
"properties": {
321+
"originalTotal": {
322+
"type": "number",
323+
"default": 0,
324+
"exclusiveMinimum": true,
325+
"minimum": 0,
326+
"example": 25.0
327+
},
328+
"approveTotal": {
329+
"type": "number",
330+
"exclusiveMinimum": false,
331+
"minimum": 0,
332+
"example": 25.0
333+
},
334+
"currency": {
335+
"$ref": "#/components/schemas/Currency"
336+
},
337+
"orderRef": {
338+
"$ref": "#/components/schemas/OrderRef"
339+
},
340+
"transactionId": {
341+
"$ref": "#/components/schemas/TransactionId"
342+
}
343+
}
344+
},
345+
"OrderRef": {
346+
"type": "string",
347+
"example": "101010515680292482600"
348+
},
349+
"TransactionId": {
350+
"type": "number",
351+
"example": "99844942"
352+
},
248353
"Method": {
249354
"type": "string",
250355
"enum": [

src/Client.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Closure;
66
use Cone\SimplePay\Api\TransactionApi;
7-
use Exception;
87
use GuzzleHttp\Client as Http;
98
use GuzzleHttp\ClientInterface;
109
use GuzzleHttp\HandlerStack;

0 commit comments

Comments
 (0)