Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.env.staging
.env.prod
.env.staging
.env.prod.backup
.log


Expand All @@ -22,6 +23,9 @@ backend/public/bundles/
/backend/.phpunit.result.cache
/backend/var/sessions/


#Tests back-end
backend/coverage-report/
### Cache & logs ###
/backend/var/cache/
/backend/var/log/
Expand Down Expand Up @@ -157,6 +161,7 @@ docker/data/
# Docker env (si vous en avez)
.env.docker

docker-compose.prod.yml.backup
###############################################################################
# IDE & OS
###############################################################################
Expand Down
1 change: 1 addition & 0 deletions backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"nelmio/cors-bundle": "^2.6",
"phpdocumentor/reflection-docblock": "^5.6",
"phpstan/phpdoc-parser": "^2.3",
"stripe/stripe-php": "*",
"symfony/asset": "7.3.*",
"symfony/console": "7.3.*",
"symfony/dotenv": "7.3.*",
Expand Down
61 changes: 60 additions & 1 deletion backend/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions backend/config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ security:
password_path: password
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
#webhook
webhook:
pattern: ^/api/payment/webhook
stateless: true
security: false

# API firweel - all begins by /api.
api:
Expand All @@ -38,6 +43,7 @@ security:
- { path: ^/api/users/register, roles: PUBLIC_ACCESS }
- { path: ^/api/users/verify, roles: PUBLIC_ACCESS }
- { path: ^/api/data-request, roles: PUBLIC_ACCESS }
- { path: ^/api/payment/webhook, roles: PUBLIC_ACCESS }

# path begins by /api need to be identified.
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
7 changes: 7 additions & 0 deletions backend/config/packages/stripe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
stripe.client:
class: 'Stripe\StripeClient'
arguments:
- '%env(STRIPE_SECRET_KEY)%'

Stripe\StripeClient: '@stripe.client'
8 changes: 8 additions & 0 deletions backend/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,13 @@ services:
App\:
resource: '../src/'

App\Service\PaymentService:
arguments:
$stripeSecretKey: '%env(STRIPE_SECRET_KEY)%'

App\Controller\Api\PaymentController:
arguments:
$stripeWebhookSecret: '%env(STRIPE_WEBHOOK_SECRET)%'

# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
Loading
Loading