fix(stripe): konfigurowalne metody płatności + p24 wyłączone domyślnie#36
Merged
nieprzecietny merged 1 commit intomasterfrom Mar 29, 2026
Merged
Conversation
Problem: p24 wymaga aktywacji w Stripe Dashboard, bez niej rzuca
StripeException dla PLN. Było hardkodowane ['card','blik','p24'].
Zmiany w StripeServiceCaller:
- Dodano opcjonalny IConfiguration do konstruktora
- Metody płatności czytane z 'Stripe:AllowedPaymentMethods' (gdy niepuste)
- Fallback: GetPaymentMethodsForCurrency() — PLN: card+blik (bez p24)
- Łatwo włączyć p24 po aktywacji w Stripe Dashboard przez config
Przykład konfiguracji:
appsettings.json: 'Stripe': { 'AllowedPaymentMethods': ['card','blik','p24'] }
env var: Stripe__AllowedPaymentMethods__0=card
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #36 +/- ##
==========================================
+ Coverage 54.81% 56.62% +1.81%
==========================================
Files 101 101
Lines 3399 2877 -522
Branches 292 294 +2
==========================================
- Hits 1863 1629 -234
+ Misses 1459 1172 -287
+ Partials 77 76 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nieprzecietny
approved these changes
Mar 29, 2026
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.
Problem
p24wymaga aktywacji w Stripe Dashboard — bez niej rzucaStripeExceptiondla PLN.Było hardkodowane
["card","blik","p24"].Rozwiązanie
StripeServiceCallerprzyjmuje opcjonalnyIConfigurationStripe:AllowedPaymentMethods(gdy ustawione)GetPaymentMethodsForCurrency()— PLN:card+blik(bezp24)Konfiguracja
lub env var:
Stripe__AllowedPaymentMethods__0=cardTesty
✅ 378 passed, 0 failed