Skip to content

Commit

Permalink
Merge pull request #2500 from spryker/stripe-docs-update
Browse files Browse the repository at this point in the history
Stripe guides update
  • Loading branch information
lenadoc authored Feb 6, 2024
2 parents 87fc01b + 3fceaf9 commit a2ff6ee
Show file tree
Hide file tree
Showing 9 changed files with 253 additions and 215 deletions.
12 changes: 6 additions & 6 deletions _data/sidebars/pbc_all_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2408,12 +2408,12 @@ entries:
- title: Stripe
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/stripe.html
nested:
- title: Integrate Stripe
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/integrate-stripe.html
- title: Configure Stripe
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/configure-stripe.html
- title: Disconnect Stripe
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/disconnect-stripe.html
- title: SCCOS prerequisites for Stripe
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/sccos-prerequisites-for-the-stripe-app.html
- title: Manage Stripe configurations in the ACP catalog
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/manage-stripe-configurations-in-the-acp-catalog.html
- title: Project Guidelines for Stripe
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/stripe/project-guidelines-for-stripe.html
- title: Unzer
url: /docs/pbc/all/payment-service-provider/base-shop/third-party-integrations/unzer/unzer.html
nested:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $config[AgentSecurityBlockerMerchantPortalConstants::AGENT_MERCHANT_PORTAL_BLOCK
```

<details>
<summary>src/Pyz/Zed/Acl/AclConfig.php</summary>
<summary>src/Pyz/Zed/Acl/AclConfig.php</summary>

```php
<?php
Expand Down
1 change: 1 addition & 0 deletions docs/acp/user/intro-to-acp/acp-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The following apps are supported:
- [Payone](/docs/pbc/all/payment-service-providers/payone/integrate-payone.html), a Payment Service Provider (PSP)
- [Usercentrics](/docs/pbc/all/usercentrics/integrate-usercentrics.html), a Consent Management Platform (CMP)
- [Bazaarvoice](/docs/pbc/all/ratings-reviews/{{site.version}}/third-party-integrations/integrate-bazaarvoice.html), a platform for User-Generated Content (UGC)
- [Stripe](/docs/pbc/all/payment-service-provider/{{site.version}}/base-shop/third-party-integrations/stripe/stripe.html), a financial infrastructure platform that enables businesses to accept payments

Spryker builds all integrations of the apps and provides them in a secure and no-code way for the SCCOS.

Expand Down

This file was deleted.

This file was deleted.

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 %}


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
```
Loading

0 comments on commit a2ff6ee

Please sign in to comment.