@@ -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 = {}
0 commit comments