Skip to content

Commit 632ce4c

Browse files
authored
Merge pull request #171 from unzerdev/develop
Develop
2 parents 2854951 + b79ebb4 commit 632ce4c

File tree

387 files changed

+1329
-6207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+1329
-6207
lines changed

.github/workflows/pre-release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Pre-release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: Release version
7+
type: string
8+
required: true
9+
jobs:
10+
request-signoff:
11+
name: Send management sign-off request
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
- name: Decode configuration
17+
env:
18+
CONFIG: ${{ secrets.RELEASE_AUTOMATOR_BASE64_CONFIG }}
19+
run: |
20+
echo $CONFIG | base64 --decode > release.yaml
21+
- name: Run release-automator
22+
uses: unzerdev/unzer-tech-toolbox/.github/actions/release-changelog@main
23+
with:
24+
command: signoff
25+
version: ${{ inputs.version }}
26+
27+
release-notes:
28+
name: Generate release notes
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
- name: Decode configuration
34+
env:
35+
CONFIG: ${{ secrets.RELEASE_AUTOMATOR_BASE64_CONFIG }}
36+
run: |
37+
echo $CONFIG | base64 --decode > release.yaml
38+
- name: Run release-automator
39+
uses: unzerdev/unzer-tech-toolbox/.github/actions/release-changelog@main
40+
with:
41+
command: notes
42+
version: ${{ inputs.version }}
43+
- name: Copy out release notes file
44+
run: |
45+
sudo cp target/ReleaseNotes.md ReleaseNotes.md
46+
- name: Attach release notes
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: ReleaseNotes
50+
path: ReleaseNotes.md
51+
retention-days: 5
52+
53+
draft-release:
54+
name: Create Release Draft
55+
runs-on: ubuntu-latest
56+
needs: release-notes
57+
permissions:
58+
contents: write
59+
steps:
60+
- uses: actions/download-artifact@v3
61+
name: Download Release Notes
62+
with:
63+
name: ReleaseNotes
64+
- name: Install packages
65+
run: sudo apt-get install -y jq
66+
- name: Transform release notes to JSON escaped string
67+
run: echo "JSON_ESCAPED_RELEASE_NOTES=$(cat ReleaseNotes.md | jq --raw-input --slurp .)" >> $GITHUB_ENV
68+
- name: Create Draft Release via GitHub API
69+
run: |
70+
curl --fail-with-body --location 'https://api.github.com/repos/${{ github.repository }}/releases' \
71+
--header 'Accept: application/vnd.github+json' \
72+
--header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
73+
--header 'X-GitHub-Api-Version: 2022-11-28' \
74+
--header 'Content-Type: application/json' \
75+
--data '{
76+
"tag_name": "${{ inputs.version }}",
77+
"target_commitish": "main",
78+
"name": "${{ inputs.version }}",
79+
"draft": true,
80+
"prerelease": false,
81+
"generate_release_notes": false,
82+
"body": ${{ env.JSON_ESCAPED_RELEASE_NOTES }}
83+
}'
84+

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [ published ]
5+
jobs:
6+
send-email:
7+
name: Send release Email
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Decode configuration
13+
env:
14+
CONFIG: ${{ secrets.RELEASE_AUTOMATOR_BASE64_CONFIG }}
15+
run: |
16+
echo $CONFIG | base64 --decode > release.yaml
17+
- name: Run release-automator
18+
uses: unzerdev/unzer-tech-toolbox/.github/actions/release-changelog@main
19+
with:
20+
command: mail
21+
version: ${{github.ref_name}}
22+
23+
generate-tweet:
24+
name: Generate tweet
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
- name: Decode configuration
30+
env:
31+
CONFIG: ${{ secrets.RELEASE_AUTOMATOR_BASE64_CONFIG }}
32+
run: |
33+
echo $CONFIG | base64 --decode > release.yaml
34+
- name: Run release-automator
35+
uses: unzerdev/unzer-tech-toolbox/.github/actions/release-changelog@main
36+
with:
37+
command: tweet
38+
version: ${{github.ref_name}}
39+
- name: Copy out tweet file
40+
run: |
41+
sudo cp target/tweet.txt tweet.txt
42+
- name: Attach release notes
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: tweet
46+
path: tweet.txt
47+
retention-days: 5

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres
66
to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [3.4.0](https://github.com/unzerdev/php-sdk/compare/3.3.0..3.4.0)
9+
10+
This version adds support for Paylater Direct Debit payment method.
11+
12+
### Added
13+
* Add `\UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit` payment type.
14+
* Add Example for Direct Debit payment type.
15+
* Add constants `\UnzerSDK\Constants\CustomerRegistrationLevel` for valid "registrationLevel" values. Relevant for setting riskData.
16+
* Add riskData to PaylaterInstallment example.
17+
* Add riskData to PaylaterInvoice example.
18+
* Add bank account information to `\UnzerSDK\Resources\PaymentTypes\Sofort` class.
19+
20+
### Changed
21+
* Allow 'null' for setters in '\UnzerSDK\Traits\HasAccountInformation' trait to avoid error when e.g. API response contains empty bic.
22+
* Apple Pay example: Moved merchant identifier to constant in `_enableExamples.php` where it can be configured.
23+
24+
### Deprecated
25+
* `\UnzerSDK\Resources\PaymentTypes\SepaDirectDebit`, please use `\UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit'`.
26+
* `\UnzerSDK\Resources\PaymentTypes\SepaDirectDebitSecured`, please use `\UnzerSDK\Resources\PaymentTypes\PaylaterDirectDebit'`.
27+
828
## [3.3.0](https://github.com/unzerdev/php-sdk/compare/3.2.0..3.3.0)
929
### Added
1030
* Chargeback transaction type.

README.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,7 @@ Please refer to the following documentation for installation instructions and us
1515
* [PHP SDK Documentation](https://docs.unzer.com/server-side-integration/php-sdk-integration)
1616
* [How to use the examples](https://docs.unzer.com/server-side-integration/php-sdk-integration/php-example-implementation)
1717
* [Debugging](https://docs.unzer.com/server-side-integration/php-sdk-integration/php-error-handling/#debug-log)
18-
19-
## Supported payment types
20-
* Alipay
21-
* Card (credit card and debit card) + Recurring
22-
* EPS
23-
* Giropay
24-
* iDEAL
25-
* Invoice
26-
* PayPal + Recurring
27-
* Prepayment
28-
* Przelewy24
29-
* SEPA direct debit + Recurring
30-
* SOFORT
31-
* Unzer Bank Transfer (PIS)
32-
* Unzer Direct Debit (secured) + Recurring
33-
* Unzer Instalment (secured)
34-
* Unzer Invoice
35-
* Unzer Invoice Secured (deprecated)
36-
* WeChat Pay
18+
* [Supported payment types](https://docs.unzer.com/online-payments/supported-payment-methods)
3719

3820
## Supported features
3921
* Webhooks and event handling

examples/Alipay/Constants.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,8 @@
22
/**
33
* This file defines the constants needed for the alipay example.
44
*
5-
* Copyright (C) 2020 - today Unzer E-Com GmbH
6-
*
7-
* Licensed under the Apache License, Version 2.0 (the "License");
8-
* you may not use this file except in compliance with the License.
9-
* You may obtain a copy of the License at
10-
*
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
13-
* Unless required by applicable law or agreed to in writing, software
14-
* distributed under the License is distributed on an "AS IS" BASIS,
15-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
* See the License for the specific language governing permissions and
17-
* limitations under the License.
18-
*
195
* @link https://docs.unzer.com/
206
*
21-
* @package UnzerSDK\examples
227
*/
238

249
require_once __DIR__ . '/../Constants.php';

examples/Alipay/Controller.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,8 @@
33
* This is the controller for the alipay example.
44
* It is called when the pay button on the index page is clicked.
55
*
6-
* Copyright (C) 2020 - today Unzer E-Com GmbH
7-
*
8-
* Licensed under the Apache License, Version 2.0 (the "License");
9-
* you may not use this file except in compliance with the License.
10-
* You may obtain a copy of the License at
11-
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
13-
*
14-
* Unless required by applicable law or agreed to in writing, software
15-
* distributed under the License is distributed on an "AS IS" BASIS,
16-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
* See the License for the specific language governing permissions and
18-
* limitations under the License.
19-
*
206
* @link https://docs.unzer.com/
217
*
22-
* @package UnzerSDK\examples
238
*/
249

2510
/** Require the constants of this example */

examples/Alipay/index.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,8 @@
22
/**
33
* This file provides an example implementation of the alipay payment type.
44
*
5-
* Copyright (C) 2020 - today Unzer E-Com GmbH
6-
*
7-
* Licensed under the Apache License, Version 2.0 (the "License");
8-
* you may not use this file except in compliance with the License.
9-
* You may obtain a copy of the License at
10-
*
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
13-
* Unless required by applicable law or agreed to in writing, software
14-
* distributed under the License is distributed on an "AS IS" BASIS,
15-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
* See the License for the specific language governing permissions and
17-
* limitations under the License.
18-
*
195
* @link https://docs.unzer.com/
206
*
21-
* @package UnzerSDK\examples
227
*/
238

249
/** Require the constants of this example */

examples/Applepay/Constants.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,8 @@
22
/**
33
* This file defines the constants needed for the Apple Pay example.
44
*
5-
* Copyright (C) 2021 - today Unzer E-Com GmbH
6-
*
7-
* Licensed under the Apache License, Version 2.0 (the "License");
8-
* you may not use this file except in compliance with the License.
9-
* You may obtain a copy of the License at
10-
*
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
13-
* Unless required by applicable law or agreed to in writing, software
14-
* distributed under the License is distributed on an "AS IS" BASIS,
15-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
* See the License for the specific language governing permissions and
17-
* limitations under the License.
18-
*
195
* @link https://docs.unzer.com/
206
*
21-
* @package UnzerSDK\examples
227
*/
238

249
require_once __DIR__ . '/../Constants.php';

examples/Applepay/Controller.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,8 @@
33
* This is the controller for the Apple Pay example.
44
* It is called when the pay button on the index page is clicked.
55
*
6-
* Copyright (C) 2021 - today Unzer E-Com GmbH
7-
*
8-
* Licensed under the Apache License, Version 2.0 (the "License");
9-
* you may not use this file except in compliance with the License.
10-
* You may obtain a copy of the License at
11-
*
12-
* http://www.apache.org/licenses/LICENSE-2.0
13-
*
14-
* Unless required by applicable law or agreed to in writing, software
15-
* distributed under the License is distributed on an "AS IS" BASIS,
16-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17-
* See the License for the specific language governing permissions and
18-
* limitations under the License.
19-
*
206
* @link https://docs.unzer.com/
217
*
22-
* @package UnzerSDK\examples
238
*/
249

2510
/** Require the constants of this example */

examples/Applepay/index.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,8 @@
22
/**
33
* This file provides an example implementation of the Apple Pay payment type.
44
*
5-
* Copyright (C) 2021 - today Unzer E-Com GmbH
6-
*
7-
* Licensed under the Apache License, Version 2.0 (the "License");
8-
* you may not use this file except in compliance with the License.
9-
* You may obtain a copy of the License at
10-
*
11-
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
13-
* Unless required by applicable law or agreed to in writing, software
14-
* distributed under the License is distributed on an "AS IS" BASIS,
15-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16-
* See the License for the specific language governing permissions and
17-
* limitations under the License.
18-
*
195
* @link https://docs.unzer.com/
206
*
21-
* @package UnzerSDK\examples
227
*/
238

249
/** Require the constants of this example */

0 commit comments

Comments
 (0)