From f745b8adc6558dae5284593d1a5ac846a796e1be Mon Sep 17 00:00:00 2001 From: Aleffio Date: Mon, 23 Oct 2017 09:41:33 +0200 Subject: [PATCH 1/3] PW-307 Use different version for Payment and Recurring service. --- Adyen/client.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Adyen/client.py b/Adyen/client.py index f5413e86..1a6a2f9f 100644 --- a/Adyen/client.py +++ b/Adyen/client.py @@ -23,7 +23,8 @@ BASE_PAL_url = "https://pal-{}.adyen.com/pal/servlet" BASE_HPP_url = "https://{}.adyen.com/hpp" -API_VERSION = "v25" +API_VERSION = "v30" +API_RECURRING_VERSION = "v25" API_CLIENT_ATTR = ["username","password","review_payout_user", "review_payout_password","confirm_payout_user","confirm_payout_password", "platform","merchant_account","merchant_specific_url","hmac"] @@ -105,7 +106,23 @@ def _determine_api_url(self, platform, service, action): action (str): the API action to perform. """ base_uri = BASE_PAL_url.format(platform) - return '/'.join([base_uri, service, API_VERSION, action]) + if service == "Recurring": + api_version = API_RECURRING_VERSION + else: + api_version = API_VERSION + return '/'.join([base_uri, service, api_version, action]) + + def _determine_recurring_api_url(self, platform, service, action): + """This returns the Adyen API endpoint based on the provided platform, + service and action. + + Args: + platform (str): Adyen platform, ie 'live' or 'test'. + service (str): API service to place request through. + action (str): the API action to perform. + """ + base_uri = BASE_PAL_url.format(platform) + return '/'.join([base_uri, service, API_RECURRING_VERSION, action]) def _determine_hpp_url(self, platform, action): """This returns the Adyen HPP endpoint based on the provided platform, From 4cfd9ef911c189349fa745dbc79bd00ae51e5535 Mon Sep 17 00:00:00 2001 From: Aleffio Date: Mon, 23 Oct 2017 09:49:15 +0200 Subject: [PATCH 2/3] PW-307 Use different version for Payment and Recurring service. --- Adyen/client.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Adyen/client.py b/Adyen/client.py index 1a6a2f9f..6479e453 100644 --- a/Adyen/client.py +++ b/Adyen/client.py @@ -112,18 +112,6 @@ def _determine_api_url(self, platform, service, action): api_version = API_VERSION return '/'.join([base_uri, service, api_version, action]) - def _determine_recurring_api_url(self, platform, service, action): - """This returns the Adyen API endpoint based on the provided platform, - service and action. - - Args: - platform (str): Adyen platform, ie 'live' or 'test'. - service (str): API service to place request through. - action (str): the API action to perform. - """ - base_uri = BASE_PAL_url.format(platform) - return '/'.join([base_uri, service, API_RECURRING_VERSION, action]) - def _determine_hpp_url(self, platform, action): """This returns the Adyen HPP endpoint based on the provided platform, and action. From aaeec0ab782d42a1036b2c518bf40a380d16e9cc Mon Sep 17 00:00:00 2001 From: Aleffio Date: Mon, 23 Oct 2017 09:53:21 +0200 Subject: [PATCH 3/3] PW-307 Use different version for Payment and Recurring service. --- Adyen/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adyen/client.py b/Adyen/client.py index 6479e453..f96d3a88 100644 --- a/Adyen/client.py +++ b/Adyen/client.py @@ -91,7 +91,7 @@ def __init__(self, username=None, password=None, review_payout_username=None, self.skin_code = skin_code self.psp_list = [] self.app_name = app_name - self.LIB_VERSION = "1.1.0"; + self.LIB_VERSION = "1.2.0"; self.USER_AGENT_SUFFIX = "adyen-python-api-library/"; self.http_init = False self.http_force = http_force