Skip to content

Commit

Permalink
Move around some services
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed Jun 24, 2024
1 parent 40d2636 commit 9bee950
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 39 deletions.
7 changes: 5 additions & 2 deletions src/Resources/config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
imports:
- { resource: 'services/command_handlers.yaml' }
- { resource: 'services/factory.yaml' }
- { resource: 'services/gateway_configuration_types.yaml' }
- { resource: 'services/payum.yaml' }
- { resource: 'services/providers.yaml' }
- { resource: 'services/state_machine.yaml' }

- { resource: 'services/stripe_checkout_session/api_platform.yaml' }
- { resource: 'services/stripe_checkout_session/gateway_configuration_types.yaml' }
- { resource: 'services/stripe_checkout_session/payum.yaml' }
- { resource: 'services/stripe_checkout_session/providers.yaml' }

- { resource: 'services/stripe_js/api_platform.yaml' }
- { resource: 'services/stripe_js/gateway_configuration_types.yaml' }
- { resource: 'services/stripe_js/payum.yaml' }
Expand Down
22 changes: 2 additions & 20 deletions src/Resources/config/services/payum.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
services:

flux_se.sylius_payum_stripe.action.convert_payment:
public: true
class: FluxSE\SyliusPayumStripePlugin\Action\ConvertPaymentAction
arguments:
$detailsProvider: '@flux_se.sylius_payum_stripe.provider.details'
tags:
- name: payum.action
factory: stripe_checkout_session
alias: flux_se.sylius_payum_stripe.convert_payment

flux_se.sylius_payum_stripe.extension.update_payment_state:
public: true
class: FluxSE\SyliusPayumStripePlugin\Extension\UpdatePaymentStateExtension
Expand All @@ -24,14 +14,6 @@ services:
- name: payum.extension
factory: stripe_checkout_session
alias: flux_se.sylius_payum_stripe.extension.update_payment_state

flux_se.sylius_payum_stripe.extension.cancel_existing_payment_intent:
public: true
class: FluxSE\SyliusPayumStripePlugin\Extension\CancelExistingPaymentIntentExtension
arguments:
$expireSessionRequestFactory: '@flux_se.sylius_payum_stripe.factory.expire_session_request'
$allSessionRequestFactory: '@flux_se.sylius_payum_stripe.factory.all_session_request'
tags:
- name: payum.extension
factory: stripe_checkout_session
alias: flux_se.sylius_payum_stripe.extension.cancel_existing_payment_intent
factory: stripe_js
alias: flux_se.sylius_payum_stripe.extension.update_payment_state
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

flux_se.sylius_payum_stripe.form.type.gateway_configuration.stripe_checkout_session:
class: FluxSE\SyliusPayumStripePlugin\Form\Type\StripeCheckoutSessionGatewayConfigurationType
class: FluxSE\SyliusPayumStripePlugin\Form\Type\StripeGatewayConfigurationType
tags:
- name: sylius.gateway_configuration_type
type: stripe_checkout_session
Expand Down
22 changes: 22 additions & 0 deletions src/Resources/config/services/stripe_checkout_session/payum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
services:

flux_se.sylius_payum_stripe.action.convert_payment:
public: true
class: FluxSE\SyliusPayumStripePlugin\Action\ConvertPaymentAction
arguments:
$detailsProvider: '@flux_se.sylius_payum_stripe.provider.details'
tags:
- name: payum.action
factory: stripe_checkout_session
alias: flux_se.sylius_payum_stripe.convert_payment

flux_se.sylius_payum_stripe.extension.cancel_existing_payment_intent:
public: true
class: FluxSE\SyliusPayumStripePlugin\Extension\CancelExistingPaymentIntentExtension
arguments:
$expireSessionRequestFactory: '@flux_se.sylius_payum_stripe.factory.expire_session_request'
$allSessionRequestFactory: '@flux_se.sylius_payum_stripe.factory.all_session_request'
tags:
- name: payum.extension
factory: stripe_checkout_session
alias: flux_se.sylius_payum_stripe.extension.cancel_existing_payment_intent
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

flux_se.sylius_payum_stripe.form.type.gateway_configuration.stripe_js:
class: FluxSE\SyliusPayumStripePlugin\Form\Type\StripeCheckoutSessionGatewayConfigurationType
class: FluxSE\SyliusPayumStripePlugin\Form\Type\StripeGatewayConfigurationType
tags:
- name: sylius.gateway_configuration_type
type: stripe_js
Expand Down
15 changes: 0 additions & 15 deletions src/Resources/config/services/stripe_js/payum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,3 @@ services:
- name: payum.action
factory: stripe_js
alias: flux_se.sylius_payum_stripe.convert_payment

flux_se.sylius_payum_stripe.extension.stripe_js.update_payment_state:
public: true
class: FluxSE\SyliusPayumStripePlugin\Extension\UpdatePaymentStateExtension
arguments:
$factory: '@sm.factory'
# Alias of "@payum.storage.sylius_component_core_model_payment"
# or "@payum.storage.app_entity_payment_payment" or any other available
# Payum storage handling Payment entity
$storage: '@payum.storage.flux_se_sylius_payment'
$getStatusRequestFactory: '@sylius.factory.payum_get_status_action'
tags:
- name: payum.extension
factory: stripe_js
alias: flux_se.sylius_payum_stripe.extension.update_payment_state

0 comments on commit 9bee950

Please sign in to comment.