Repository navigation
Send steamid as a string and allow transactions without a channel - #21
Merged
Merged
Conversation
added 2 commits
November 30, 2026 10:24
The API validates antifraud.steamid as a string, so the int property made every payment with a STEAMID64 fail with 422. Antifraud now accepts an int or a string and always sends a string. The API returns channel null until the payer picks a channel, and PaymentTransaction required a string, so paymentGetTransaction threw a TypeError for pending transactions.
The Guzzle client had no timeout, so a stalled connection blocked the caller indefinitely. Connecting now gives up after 10 seconds and the whole request after 30.
Member
Author
|
Dodałem też timeouty HTTP (połączenie 10 s, całe żądanie 30 s) w |
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.
Antifraudmiał?int $steamid. api (Payment/Transactions/StoreRequest) walidujeantifraud.steamidjakostring, więc płatność z podanym STEAMID64 kończyła się błędem 422. Konstruktor przyjmuje teraz int albo string (bez typu w sygnaturze, bo SDK wspiera PHP 7.4) i zawsze wysyła string. Dotychczasowe wywołania z intem działają dalej.PaymentTransaction::$channelbyłstring, a api (TransactionResource) zwracachannel: null, dopóki płacący nie wybierze kanału.paymentGetTransaction()rzucał wtedy TypeError. Teraz?string, acontrolidescriptionużywają?? null.Dwa nowe testy padają na starym kodzie i przechodzą po poprawce.
composer test27 OK, phpstan bez błędów.ecszgłasza 4 pliki, których ten PR nie dotyka; tak samo jest na main.