Repository navigation
Add the SimplePay Status API to the payment service - #10
Merged
Merged
Conversation
SimplePay published a Status API (/v2/status) on 2026-07-28 that returns only the current status of one transaction. PaymentService::status() calls it with exactly one of the transaction ID and the order reference and maps the answer to a StatusResponse.
Describe status() in the README, the English and Hungarian examples, the Boost skill and the changelog, and name it next to query() where the Google Pay flow says how to fulfil the order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mi változott
Összevetettem a hivatalos SimplePay SDK-k és a fejlesztői portál legfrissebb kiadásait a csomaggal. Egyetlen új funkció hiányzott, a portálon 2026-07-28-án megjelent Status API. Ezt építettem be.
SimplePay::payment()->status($currency, transactionId: …)vagyorderRef: …aPOST /v2/statusvégpontot hívja. A válasz egy újStatusResponseDTO a következő mezőkkel:status(PaymentStatus),endState,transactionId,orderRef,merchant.query(). A portál ismételt lekérdezésre (pollingra) ajánlja; aquery()marad arra, amikor összeg, dátum vagy fizetési mód is kell. AzendStatetrue, ha az állapot már nem változik (FINISHED,CANCELLED,NOTAUTHORIZED,TIMEOUT,REVERSED).transactionIdés azorderRefközül pontosan az egyiket kell megadni. Ha egyiket sem vagy mindkettőt adják meg, a kérés elküldése előttInvalidArgumentExceptionkeletkezik, mert a portál szerint a SimplePay ezt hibával utasítja el.query-refund-cancel.md,lekerdezes-es-sztorno.md), a Boost skill, az AGENTS.md és a CHANGELOGUnreleasedrésze. A Google Pay leírásokban a rendelés teljesítésénél aquery()mellett astatus()is szerepel, ahogy a hivatalos Google Pay doksi is szerveroldali státuszlekérdezést említ.A változás visszafelé kompatibilis, csak új metódust és DTO-t ad hozzá.