-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2574 from spryker/feature/acp-2521/master-stripe-…
…app-save-stripe-psp-details-in-scos ACP-2521 Added SalesPaymentDetail docs and update Stripe docs.
- Loading branch information
Showing
7 changed files
with
186 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
94 changes: 94 additions & 0 deletions
94
...er/202311.0/base-shop/retrieve-and-use-payment-details-from-third-party-psps.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
title: Retrieve and use payment details from third-party PSPs | ||
description: Learn how to retrieve and use payment details from a third-party payment service providers | ||
last_updated: Mar 20, 2024 | ||
template: howto-guide-template | ||
--- | ||
|
||
This document describes how to retrieve and use payment details from third-party payment service providers (PSPs). | ||
|
||
## Configure payment details to be retrieved | ||
|
||
1. Install the required modules using Composer: | ||
|
||
```bash | ||
composer require spryker/sales-payment-detail | ||
``` | ||
|
||
2. In `config/Shared/config_default.php`, add or update the shared configs: | ||
|
||
```php | ||
//... | ||
|
||
use Generated\Shared\Transfer\PaymentCreatedTransfer; | ||
|
||
$config[MessageBrokerConstants::MESSAGE_TO_CHANNEL_MAP] = [ | ||
//... | ||
PaymentCreatedTransfer::class => 'payment-events', | ||
]; | ||
|
||
$config[MessageBrokerConstants::CHANNEL_TO_RECEIVER_TRANSPORT_MAP] = [ | ||
//... | ||
'payment-events' => MessageBrokerAwsConfig::HTTP_CHANNEL_TRANSPORT, | ||
]; | ||
|
||
``` | ||
|
||
3. In `src/Pyz/Zed/MessageBroker/MessageBrokerDependencyProvider.php`, add or update the config of the message broker dependency provider: | ||
|
||
```php | ||
|
||
namespace Pyz\Zed\MessageBroker; | ||
|
||
use Spryker\Zed\MessageBroker\MessageBrokerDependencyProvider as SprykerMessageBrokerDependencyProvider; | ||
use Spryker\Zed\SalesPaymentDetail\Communication\Plugin\MessageBroker\PaymentCreatedMessageHandlerPlugin; | ||
|
||
class MessageBrokerDependencyProvider extends SprykerMessageBrokerDependencyProvider | ||
{ | ||
/** | ||
* @return array<\Spryker\Zed\MessageBrokerExtension\Dependency\Plugin\MessageHandlerPluginInterface> | ||
*/ | ||
public function getMessageHandlerPlugins(): array | ||
{ | ||
return [ | ||
//... | ||
|
||
# This plugin is handling the `PaymentCreated` messages sent from any Payment App that supports this feature. | ||
new PaymentCreatedMessageHandlerPlugin(), | ||
]; | ||
} | ||
} | ||
|
||
``` | ||
|
||
4. In `src/Pyz/Zed/MessageBroker/MessageBrokerConfig.php`, add or update the config of the message broker channels: | ||
|
||
```php | ||
namespace Pyz\Zed\MessageBroker; | ||
|
||
use Spryker\Zed\MessageBroker\MessageBrokerConfig as SprykerMessageBrokerConfig; | ||
|
||
class MessageBrokerConfig extends SprykerMessageBrokerConfig | ||
{ | ||
/** | ||
* @return array<string> | ||
*/ | ||
public function getDefaultWorkerChannels(): array | ||
{ | ||
return [ | ||
//... | ||
'payment-events', | ||
]; | ||
} | ||
|
||
//... | ||
} | ||
``` | ||
|
||
## Using payment details from third-party PSPs | ||
|
||
When a third-party PSP supports this feature, your shop receives asynchronous messages about each payment when it's created. | ||
|
||
To use the data of the `spy_sales_payment_detail` table, you need to combine the data from the table with the entity you are fetching from the database to which this payment detail is related. | ||
|
||
When the payment is used in the normal order process, the payment detail can be combined by using `spy_sales_order.order_reference` and `spy_sales_payment_detail.entity_reference`. |
This file contains 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
21 changes: 21 additions & 0 deletions
21
...rovider/202311.0/base-shop/third-party-integrations/stripe/disconnect-stripe.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: Disconnect Stripe | ||
description: Learn how to disconnect Stripe in the Back Office | ||
last_updated: Mar 24, 2024 | ||
template: howto-guide-template | ||
--- | ||
|
||
This document describes how to disconnect Stripe from your store. | ||
|
||
|
||
## Prerequisites | ||
|
||
Complete all the orders that were placed with Stripe used as a payment method. | ||
|
||
## Disconnect Stripe from Spryker | ||
|
||
1. In the Back Office, go to **Apps**. | ||
2. Click **Stripe**. | ||
3. On the Stripe app details page, next to the **Configure** button, hold the pointer over <span class="inline-img">![disconnect-button](https://spryker.s3.eu-central-1.amazonaws.com/docs/aop/user/apps/bazzarvoice/disconnect-button.png)</span> and click **Disconnect**. | ||
4. In the message that appears, click **Disconnect**. | ||
This removes the Stripe configurations from the Back Office and from the Storefront. |
This file contains 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
Oops, something went wrong.