diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index 7dc7968..cdde59c 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -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' } diff --git a/src/Resources/config/services/payum.yaml b/src/Resources/config/services/payum.yaml index ffeeba7..d22547a 100644 --- a/src/Resources/config/services/payum.yaml +++ b/src/Resources/config/services/payum.yaml @@ -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 @@ -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 diff --git a/src/Resources/config/services/gateway_configuration_types.yaml b/src/Resources/config/services/stripe_checkout_session/gateway_configuration_types.yaml similarity index 76% rename from src/Resources/config/services/gateway_configuration_types.yaml rename to src/Resources/config/services/stripe_checkout_session/gateway_configuration_types.yaml index f4c1604..eb7a0f7 100644 --- a/src/Resources/config/services/gateway_configuration_types.yaml +++ b/src/Resources/config/services/stripe_checkout_session/gateway_configuration_types.yaml @@ -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 diff --git a/src/Resources/config/services/stripe_checkout_session/payum.yaml b/src/Resources/config/services/stripe_checkout_session/payum.yaml new file mode 100644 index 0000000..e00fec2 --- /dev/null +++ b/src/Resources/config/services/stripe_checkout_session/payum.yaml @@ -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 diff --git a/src/Resources/config/services/providers.yaml b/src/Resources/config/services/stripe_checkout_session/providers.yaml similarity index 100% rename from src/Resources/config/services/providers.yaml rename to src/Resources/config/services/stripe_checkout_session/providers.yaml diff --git a/src/Resources/config/services/stripe_js/gateway_configuration_types.yaml b/src/Resources/config/services/stripe_js/gateway_configuration_types.yaml index c89665f..29d90ba 100644 --- a/src/Resources/config/services/stripe_js/gateway_configuration_types.yaml +++ b/src/Resources/config/services/stripe_js/gateway_configuration_types.yaml @@ -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 diff --git a/src/Resources/config/services/stripe_js/payum.yaml b/src/Resources/config/services/stripe_js/payum.yaml index ec1d721..62014b5 100644 --- a/src/Resources/config/services/stripe_js/payum.yaml +++ b/src/Resources/config/services/stripe_js/payum.yaml @@ -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