Skip to content

Commit

Permalink
ESY-6582 Tab can include src
Browse files Browse the repository at this point in the history
  • Loading branch information
m-lilja committed Mar 4, 2025
1 parent 5ee66f0 commit a739fe2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
25 changes: 25 additions & 0 deletions _includes/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

The integration consists of three main steps. **Creating** the payment order,
**displaying** the payment menu, and **capturing** the funds. In addition, there
are other post-purchase options you need. We get to them later on.

## Create Payment Order

When your customer has initiated a purchase, you need to create a payment order.
Start by performing a `POST` request towards the `paymentorder` resource with
payer information and a `completeUrl`.

The `productName` field has been removed in v3.1, and you identify the
`paymentOrder` version as v3.1 in the header instead.

`POST`, `PATCH`, `GET` and `PUT` requests use this header:

`Content-Type: application/json;version=3.1`

`GET` requests can also use this header:

`Accept: application/json;version=3.1`

Valid versions are **3.1**, **3.0** and **2.0**. If you do not add a version,
the request will default to **2.0**. Using the `productName` and setting it to
`checkout3` will default to **3.0**.
3 changes: 3 additions & 0 deletions _includes/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
{{ tab.content_text }}
{% if tab.content_src %}
<div id="tab-src-{{ forloop.index }}" class="tab-src {% unless forloop.index == active_tab_index %}d-none{% endunless %}">
{% capture sourced_content %}
{% include {{tab.content_src}} %}
{% endcapture %}
{{ sourced_content | markdownify }}
</div>
{% endif %}
</p>
Expand Down
5 changes: 2 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ tab_list:
- title: Tab 1 with content as text
content_text: Some content.
- title: Tab 2 with content from src
content_src: /img/merchants/logo-coop.svg
- title: Tab 3 with content from text and src
content_src: example.md
- title: Tab 3 with content from text
content_text: Text content
content_src: /img/merchants/logo-synsam.svg
---

{% include card-list.html card_list=page.card_list col_class="col-lg-4" %}
Expand Down

0 comments on commit a739fe2

Please sign in to comment.