-
Notifications
You must be signed in to change notification settings - Fork 98
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 #2500 from spryker/stripe-docs-update
Stripe guides update
- Loading branch information
Showing
9 changed files
with
253 additions
and
215 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
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
44 changes: 0 additions & 44 deletions
44
...provider/202311.0/base-shop/third-party-integrations/stripe/configure-stripe.md
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
...rovider/202311.0/base-shop/third-party-integrations/stripe/disconnect-stripe.md
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
...rd-party-integrations/stripe/manage-stripe-configurations-in-the-acp-catalog.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,65 @@ | ||
--- | ||
title: Manage Stripe configurations in the ACP catalog | ||
description: Find out how you can configure the Stripe app in your Spryker shop | ||
draft: true | ||
last_updated: Jan 31, 2024 | ||
template: howto-guide-template | ||
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/configure-stripe.html | ||
- /docs/pbc/all/payment-service-provider/202311.0/base-shop/third-party-integrations/stripe/disconnect-stripe.html | ||
--- | ||
|
||
This document describes how to connect configure the Stripe app in the ACP catalog of your Back Office. | ||
Once you have , you can configure it. | ||
|
||
## Prerequisites | ||
|
||
Before configuring Stripe in the ACP catalog, make sure you have met these prerequisites: | ||
- [Prerequisites for using the Stripe app](/docs/pbc/all/payment-service-provider/{{page.version}}/base-shop/third-party-integrations/stripe/stripe.html#prerequisites-for-using-the-stripe-app) | ||
- [SCCOS prerequisites for Stripe](/docs/pbc/all/payment-service-provider/{{page.version}}/base-shop/third-party-integrations/stripe/install-stripe.html) | ||
|
||
## Connect and configure the Stripe app | ||
|
||
1. In your store's Back Office, go to **Apps**. | ||
2. Click **Stripe**. | ||
This takes you to the Stripe app details page. | ||
3. In the top right corner of the Stripe app details page, click **Connect app**. | ||
This displays a message about the successful connection of the app to your SCCOS. The Stripe app's status changes to *Connection pending*. | ||
4. Go to [Stripe Dashboard](https://dashboard.stripe.com) and copy your account ID. Learn more about the Stripe [account id](https://stripe.com/docs/payments/account). | ||
5. Go back to your store's Back Office, to the Stripe app details page. | ||
6. In the top right corner of the Stripe app details page, click **Configure**. | ||
7. In the *Configure* pane, fill in the *ACCOUNT ID* field with value from step 4. | ||
8. In *Environment*, select if you want to use the app in test or live mode. For details on the Stripe test mode, see [Test mode](https://stripe.com/docs/test-mode). | ||
9. Optionally: In *Payment page title*, enter your shop name. This name will be displayed on the *Payment* page as a merchant label for the payee. | ||
![stripe-configuration](https://spryker.s3.eu-central-1.amazonaws.com/docs/pbc/all/payment-service-providers/stripe/configure-stripe/stripe-configuration.png) | ||
10. Click **Save**. | ||
If the app was connected successfully, a corresponding message appears, and the app status changes to **Connected**. | ||
11. Activate Stripe in your store's Back office, in **Administration** -> **Payment methods**. For details, see [Edit payment methods](/docs/pbc/all/payment-service-provider/{{page.version}}/base-shop/manage-in-the-back-office/edit-payment-methods.html). | ||
|
||
## Disconnect the Stripe App | ||
|
||
Disconnecting the Stripe app from your store makes it unavailable to your customers as a payment option. | ||
|
||
{% info_block infoBox "Info" %} | ||
|
||
You should only disconnect if there are no open orders that still use the Stripe payment method. | ||
|
||
{% endinfo_block %} | ||
|
||
To disconnect the Stripe app from your store, do the following: | ||
1. In your store's 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. | ||
|
||
{% info_block infoBox "Info" %} | ||
|
||
If you want to use the Stripe app after the disconnection, you will need to reconnect the App. | ||
|
||
{% endinfo_block %} | ||
|
||
|
129 changes: 129 additions & 0 deletions
129
...11.0/base-shop/third-party-integrations/stripe/project-guidelines-for-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,129 @@ | ||
--- | ||
title: Project guidelines for the Stripe app | ||
description: Find out about the SCCOS modules needed for the Stripe App to function and their configuration | ||
draft: true | ||
last_updated: Jan 31, 2024 | ||
template: howto-guide-template | ||
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/base-shop/third-party-integrations/stripe/integrate-stripe.html | ||
|
||
--- | ||
|
||
This document provides guidelines for projects using the Stripe app. | ||
|
||
## OMS configuration for the project | ||
|
||
The complete default payment OMS configuration is available at `vendor/spryker/sales-payment/config/Zed/Oms/ForeignPaymentStateMachine01.xml`. | ||
|
||
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/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. | ||
|
||
To configure your payment OMS based on `ForeignPaymentStateMachine01.xml`, copy `ForeignPaymentStateMachine01.xml` with `Subprocess` folder to the project root `config/Zed/oms`. Then, change the name of the file and the value of `<process name=` in the file. | ||
|
||
This example demonstrates how to configure the order state machine transition from `ready for dispatch` to `payment capture pending`: | ||
|
||
```xml | ||
<?xml version="1.0"?> | ||
<statemachine | ||
xmlns="spryker:oms-01" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="spryker:oms-01 http://static.spryker.com/oms-01.xsd" | ||
> | ||
|
||
<process name="SomeProjectProcess" main="true"> | ||
|
||
<!-- other configurations --> | ||
|
||
<states> | ||
|
||
<!-- other states --> | ||
|
||
<state name="payment capture pending" display="oms.state.in-progress"/> | ||
|
||
<!-- other states --> | ||
|
||
</states> | ||
|
||
<transitions> | ||
|
||
<!-- other transitions --> | ||
|
||
<transition happy="true"> | ||
<source>ready for dispatch</source> | ||
<target>payment capture pending</target> | ||
<event>capture payment</event> | ||
</transition> | ||
|
||
<!-- other transitions --> | ||
|
||
</transitions> | ||
|
||
<events> | ||
|
||
<!-- other events --> | ||
|
||
<event name="capture payment" onEnter="true" command="Payment/Capture"/> | ||
|
||
<!-- other events --> | ||
|
||
</events> | ||
|
||
</process> | ||
|
||
</statemachine> | ||
``` | ||
|
||
By default, the timeout for the payment authorization action is set to one day. This means that if the order is in the 'payment authorization pending' state, the OMS will wait for a day and then change the order state to 'payment authorization failed'. Another day later, the order is automatically transitioned to the 'payment authorization canceled' state. Therefore, if you need to increase timeouts or change the states, modify the config/Zed/oms/Subprocess/PaymentAuthorization01.xml file according to your requirements. | ||
|
||
## Checkout payment step | ||
|
||
If you have rewritten `@CheckoutPage/views/payment/payment.twig` on the project level, do the following: | ||
|
||
1. Make sure that a form molecule uses the following code for the payment selection choices: | ||
|
||
```twig | ||
{% raw %} | ||
{% for name, choices in data.form.paymentSelection.vars.choices %} | ||
... | ||
{% embed molecule('form') with { | ||
data: { | ||
form: data.form[data.form.paymentSelection[key].vars.name], | ||
... | ||
} | ||
{% endembed %} | ||
{% endfor %} | ||
{% endraw %} | ||
``` | ||
|
||
2. If you want to change default payment provider or method names, do the following: | ||
1. Make sure the names are translated in your payment step template: | ||
|
||
```twig | ||
{% raw %} | ||
{% for name, choices in data.form.paymentSelection.vars.choices %} | ||
... | ||
<h5>{{ name | trans }}</h5> | ||
{% endfor %} | ||
{% endraw %} | ||
``` | ||
|
||
2. Add translations to your glossary data import file: | ||
|
||
```csv | ||
... | ||
Stripe,Pay Online with Stripe,en_US | ||
``` | ||
3. Run the data import command for the glossary: | ||
|
||
```bash | ||
console data:import glossary | ||
``` |
Oops, something went wrong.