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 %}
- {{ tab.content_text }} - {% if tab.content_src %} -
+