diff --git a/docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/integrate-stripe.md b/docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/integrate-stripe.md index 5196abd492d..48aad36f4e2 100644 --- a/docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/integrate-stripe.md +++ b/docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/integrate-stripe.md @@ -8,8 +8,8 @@ related: - title: Stripe link: docs/pbc/all/payment-service-provider/page.version/base-shop/third-party-integrations/stripe/stripe.html redirect_from: -- /docs/pbc/all/payment-service-provider/202311.0/third-party-integrations/stripe/install-stripe.html -- /docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/install-stripe.html + - /docs/pbc/all/payment-service-provider/202311.0/third-party-integrations/stripe/install-stripe.html + - /docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/install-stripe.html --- This document describes how to integrate [Stripe](/docs/pbc/all/payment-service-provider/{{page.version}}/base-shop/third-party-integrations/stripe/stripe.html) into a Spryker shop. @@ -29,13 +29,13 @@ Your project probably already contains the following code in `config/Shared/conf ```php //... -use Generated\Shared\Transfer\PaymentConfirmationFailedTransfer; -use Generated\Shared\Transfer\PaymentConfirmationRequestedTransfer; -use Generated\Shared\Transfer\PaymentConfirmedTransfer; -use Generated\Shared\Transfer\PaymentMethodAddedTransfer; -use Generated\Shared\Transfer\PaymentMethodDeletedTransfer; -use Generated\Shared\Transfer\PaymentPreauthorizationFailedTransfer; -use Generated\Shared\Transfer\PaymentPreauthorizedTransfer; +use Generated\Shared\Transfer\PaymentCaptureFailedTransfer; +use Generated\Shared\Transfer\CapturePaymentTransfer; +use Generated\Shared\Transfer\PaymentCapturedTransfer; +use Generated\Shared\Transfer\AddPaymentMethodTransfer; +use Generated\Shared\Transfer\DeletePaymentMethodTransfer; +use Generated\Shared\Transfer\PaymentAuthorizationFailedTransfer; +use Generated\Shared\Transfer\PaymentAuthorizedTransfer; use Spryker\Shared\MessageBroker\MessageBrokerConstants; use Spryker\Shared\Oms\OmsConstants; use Spryker\Shared\Payment\PaymentConstants; @@ -66,13 +66,13 @@ $config[SalesConstants::PAYMENT_METHOD_STATEMACHINE_MAPPING] = [ $config[MessageBrokerConstants::MESSAGE_TO_CHANNEL_MAP] = [ //... - PaymentMethodAddedTransfer::class => 'payment-method-commands', - PaymentMethodDeletedTransfer::class => 'payment-method-commands', - PaymentConfirmationRequestedTransfer::class => 'payment-commands', - PaymentPreauthorizedTransfer::class => 'payment-events', - PaymentPreauthorizationFailedTransfer::class => 'payment-events', - PaymentConfirmedTransfer::class => 'payment-events', - PaymentConfirmationFailedTransfer::class => 'payment-events', + AddPaymentMethodTransfer::class => 'payment-method-commands', + DeletePaymentMethodTransfer::class => 'payment-method-commands', + CancelPayment::class => 'payment-commands', + PaymentAuthorized::class => 'payment-events', + PaymentAuthorizationFailed::class => 'payment-events', + PaymentCaptured::class => 'payment-events', + PaymentCaptureFailed::class => 'payment-events', ]; $config[MessageBrokerConstants::CHANNEL_TO_RECEIVER_TRANSPORT_MAP] = [ @@ -97,11 +97,8 @@ Your project probably already contains the following code in `src/Pyz/Zed/Messag namespace Pyz\Zed\MessageBroker; use Spryker\Zed\MessageBroker\MessageBrokerDependencyProvider as SprykerMessageBrokerDependencyProvider; -use Spryker\Zed\Payment\Communication\Plugin\MessageBroker\PaymentConfirmationFailedMessageHandlerPlugin; -use Spryker\Zed\Payment\Communication\Plugin\MessageBroker\PaymentConfirmedMessageHandlerPlugin; +use Spryker\Zed\Payment\Communication\Plugin\MessageBroker\PaymentOperationsMessageHandlerPlugin; use Spryker\Zed\Payment\Communication\Plugin\MessageBroker\PaymentMethodMessageHandlerPlugin; -use Spryker\Zed\Payment\Communication\Plugin\MessageBroker\PaymentPreauthorizationFailedMessageHandlerPlugin; -use Spryker\Zed\Payment\Communication\Plugin\MessageBroker\PaymentPreauthorizedMessageHandlerPlugin; class MessageBrokerDependencyProvider extends SprykerMessageBrokerDependencyProvider { @@ -114,10 +111,7 @@ class MessageBrokerDependencyProvider extends SprykerMessageBrokerDependencyProv //... # These plugins are handling messages sent from Stripe app to SCCOS. - new PaymentConfirmationFailedMessageHandlerPlugin(), - new PaymentConfirmedMessageHandlerPlugin(), - new PaymentPreauthorizationFailedMessageHandlerPlugin(), - new PaymentPreauthorizedMessageHandlerPlugin(), + new PaymentOperationsMessageHandlerPlugin(), new PaymentMethodMessageHandlerPlugin(), ]; } @@ -158,9 +152,9 @@ Your project is likely to have the following in `src/Pyz/Zed/Oms/OmsDependencyPr ```php //... -use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendEventPaymentCancelReservationPendingPlugin; -use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendEventPaymentConfirmationPendingPlugin; -use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendEventPaymentRefundPendingPlugin; +use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendCapturePaymentMessageCommandPlugin; +use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendRefundPaymentMessageCommandPlugin; +use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendCancelPaymentMessageCommandPlugin; //... @@ -173,13 +167,11 @@ use Spryker\Zed\SalesPayment\Communication\Plugin\Oms\SendEventPaymentRefundPend { $container->extend(self::COMMAND_PLUGINS, function (CommandCollectionInterface $commandCollection) { //... - - $commandCollection->add(new SendEventPaymentConfirmationPendingPlugin(), 'Payment/SendEventPaymentConfirmationPending'); - + $commandCollection->add(new SendCapturePaymentMessageCommandPlugin(), 'Payment/Capture'); // these two commands will be also supported soon. - $commandCollection->add(new SendEventPaymentRefundPendingPlugin(), 'Payment/SendEventPaymentRefundPending'); - $commandCollection->add(new SendEventPaymentCancelReservationPendingPlugin(), 'Payment/SendEventPaymentCancelReservationPending'); - + $commandCollection->add(new SendRefundPaymentMessageCommandPlugin(), 'Payment/Refund'); + $commandCollection->add(new SendCancelPaymentMessageCommandPlugin(), 'Payment/Cancel'); + return $commandCollection; }); @@ -194,7 +186,7 @@ The complete default payment OMS configuration is available at `vendor/spryker/s The payment flow of the default OMS involves authorizing the initial payment, which means that the amount is temporarily blocked when the payment method permits. Then, the OMS sends requests to capture, that is, transfer of the previously blocked amount from the customer's account to the store account. -The `Payment/SendEventPaymentConfirmationPending` command initiates the capture action. By default, this command is initiated when a Back office user clicks **Ship** on the *Order Overview* page. +The `Payment/Capture` command initiates the capture action. By default, this command is initiated when a Back office user clicks **Ship** on the *Order Overview* page. Optionally, you can change and configure your own payment OMS based on `ForeignPaymentStateMachine01.xml` from the core package and change this behavior according to your business flow. See [Install the Order Management feature](/docs/pbc/all/order-management-system/{{page.version}}/base-shop/install-and-upgrade/install-features/install-the-order-management-feature.html) for more information about the OMS feature and its configuration. @@ -205,9 +197,9 @@ This example demonstrates how to configure the order state machine transition fr ```xml @@ -218,7 +210,7 @@ This example demonstrates how to configure the order state machine transition fr - + @@ -229,9 +221,9 @@ This example demonstrates how to configure the order state machine transition fr - ready for dispatch - payment capture pending - capture payment + ready for dispatch + payment capture pending + capture payment @@ -242,7 +234,7 @@ This example demonstrates how to configure the order state machine transition fr - + @@ -286,8 +278,8 @@ If you have rewritten `@CheckoutPage/views/payment/payment.twig` on the project {% endraw %} ``` -3. Optional: Add the glossary keys for all the new (external) payment providers and methods to your glossary data import file. -For example, there is a new external payment with the provider name Payone, found in the `spy_payment_method` table under the `group_name` column, and the payment method name Credit Card, found in the `spy_payment_method` table under the `label_name` column. For all of them, you can add translations to your glossary data import file like this: +3. Optional: Add the glossary keys for all the new (external) payment providers and methods to your glossary data import file. + For example, there is a new external payment with the provider name Payone, found in the `spy_payment_method` table under the `group_name` column, and the payment method name Credit Card, found in the `spy_payment_method` table under the `label_name` column. For all of them, you can add translations to your glossary data import file like this: ```csv ...