diff --git a/_includes/example-1.md b/_includes/example-1.md new file mode 100644 index 000000000..39303cb54 --- /dev/null +++ b/_includes/example-1.md @@ -0,0 +1,25 @@ + +The **Example 1** 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**. diff --git a/_includes/example.md b/_includes/example-2.md similarity index 90% rename from _includes/example.md rename to _includes/example-2.md index 8ce018c22..25511c7d7 100644 --- a/_includes/example.md +++ b/_includes/example-2.md @@ -1,5 +1,5 @@ -The integration consists of three main steps. **Creating** the payment order, +The **Example 2** 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. diff --git a/_includes/example-3.md b/_includes/example-3.md new file mode 100644 index 000000000..8c5974067 --- /dev/null +++ b/_includes/example-3.md @@ -0,0 +1,25 @@ + +The **Example 3** 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**. diff --git a/_includes/tabs.html b/_includes/tabs.html index f4f8761d4..b6634dbdf 100644 --- a/_includes/tabs.html +++ b/_includes/tabs.html @@ -2,77 +2,79 @@ **Parameters tab_list(required): An array with items having the attributes title(required), content_text (required), content_src(optional) -active_tab_index(optional): Index of the tab to be active by default +default_tab_index(optional): Index of the tab to be active by default, starting from 1 {%- endcomment -%} -{% assign tabs = include.tab_list %} -{% assign active_tab_index = include.active_tab_index | default: 1 %} +{%- comment -%} +{%- endcomment -%} +{% assign tabs = include.tab_list %} +{% assign default_tab_index = include.default_tab_index | minus:1 | at_least:0 %}
- -{% for tab in tabs %} -

- {{ tab.content_text }} - {% if tab.content_src %} -

- {% capture sourced_content %} - {% include {{tab.content_src}} %} - {% endcapture %} - {{ sourced_content | markdownify }} -
- {% endif %} +

+
+
+{% for tab in tabs %} +{% if tab.content_src %} +
+ {% capture sourced_content %} + {% include {{tab.content_src}} %} + {% endcapture %} + {{ sourced_content | markdownify }} +
+{% endif %} {% endfor %} + + \ No newline at end of file diff --git a/index.md b/index.md index 4cccdf481..b9de83d6d 100644 --- a/index.md +++ b/index.md @@ -29,11 +29,13 @@ table_content_payments: tab_list: - title: Tab 1 with content as text - content_text: Some content. + content_text: Some intro text for tab 1. + content_src: example-1.md - title: Tab 2 with content from src - content_src: example.md + content_src: example-2.md - title: Tab 3 with content from text - content_text: Text content + content_text: Tab 3 intro text + content_src: example-3.md --- {% include card-list.html card_list=page.card_list col_class="col-lg-4" %} @@ -189,7 +191,7 @@ Here we have also formatted the content as two paragraphs with padding. ## Tabs -{% include tabs.html tab_list=page.tab_list active_tab_index=2 %} +{% include tabs.html tab_list=page.tab_list default_tab_index=3 %} ## Table