Skip to content

Commit d785298

Browse files
authored
hotfix the endpoint issue (#226)
hotfix the endpoint issue, add the script to automatically release it and fix unit test ubuntu version (for latest 3.6 cannot be find)
1 parent 27933a0 commit d785298

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

.github/workflows/pypipublish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Python
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
tests:
9+
name: run tests
10+
uses: ./.github/workflows/unittest.yml
11+
build-n-publish:
12+
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
13+
needs: [tests]
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@master
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install pypa/build
24+
run: >-
25+
python -m
26+
pip install
27+
build
28+
--user
29+
- name: Build a binary wheel and a source tarball
30+
run: >-
31+
python -m
32+
build
33+
--sdist
34+
--wheel
35+
--outdir dist/
36+
.
37+
- name: Publish distribution 📦 to Test PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1
39+
with:
40+
password: ${{ secrets.PYPI_TEST_KEY }}
41+
repository_url: https://test.pypi.org/legacy/
42+
- name: Publish distribution 📦 to PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
password: ${{ secrets.PYPI_KEY }}

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
build:
88

9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-20.04
1010
strategy:
1111
matrix:
1212
python-version: ['3.6','3.7', '3.8']

Adyen/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ def _determine_checkout_url(self, platform, action, path_param=None):
190190
if action == "paymentsResult":
191191
action = "payments/result"
192192
if action == "cancels":
193-
action = "/cancels"
193+
action = "cancels"
194194
if action == "paymentsCancelsWithReference":
195195
action = f"payments/{path_param}/cancels"
196196
if action == "paymentsCapture":
197-
action = f"/payments/{path_param}/captures"
197+
action = f"payments/{path_param}/captures"
198198
if action == "paymentsReversals":
199199
action = f"payments/{path_param}/reversals"
200200
if action == "paymentsRefunds":

0 commit comments

Comments
 (0)