Commit Graph

56 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
012a4e780d fix(sbp): restore missing HasStringBody and CmsSigner imports in DigitalRuble CashLink requests
Three request classes in Sbp\Requests\DigitalRuble\CashLink used the HasStringBody
trait and CmsSigner::canonicalize() without importing them, so loading the class
fataled with 'Trait not found' / 'Class not found'.
2026-09-29 10:44:18 +03:00
a35888a6f3 Merge pull request 'move put to patch UpdateRequisiteRequest.php' (#1) from Hasan/alfa-bank-sdk:fix/update-requisite-patch into main
Reviewed-on: #1
Reviewed-by: Анатолий Полоз <t0ly.od@ya.ru>
v0.0.1.29
2026-09-03 10:58:39 +00:00
a81f6b0d21 move put to patch UpdateRequisiteRequest.php 2026-09-02 17:17:51 +03:00
88760ed127 fix(PayoffDubleAccept): response struct v0.0.1.28 2026-07-08 21:38:24 +03:00
Anatoliy Poloz
be2aa4b8d3 refactor(payoff): manual acceptens scrukt chancged v0.0.1.27 2026-07-08 17:08:04 +03:00
da3ea113ef refactor(sbp): refund v0.0.1.26 2026-06-25 16:05:46 +03:00
Anatoliy Poloz
3437cba042 payoff list v0.0.1.25 2026-06-16 22:25:04 +03:00
Anatoliy
d93b1569f5 refactor(logging) v0.0.1.24 2026-06-09 16:11:15 +03:00
Anatoliy Poloz
7ea5836f44 repair(PayoffRequest): data struct v0.0.1.23 2026-06-08 15:21:32 +03:00
Anatoliy Poloz
6a9243d969 update docs v0.0.1.22 2026-06-08 11:43:18 +03:00
Anatoliy Poloz
5a0d6ac03a fix(sbp): production url v0.0.1.21 2026-06-03 13:24:38 +03:00
Anatoliy Poloz
95203efbad fix(oauth): after saloon upgrade v0.0.1.20 2026-06-03 10:07:00 +03:00
c763fe6c71 fix(statements/transactions) v0.0.1.19 2026-06-02 21:00:44 +03:00
a412af3e07 fix(transactions) v0.0.1.18 2026-06-02 19:46:51 +03:00
9b62a59705 saloon update v0.0.1.17 2026-04-25 13:59:25 +03:00
Anatoliy Poloz
d4db68f2e7 refactor(error): handling v0.0.1.16 2026-04-07 18:47:53 +03:00
Anatoliy Poloz
ea374d2696 doc(test-payin) added v0.0.1.15 2026-04-07 18:44:27 +03:00
Anatoliy Poloz
13c91ad108 bump versions v0.0.1.14 2026-04-05 09:37:54 +03:00
Anatoliy Poloz
3cf15b7913 refactor(qr) v0.0.1.13 2026-04-02 16:45:41 +03:00
Anatoliy Poloz
a05a6506e8 fix(sign) v0.0.1.12 2026-03-21 07:10:16 +03:00
Anatoliy Poloz
4f52a189c7 add Identification 2026-03-19 19:38:21 +03:00
Anatoliy Poloz
b7b2a8fd61 refactor(Sbp) 2026-03-17 12:26:30 +03:00
Anatoliy Poloz
e2adc8d530 fix(OpenSslCmsSigner) 2026-03-10 22:29:35 +03:00
Anatoliy Poloz
c070297211 fix(sign) v0.0.1.11 2026-03-08 18:35:02 +03:00
Anatoliy Poloz
706fcb01b2 fix 2026-03-08 18:03:43 +03:00
7a6b13b12d update docs cross links v0.0.1.10 2026-02-15 08:09:32 +03:00
Anatoliy Poloz
b15d29f8e9 fix(formating) v0.0.1.9 2026-01-28 03:36:26 +03:00
Anatoliy Poloz
1723177949 fix(certs) v0.0.1.8 2026-01-28 02:47:39 +03:00
d89a78bef2 docs(README): add redirect_uri and ca_bundle config options with Laravel callback example
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-26 16:12:27 +03:00
ca3f14485a feat: Add optional redirectUri and keyNameAlias parameters with null defaults
- Make keyNameAlias parameter optional in SbpConnector with null default
- Add redirectUri parameter to AlfaBankServiceProvider configuration
- Make keyNameAlias optional in service provider with null coalescing operator
- Add conditional check for caBundlePath to allow disabling SSL verification

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
v0.0.1.7
2026-01-26 15:48:22 +03:00
86f50eed6a feat: update BaaS flow example and connector OAuth implementation
- Updated 01_baas_flow.php example to properly initialize BaaS with auth credentials
- Removed unused GetTokenRequest import from AlfaBankConnector
- Removed OAuth2Api interface implementation from AlfaBankConnector
- Renamed resolveOauth2Config method to defaultOauthConfig in AlfaBankConnector

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
v0.0.1.6
2026-01-26 15:36:42 +03:00
e83bb5e7e7 docs(readme): updated v0.0.1.5 2026-01-26 12:59:26 +03:00
e23e2ea6df Update README.md with formatting improvements and structural changes
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-24 23:42:06 +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
bb5f91d399 Update documentation and examples, add new nominal accounts features and authentication methods
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-24 17:18:59 +03:00
2964c391b5 Add H2H authentication service and new example flows
- Implement H2H authentication service for secure client authentication
- Add new examples for authorization code flow and H2H auth service
- Include example for generating client secret
- Update core connector and token request functionality
- Enhance README with new features

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-01-23 20:58:30 +03:00
60c99bca40 Улучшена документация, добавлена поддержка цифрового рубля и улучшена структура DTO
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
v0.0.1.4
2026-01-21 12:46:02 +03:00
58affe3e97 Update README.md 2026-01-19 14:49:39 +00:00
78e1e82331 refactor: dto, requests, connector v0.0.1.3 2026-01-19 10:46:57 +03:00
b2786d8606 doc(update) 2026-01-19 00:23:13 +03:00
901a94b59a doc(update) 2026-01-19 00:22:30 +03:00
a8f84de46f doc(exmaples): for nominatl 2026-01-19 00:04:48 +03:00
ade610f75b WIP 2026-01-18 23:56:48 +03:00
6a7325f0fd refactor 2026-01-18 23:53:31 +03:00
17eec3ebc0 fix(doc) 2026-01-18 22:00:02 +03:00
27ecbf1672 doc(core) 2026-01-18 21:52:11 +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
3da69c03e1 doc(openapi): openapi specs moved 2026-01-16 16:25:46 +03:00