Skip to content

Commit 9bf9188

Browse files
Merge pull request #63 from Adyen/develop
Release 2.0.0
2 parents 2530b4d + 928f640 commit 9bf9188

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

Adyen/client.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def __init__(self, username=None, password=None, xapikey=None,
8787
self.skin_code = skin_code
8888
self.psp_list = []
8989
self.app_name = app_name
90-
self.LIB_VERSION = "1.4.0"
91-
self.USER_AGENT_SUFFIX = "adyen-python-api-library/"
90+
self.LIB_VERSION = settings.LIB_VERSION
91+
self.USER_AGENT_SUFFIX = settings.LIB_NAME + "/"
9292
self.http_init = False
9393
self.http_force = http_force
9494
self.live_endpoint_prefix = live_endpoint_prefix
@@ -282,7 +282,13 @@ def call_api(self, request_data, service, action, idempotency=False,
282282

283283
if not message.get('merchantAccount'):
284284
message['merchantAccount'] = self.merchant_account
285-
285+
# Add application info
286+
request_data['applicationInfo'] = {
287+
"adyenLibrary": {
288+
"name": settings.LIB_NAME,
289+
"version": settings.LIB_VERSION
290+
}
291+
}
286292
# Adyen requires this header to be set and uses the combination of
287293
# merchant account and merchant reference to determine uniqueness.
288294
headers = {}
@@ -424,6 +430,12 @@ def call_checkout_api(self, request_data, action, **kwargs):
424430
if not request_data.get('merchantAccount'):
425431
request_data['merchantAccount'] = self.merchant_account
426432

433+
request_data['applicationInfo'] = {
434+
"adyenLibrary": {
435+
"name": settings.LIB_NAME,
436+
"version": settings.LIB_VERSION
437+
}
438+
}
427439
# Adyen requires this header to be set and uses the combination of
428440
# merchant account and merchant reference to determine uniqueness.
429441
headers = {}

Adyen/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
ENDPOINT_CHECKOUT_TEST = "https://checkout-test.adyen.com"
55
ENDPOINT_CHECKOUT_LIVE_SUFFIX = "https://{}-checkout-live" \
66
".adyenpayments.com/checkout"
7-
API_CHECKOUT_VERSION = "v40"
7+
API_CHECKOUT_VERSION = "v41"
88
API_CHECKOUT_UTILITY_VERSION = "v1"
99
API_RECURRING_VERSION = "v25"
1010
API_PAYMENT_VERSION = "v40"
1111
API_PAYOUT_VERSION = "v30"
12+
LIB_VERSION = "2.0.0"
13+
LIB_NAME = "adyen-python-api-library"

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
This library simplifies working with Adyen APIs and allows you to integrate Adyen
77
payments within any Python application.
88

9+
## Integration
10+
The Library supports all APIs under the following services:
11+
12+
* checkout
13+
* checkout utility
14+
* payments
15+
* modifications
16+
* payouts
17+
* recurring
18+
919
## Requirements
1020

1121
- Python 2.7 or 3.6
@@ -35,9 +45,11 @@ ady.payment.client.app_name = "your app name"
3545
```
3646

3747
## Documentation
48+
* https://docs.adyen.com/developers/development-resources/libraries
49+
* https://docs.adyen.com/developers/checkout/api-integration
3850

39-
Follow the rest of our guides from the [documentation](http://adyen.github.io/adyen-python-api-library/index.html) on how to use this library.
51+
## Support
52+
If you have any problems, questions or suggestions, create an issue here or send your inquiry to support@adyen.com.
4053

4154
## Licence
42-
4355
MIT license see LICENSE

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name='Adyen',
55
packages=['Adyen'],
6-
version='1.4.0',
6+
version='2.0.0',
77
maintainer='Adyen',
88
maintainer_email='support@adyen.com',
99
description='Adyen Python Api',

test/DetermineEndpointTest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ def test_checkout_api_url_custom(self):
1717
url = self.adyen.client._determine_checkout_url("live", "payments")
1818
self.client.live_endpoint_prefix = "1797a841fbb37ca7-AdyenDemo"
1919
self.assertEqual(url, "https://1797a841fbb37ca7-AdyenDemo-checkout-"
20-
"live.adyenpayments.com/checkout/v40/payments")
20+
"live.adyenpayments.com/checkout/v41/payments")
2121

2222
def test_checkout_api_url(self):
2323
self.client.live_endpoint_prefix = None
2424
url = self.adyen.client._determine_checkout_url("test",
2525
"paymentsDetails")
2626
self.assertEqual(url, "https://checkout-test.adyen.com"
27-
"/v40/payments/details")
27+
"/v41/payments/details")
2828

2929
def test_payments_invalid_platform(self):
3030

0 commit comments

Comments
 (0)