Skip to content

Commit

Permalink
Finish
Browse files Browse the repository at this point in the history
- ESY-6392 Code examples
  • Loading branch information
m-lilja committed Mar 5, 2024
1 parent 4f5c4ed commit 55d680b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ group :jekyll_plugins do
gem 'kramdown', '>= 2.3'
gem 'kramdown-plantuml', '>= 1.3'
gem 'rouge', '>= 4.0.1'
gem 'swedbank-pay-design-guide-jekyll-theme', '2.2.1'
gem 'swedbank-pay-design-guide-jekyll-theme', '2.2.4'
end

group :test do
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ GEM
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
swedbank-pay-design-guide-jekyll-theme (2.2.1)
swedbank-pay-design-guide-jekyll-theme (2.2.4)
awesome_print
faraday (>= 1.0.1, < 3)
jekyll (>= 3.7, < 5.0)
Expand Down Expand Up @@ -207,7 +207,7 @@ DEPENDENCIES
rspec (>= 3)
rubocop (>= 1)
rubocop-rake (>= 0.6)
swedbank-pay-design-guide-jekyll-theme (= 2.2.1)
swedbank-pay-design-guide-jekyll-theme (= 2.2.4)

RUBY VERSION
ruby 2.7.2p137
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ opengraph:
image: /assets/img/swedbank-pay-developer-portal.png
design_guide:
base_url: https://design.swedbankpay.com
version: 10.9.1
version: 10.10.1
search:
enabled: true
url: /search
Expand Down
68 changes: 35 additions & 33 deletions _includes/payment-order-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@

## Payment Order Request

{:.code-view-header}
**Request**

```http
POST /psp/paymentorders HTTP/1.1
{% capture request_header %}POST /psp/paymentorders HTTP/1.1
Host: {{ page.api_host }}
Authorization: Bearer <AccessToken>
Content-Type: application/json;version=3.1
Content-Type: application/json;version=3.1{% endcapture %}

{
{% capture request_content %}{
"paymentorder": {
"operation": "Purchase",
"currency": "SEK",
Expand All @@ -38,8 +34,13 @@ Content-Type: application/json;version=3.1
"orderReference": "or-123456"
}
}
}
```
}{% endcapture %}

{% include code-example.html
title='Request'
header=request_header
json= request_content
%}

{% capture table %}
{:.table .table-striped .mb-5}
Expand Down Expand Up @@ -72,15 +73,11 @@ Content-Type: application/json;version=3.1

## Payment Order Response

{:.code-view-header}
**Response**

```http
HTTP/1.1 200 OK
{% capture response_header %}HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8; version=3.1
api-supported-versions: 2.0, 3.0, 3.1
api-supported-versions: 2.0, 3.0, 3.1{% endcapture %}

{
{% capture response_content %}{
"paymentorder": {
"id": "/psp/paymentorders/{{ page.payment_order_id }}",
"created": "2020-06-22T10:56:56.2927632Z",
Expand Down Expand Up @@ -110,43 +107,43 @@ api-supported-versions: 2.0, 3.0, 3.1
"id": "/psp/paymentorders/{{ page.payment_order_id }}/orderitems"
},
"urls": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/urls"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/urls"
},
"payeeInfo": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payeeinfo"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/payeeinfo"
},
"payer": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/payers"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/payers"
},
"history": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/history"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/history"
},
"failed": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failed"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/failed"
},
"aborted": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/aborted"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/aborted"
},
"paid": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/paid"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/paid"
},
"cancelled": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/cancelled"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/cancelled"
},
"reversed": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/reversed"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/reversed"
},
"financialTransactions": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/financialtransactions"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/financialtransactions"
},
"failedAttempts": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failedattempts"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/failedattempts"
},
"postPurchaseFailedAttempts": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/failedattempts"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/failedattempts"
},
"metadata": {
"id": "/psp/paymentorders/8be318c1-1caa-4db1-e2c6-08d7bf41224d/metadata"
"id": "/psp/paymentorders/{{ page.payment_order_id }}/metadata"
}
},
"operations": [
Expand All @@ -163,20 +160,25 @@ api-supported-versions: 2.0, 3.0, 3.1
"contentType": "application/javascript"
},
{
"href": "https://api.payex.com/psp/paymentorders/222a50ca-b268-4b32-16fa-08d6d3b73224",
"href": "https://api.payex.com/psp/paymentorders/{{ page.payment_order_id }}",
"rel":"update-order",
"method":"PATCH",
"contentType":"application/json"
},
{
"href": "https://api.payex.com/psp/paymentorders/222a50ca-b268-4b32-16fa-08d6d3b73224",
"href": "https://api.payex.com/psp/paymentorders/{{ page.payment_order_id }}",
"rel": "abort",
"method": "PATCH",
"contentType": "application/json"
}
]
}
```
}{% endcapture %}

{% include code-example.html
title='Response'
header=response_header
json= response_content
%}

{% capture table %}
{:.table .table-striped .mb-5}
Expand Down

0 comments on commit 55d680b

Please sign in to comment.