Skip to content

Commit

Permalink
Merge pull request #2249 from SwedbankPay/release/5.1.0
Browse files Browse the repository at this point in the history
Release 5.1.0 (master)
  • Loading branch information
arebra authored Apr 18, 2024
2 parents b93a68b + 0fc08e5 commit e352700
Show file tree
Hide file tree
Showing 148 changed files with 22,140 additions and 13,091 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/azure-production-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
--site-url=https://developer.swedbankpay.com
- name: login
uses: azure/login@v2.0.0
uses: azure/login@v2.1.0
with:
creds: '{"clientId":"${{ secrets.SUBSCRIPTION_CLIENT_ID_PROD }}","clientSecret":"${{ secrets.SUBSCRIPTION_CLIENT_SECRET_PROD }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID_PROD }}","tenantId":"${{ secrets.TENANT_ID }}"}'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/azure-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
--site-url=https://developer.swedbankpay.com
- name: login
uses: azure/login@v2.0.0
uses: azure/login@v2.1.0
with:
creds: ${{ secrets.AZURE_CREDENTIALS_PROD }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/azure-stage-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
--site-url=https://developer.stage.swedbankpay.com
- name: azure login
uses: azure/login@v2.0.0
uses: azure/login@v2.1.0
with:
creds: '{"clientId":"${{ secrets.SUBSCRIPTION_CLIENT_ID_STAGE }}","clientSecret":"${{ secrets.SUBSCRIPTION_CLIENT_SECRET_STAGE }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID_STAGE }}","tenantId":"${{ secrets.TENANT_ID }}"}'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/azure-stage-pos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
--site-url=https://developer-pos.stage.swedbankpay.com
- name: azure login
uses: azure/login@v2.0.0
uses: azure/login@v2.1.0
with:
creds: '{"clientId":"${{ secrets.SUBSCRIPTION_CLIENT_ID_STAGE }}","clientSecret":"${{ secrets.SUBSCRIPTION_CLIENT_SECRET_STAGE }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID_STAGE }}","tenantId":"${{ secrets.TENANT_ID }}"}'

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ jobs:
- uses: reviewdog/action-misspell@v1
with:
reporter: ${{ steps.reporter.outputs.value }}
locale: US
ignore: cancelled
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.7'
gem 'swedbank-pay-design-guide-jekyll-theme', '2.3.0'
end

group :test do
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
json (2.7.1)
json (2.7.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
Expand Down Expand Up @@ -113,7 +113,7 @@ GEM
public_suffix (5.0.4)
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -133,7 +133,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.0)
rubocop (1.62.1)
rubocop (1.63.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -162,7 +162,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.7)
swedbank-pay-design-guide-jekyll-theme (2.3.0)
awesome_print
faraday (>= 1.0.1, < 3)
jekyll (>= 3.7, < 5.0)
Expand Down Expand Up @@ -205,7 +205,7 @@ DEPENDENCIES
rspec (>= 3)
rubocop (>= 1)
rubocop-rake (>= 0.6)
swedbank-pay-design-guide-jekyll-theme (= 2.2.7)
swedbank-pay-design-guide-jekyll-theme (= 2.3.0)

RUBY VERSION
ruby 2.7.2p137
Expand Down
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ defaults:
front_end_url: https://ecom.externalintegration.payex.com
consumer_ssn_se: 199710202392
consumer_ssn_no: 26026708248
mobile_sdk_ios_version: 4.0.5
mobile_sdk_android_version: 4.1.1
19 changes: 10 additions & 9 deletions _includes/abort-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ returned in the payment request.

## Abort Request

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

```http
PATCH /psp/{{ api_resource }}/payments/{{ page.payment_id }} HTTP/1.1
{% capture request_header %}PATCH /psp/{{ api_resource }}/payments/{{ page.payment_id }} HTTP/1.1
Host: {{ page.api_host }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Content-Type: application/json{% endcapture %}

{
{% capture request_content %}{
"payment": {
"operation": "Abort",
"abortReason": "CancelledByConsumer"
}
}
```
}{% endcapture %}

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

## Abort Response

Expand Down
53 changes: 28 additions & 25 deletions _includes/authorizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
The `authorizations` resource will list the authorization transactions
made on a specific payment.

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

```http
GET /psp/{{ api_resource }}/payments/{{ page.payment_id }}/authorizations HTTP/1.1
{% capture request_header %}GET /psp/{{ api_resource }}/payments/{{ page.payment_id }}/authorizations HTTP/1.1
Host: {{ page.api_host }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
```
Content-Type: application/json{% endcapture %}

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

{% include transaction-list-response.md transaction="authorization" %}

Expand All @@ -27,16 +28,12 @@ Note: The legal address must be the registered address of the payer." %}

## Authorization Request

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

```http
POST /psp/{{ api_resource }}/payments/{{ page.payment_id }}/authorizations HTTP/1.1
{% capture request_header %}POST /psp/{{ api_resource }}/payments/{{ page.payment_id }}/authorizations HTTP/1.1
Host: {{ page.api_host }}
Authorization: Bearer <AccessToken>
Content-Type: application/json
Content-Type: application/json{% endcapture %}

{
{% capture request_content %}{
"transaction": {
"activity": "FinancingConsumer"
},
Expand All @@ -63,8 +60,13 @@ Content-Type: application/json
"city": "Saltnes",
"countryCode": "no"
}
}
```
}{% endcapture %}

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

{% capture table %}
{:.table .table-striped .mb-5}
Expand Down Expand Up @@ -99,14 +101,10 @@ Content-Type: application/json
The `authorization` resource will be returned, containing information about
the newly created authorization transaction.

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

```http
HTTP/1.1 200 OK
Content-Type: application/json
{% capture response_header %}HTTP/1.1 200 OK
Content-Type: application/json{% endcapture %}

{
{% capture response_content %}{
"payment": "/psp/{{ api_resource }}/payments/{{ page.payment_id }}",
"authorization": {
"id": "/psp/{{ api_resource }}/payments/{{ page.payment_id }}/authorizations/{{ page.transaction_id}}",
Expand Down Expand Up @@ -140,5 +138,10 @@ Content-Type: application/json
]
}
}
}
```
}{% endcapture %}

{% include code-example.html
title='Response'
header=response_header
json= response_content
%}
37 changes: 19 additions & 18 deletions _includes/autoclick.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,12 @@ message.
The field itself is a `bool` which must be added in the `paymentorder` field of
the request, like the example below.

{:.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/3.0/2.0 // Version optional for 3.0 and 2.0
Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for 3.0 and 2.0{% endcapture %}

{
{% capture request_content %}{
"paymentorder": {
"operation": "Purchase",
"currency": "SEK",
Expand Down Expand Up @@ -195,8 +191,13 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for
}
}
}
}
```
}{% endcapture %}

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

{% capture table %}
{:.table .table-striped .mb-5}
Expand Down Expand Up @@ -285,15 +286,11 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for

## 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/3.0/2.0
api-supported-versions: 3.1/3.0/2.0
api-supported-versions: 3.1/3.0/2.0{% endcapture %}

{
{% capture response_content %}{
"paymentOrder": {
"id": "/psp/paymentorders/ca59fa8a-3423-40e5-0f77-08d9d133750b",
"created": "2022-01-07T07:58:26.1300282Z",
Expand Down Expand Up @@ -378,9 +375,13 @@ api-supported-versions: 3.1/3.0/2.0
"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
44 changes: 24 additions & 20 deletions _includes/callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ the `paymentOrderId`.

{% if api_resource == "paymentorders" %}

{:.code-view-header}
**Payment Order Callback**

```json
{
{% capture response_content %}{
"paymentOrder": {
"id": "/psp/{{ api_resource }}/{{ page.payment_id }}",
"instrument": "{{ api_resource }}"
Expand All @@ -88,8 +84,13 @@ the `paymentOrderId`.
"id": "/psp/creditcard/payments/{{ page.payment_id }}/authorizations/{{ page.transaction_id }}",
"number": 333333333
}
}
```
}{% endcapture %}

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

## Callback Example v3.1

Expand All @@ -99,19 +100,20 @@ node.
This response format will only be triggered if you used `version=3.1` in the
original `POST` when you created the `paymentOrder`.

{:.code-view-header}
**Payment Order Callback v3.1**

```json
{
{% capture response_content %}{
"orderReference": "549213",
"paymentOrder": {
"id": "/psp/{{ api_resource }}/{{ page.payment_id }}",
"instrument": "{{ api_resource }}"
"number": 12345678
}
}
```
}{% endcapture %}

{% include code-example.html
title='Payment Order Callback v3.1'
header=response_header
json= response_content
%}

{% capture table %}
{:.table .table-striped .mb-5}
Expand All @@ -126,11 +128,8 @@ original `POST` when you created the `paymentOrder`.
{% include accordion-table.html content=table %}

{% else %}
{:.code-view-header}
**Payment Instrument Callback**

```json
{
{% capture response_content %}{
"payment": {
"id": "/psp/{{ api_resource }}/payments/{{ page.payment_id }}",
"number": 222222222
Expand All @@ -139,8 +138,13 @@ original `POST` when you created the `paymentOrder`.
"id": "/psp/{{ api_resource }}/payments/{{ page.payment_id }}/authorizations/{{ page.transaction_id }}",
"number": 333333333
}
}
```
}{% endcapture %}

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

{% endif %}

Expand Down
Loading

0 comments on commit e352700

Please sign in to comment.