Skip to content

Commit

Permalink
Merge pull request #2176 from SwedbankPay/release/5.0.0
Browse files Browse the repository at this point in the history
Release 5.0.0 (master)
  • Loading branch information
arebra authored Mar 22, 2024
2 parents d6570fb + ab066db commit b93a68b
Show file tree
Hide file tree
Showing 100 changed files with 969 additions and 563 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/azure-production-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
--site-url=https://developer.swedbankpay.com
- name: login
uses: azure/login@v1.6.1
uses: azure/login@v2.0.0
with:
creds: '{"clientId":"${{ secrets.SUBSCRIPTION_CLIENT_ID_PROD }}","clientSecret":"${{ secrets.SUBSCRIPTION_CLIENT_SECRET_PROD }}","subscriptionId":"${{ secrets.SUBSCRIPTION_ID_PROD }}","tenantId":"${{ secrets.TENANT_ID }}"}'

- name: deploy
uses: azure/CLI@v1.0.9
uses: azure/CLI@v2.0.0
with:
inlineScript: az storage blob upload-batch -s _site -d "\$web" --account-name proddevelopersa1 --overwrite
4 changes: 2 additions & 2 deletions .github/workflows/azure-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
--site-url=https://developer.swedbankpay.com
- name: login
uses: azure/login@v1.6.1
uses: azure/login@v2.0.0
with:
creds: ${{ secrets.AZURE_CREDENTIALS_PROD }}

- name: deploy
uses: azure/CLI@v1.0.9
uses: azure/CLI@v2.0.0
with:
inlineScript: az storage blob upload-batch -s _site -d "\$web" --account-name blobdevportalprod --overwrite
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@v1.6.1
uses: azure/login@v2.0.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@v1.6.1
uses: azure/login@v2.0.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 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.7'
end

group :test do
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
minitest (5.19.0)
nokogiri (1.14.3-x64-mingw32)
nokogiri (1.15.6-x64-mingw32)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-darwin)
nokogiri (1.15.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
nokogiri (1.15.6-x86_64-linux)
racc (~> 1.4)
open3 (0.1.2)
parallel (1.24.0)
Expand All @@ -119,7 +119,7 @@ GEM
ffi (~> 1.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rouge (4.2.0)
rouge (4.2.1)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -133,19 +133,19 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.0)
rubocop (1.60.2)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
Expand All @@ -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.1)
swedbank-pay-design-guide-jekyll-theme (2.2.7)
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.1)
swedbank-pay-design-guide-jekyll-theme (= 2.2.7)

RUBY VERSION
ruby 2.7.2p137
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ agreement][cla].
[codacy-badge]: https://app.codacy.com/project/badge/Grade/2dcec08155e142e2935eb54605d933ce
[codacy]: https://www.codacy.com/gh/SwedbankPay/developer.swedbankpay.com/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=SwedbankPay/developer.swedbankpay.com&amp;utm_campaign=Badge_Grade
[config-yml]: _config.yml
[dev-guidelines]: https://developer.swedbankpay.com/checkout-v3/resources/development-guidelines
[dev-guidelines]: https://developer.swedbankpay.com/checkout-v3/modules-sdks/development-guidelines
[dev-portal]: https://developer.swedbankpay.com/
[docker-install]: https://www.docker.com/
[docker]: #docker
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
2 changes: 1 addition & 1 deletion _includes/callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ sequenceDiagram
deactivate SwedbankPay
```

[url-usage]: /checkout-v3/resources/fundamental-principles#url-usage
[url-usage]: /checkout-v3/get-started/fundamental-principles#url-usage
10 changes: 5 additions & 5 deletions _includes/checkout-v3-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ will be raised with the following event argument object:

{% include events/on-paid.md %}

Subscribe to this event if actions are needed on you side other than the default
handling of redirecting the payer to your `completeUrl`. Call GET on the
`paymentOrder` to receive the actual payment status, and take appropriate
Subscribe to this event if actions are needed on your side other than the
default handling of redirecting the payer to your `completeUrl`. Call `GET` on
the `paymentOrder` to receive the actual payment status, and take appropriate
actions according to it.

It will be raised with the following event argument object:
Expand All @@ -283,7 +283,7 @@ It will be raised with the following event argument object:
| :------------ | :------- | :------------------------------------------------------------- |
| `event` | `string` | The name of the event raised. |
| {% f paymentOrder.id, 0 %} | `string` | {% include fields/id.md resource="paymentOrder" %} |
| `redirectUrl` | `string` | The URL the user will be redirect to after completing the payment. |
| `redirectUrl` | `string` | The URL the user will be redirected to after completing the payment. |

## `onPaymentAttemptAborted`

Expand All @@ -307,7 +307,7 @@ event is raised with the following event argument object:
| :------------ | :------- | :------------------------------------------------------------- |
| `event` | `string` | The name of the event raised. |
| {% f paymentOrder.id, 0 %} | `string` | {% include fields/id.md resource="paymentOrder" %} |
| `redirectUrl` | `string` | The URL the user will be redirect to after a cancelled payment. |
| `redirectUrl` | `string` | The URL the user will be redirected to after a cancelled payment. |

## `onPaymentAttemptFailed`

Expand Down
4 changes: 2 additions & 2 deletions _includes/fee-discount.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
match the total payment order amount.

Restricting the fee or discount to certain instruments is also possible. Simply
add the `restrictToInstruments` field and which instruments the fee or discount
applies to. This is currently available for invoice only.
add the `restrictedToInstruments` field and which instruments the fee or
discount applies to. This is currently available for invoice only.

The example below shows a fee which only applies to Swedish invoices. Other
options for some of the fields are in the table at the bottom.
Expand Down
2 changes: 1 addition & 1 deletion _includes/fields/id.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{%- capture text -%}
The relative URL and unique identifier of the
`{{ resource }}` resource {{ sub_resource_text }}.
Please read about [URL Usage](/checkout-v3/resources/fundamental-principles#url-usage)
Please read about [URL Usage](/checkout-v3/get-started/fundamental-principles#url-usage)
to understand how this and other URLs should be used in your solution.
{%- endcapture -%}
{%- comment -%}
Expand Down
2 changes: 1 addition & 1 deletion _includes/fields/payee-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% endif %}
{%- capture payee_reference_url -%}
{%- if documentation_section == nil or documentation_section == empty -%}
{%- assign payee_reference_url = "/checkout-v3/resources/fundamental-principles#payee-reference" -%}
{%- assign payee_reference_url = "/checkout-v3/get-started/fundamental-principles#payee-reference" -%}
{%- else -%}
{%- include utils/documentation-section-url.md href="/features/technical-reference/payee-reference" -%}
{%- endif -%}
Expand Down
2 changes: 1 addition & 1 deletion _includes/mobile-sdk-papm.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ paymentOrder.disableStoredPaymentDetails = true

[add-stored-details]: /old-implementations/payment-menu-v2/features/optional/payer-aware-payment-menu#add-stored-payment-instrument-details
[enterprise-payer-ref]: https://developer.swedbankpay.com/old-implementations/enterprise/features/optional/enterprise-payer-reference
[expanding_properties]: https://developer.swedbankpay.com/checkout-v3/resources/fundamental-principles#expansion
[expanding_properties]: https://developer.swedbankpay.com/checkout-v3/get-started/fundamental-principles#expansion
2 changes: 1 addition & 1 deletion _includes/mobile-sdk-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ More info on [unscheduled purchases][unscheduled].

More info on [recurring purchases][recur].

[expanding_properties]: https://developer.swedbankpay.com/checkout-v3/resources/fundamental-principles#expansion
[expanding_properties]: https://developer.swedbankpay.com/checkout-v3/get-started/fundamental-principles#expansion
[unscheduled]: https://developer.swedbankpay.com/checkout-v3/features/optional/unscheduled
[recur]: https://developer.swedbankpay.com/checkout-v3/features/optional/recur
2 changes: 1 addition & 1 deletion _includes/network-tokenization.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ track of it. See the [Paid resource for cards][paid-resource-model].
[one-click]: https://developer.swedbankpay.com/checkout-v3/features/optional/one-click
[unscheduled]: https://developer.swedbankpay.com/checkout-v3/features/optional/unscheduled
[recur]: https://developer.swedbankpay.com/checkout-v3/features/optional/recur
[payment-order]: /checkout-v3/payment-request
[payment-order]: /checkout-v3/get-started/payment-request
[test-data]: https://developer.swedbankpay.com/checkout-v3/test-data/network-tokenization
100 changes: 61 additions & 39 deletions _includes/one-click-payments.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,43 +70,6 @@ setting the initial operation to [`Verify`][verify].
{% endcapture %}
{% include accordion-table.html content=table %}

{% if documentation_section contains "checkout-v3" %}

## Enable Payment Details Consent Checkbox

Use the same basic initial payment order request, and add the new field
`enablePaymentDetailsConsentCheckbox` in the `paymentOrder` node. Set it to
`true` to show the checkbox used to store payment details for card payments.
Remember to also set `disableStoredPaymentDetails` to `true`.

This option will not work with `Verify`, and will result in a validation error
if you try.

{:.code-view-header}
**Payment Details Consent Checkbox**

```json
{
"paymentorder": {
"enablePaymentDetailsConsentCheckbox": true,
"disableStoredPaymentDetails": true,
}
}
```

{% capture table %}
{:.table .table-striped .mb-5}
| Required | Field | Type | Description |
| :--------------: | :--------------------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {% icon check %} | {% f paymentOrder, 0 %} | `object` | The payment order object. |
| | {% f EnablePaymentDetailsConsentCheckbox %} | `bool` | Set to `true` or `false`. Used to determine if the checkbox used to save payment details is shown or not. Will only work if the parameter `disableStoredPaymentDetails` is set to `true`. |
| | {% f disableStoredPaymentDetails %} | `bool` | Set to `true` or `false`. Must be set to `true` for `enablePaymentDetailsConsentCheckbox` to work. |

{% endcapture %}
{% include accordion-table.html content=table %}

{% endif %}

## Finding The `paymentToken` Value

{% if documentation_section contains "payment-instruments" %}
Expand Down Expand Up @@ -354,12 +317,71 @@ Content-Type: application/json;version=3.1/3.0/2.0 // Version optional for

{% endif %}

{% if documentation_section contains "checkout-v3" %}

## Disable Store Details and Toggle Consent Checkbox

This is a feature intended for instrument mode and or custom menus.

If you have built your own interface to display previously stored details and
generate transactions using them ("One-Click Request Displaying A Specific
Card"), you will also have the need to include an option for them to store new
details. This can be performed using either a `Purchase` or `Verify` operation.

For `Purchase` operations aiming to store new details simultaneously, you will
need to utilize the `disableStoredPaymentDetails` parameter. This is because the
payer has already made the decision not to use any stored details in your
interface. By including this parameter, you effectively eliminate the need for
confirmation in our UI, due to how the combination of `generatePaymentToken` and
`payerReference` works in our API.

By employing this parameter, you as the Merchant will assume the responsibility
of colllecting the payer's consent for purpose of storing their details. If you
do not want this responsibility and would like for us to help you out, you can
combine `disableStoredPaymentDetails` along with
`enablePaymentDetailsConsentCheckbox` and flag them both as `true`. That will
enable our handler for collecting consent from the payer for you inside our
Swedbank Pay UI. When the choice has been made and transaction is completed, we
will relay that information to you. We will do this by setting the flag
`paymentTokenGenerated` in the subsequent `GET` call towards the `PaymentOrder`
to either `true` or `false`.

`Verify` operations do not require the use of these additional parameters, as
they do not display any previously stored details based on your supplied
reference, thereby avoiding redundancy. Including them in a `Verify` will result
in a validation error.

{:.code-view-header}
**generatePaymentToken field**

```json
{
"paymentorder": {
"enablePaymentDetailsConsentCheckbox": true,
"disableStoredPaymentDetails": true,
}
}
```

{% capture table %}
{:.table .table-striped .mb-5}
| Required | Field | Type | Description |
| :--------------: | :--------------------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {% icon check %} | {% f paymentOrder, 0 %} | `object` | The payment order object. |
| | {% f EnablePaymentDetailsConsentCheckbox %} | `bool` | Set to `true` or `false`. Used to determine if the checkbox used to save payment details is shown or not. Will only work if the parameter `disableStoredPaymentDetails` is set to `true`. |
| | {% f disableStoredPaymentDetails %} | `bool` | Set to `true` or `false`. Must be set to `true` for `enablePaymentDetailsConsentCheckbox` to work. |

{% endcapture %}
{% include accordion-table.html content=table %}

{% endif %}

## How It Looks

{% include alert.html type="informative" icon="info" body="
When redirecting to Swedbank Pay the payment page will be
prefilled with the payer's card details. See example below." %}

## How It Looks

{:.text-center}
![One click payment page][one-click-image]

Expand Down
8 changes: 8 additions & 0 deletions _includes/pax-acquirerdata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{:.code-view-header}
**Possible values in AcquirerData. Either any of them or both**

```json

{"purchaseOrderNumber":"<ordernumber>","loyaltyPan":"<pan>"}

```
6 changes: 6 additions & 0 deletions _includes/pax-netshaddurlacl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% include alert.html type="informative" icon="info" header="Heads up"
body="When running as a server the program needs elevated privileges. It may be avoided by entering the following command as administrator:" %}
{% include alert.html type="informative" body="
netsh http add urlacl url=http://*:11000/EPASSaleToPOI/3.1/ sddl=D:(A;;GX;;;WD)" %}
{% include alert.html type="informative" body="
where :11000 is the default port. If listening to another port the command must be changed." %}
Loading

0 comments on commit b93a68b

Please sign in to comment.