Commit Graph

13 Commits

Author SHA1 Message Date
29645b7a5f feat(retries): never repeat non-idempotent or verdict requests
Saloon retries whenever an exception is thrown (handleRetry defaults to true)
and both connectors set tries = 3, so POST /payoffs, PATCH /payoffs/{id}/accept
and SBP QrcReversalRequest were sent to the bank up to three times while the
caller believed it had made a single request. For payouts a repeated POST is a
duplicate-payment risk, not a harmless retry.

HasSafeRetries replaces the HasTries default at the connector level (Saloon
retries only when the per-send callable, the request and the connector all
allow it):
- a deterministic bank verdict (4xx/5xx) is never retried;
- an explicit deny-list covers money operations;
- an explicit allow-list keeps retries for read-only SBP operations, since that
  API uses POST even for reads (GetQrcReversalDataRequest stays denied: the bank
  matches the following reversal against it, EBD 44 / I14044);
- by default only GET/HEAD/OPTIONS are retried.

Every decision is logged through the connector's PSR-3 logger as
'[alfa-sdk][retry]', so physical request count per operation is countable via
X-Request-ID.

Tests: tests/Feature/RetryPolicyTest.php (23 tests), including an assertion on
the real retry loop that a failing non-idempotent POST is sent exactly once,
while a read-only GET still uses all configured attempts.
2026-09-29 10:44:18 +03:00
a81f6b0d21 move put to patch UpdateRequisiteRequest.php 2026-09-02 17:17:51 +03:00
Anatoliy
d93b1569f5 refactor(logging) 2026-06-09 16:11:15 +03:00
c763fe6c71 fix(statements/transactions) 2026-06-02 21:00:44 +03:00
Anatoliy Poloz
b15d29f8e9 fix(formating) 2026-01-28 03:36:26 +03:00
fdb400d5f0 feat: Add Laravel tinker examples and update nominal accounts functionality
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-24 23:40:20 +03:00
0e66eb2859 feat: update authentication flow and OAuth2 implementation
- Refactor AlfaBankConnector to use Saloon's OAuth2 traits
- Update authentication methods to use new OAuth2 implementation
- Add tests for authorization URL generation, token exchange, and refresh
- Replace custom GetTokenRequest with Saloon's built-in OAuth2 requests

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-24 17:24:40 +03:00
60c99bca40 Улучшена документация, добавлена поддержка цифрового рубля и улучшена структура DTO
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-21 12:46:02 +03:00
78e1e82331 refactor: dto, requests, connector 2026-01-19 10:46:57 +03:00
6a7325f0fd refactor 2026-01-18 23:53:31 +03:00
d214eecebe refactor(core): enhance SDK structure and documentation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-18 21:48:25 +03:00
5c0c2b6da6 update imports 2026-01-14 16:50:27 +03:00
f803480f7b first commit 2026-01-14 16:40:33 +03:00