@@ -71,7 +71,7 @@ def __init__(self, username=None, password=None, xapikey=None,
7171 store_payout_username = None , store_payout_password = None ,
7272 platform = "test" , merchant_account = None ,
7373 merchant_specific_url = None , skin_code = None ,
74- hmac = None , app_name = "" ,
74+ hmac = None ,
7575 http_force = None , live_endpoint_prefix = None ):
7676 self .username = username
7777 self .password = password
@@ -86,7 +86,6 @@ def __init__(self, username=None, password=None, xapikey=None,
8686 self .merchant_account = merchant_account
8787 self .skin_code = skin_code
8888 self .psp_list = []
89- self .app_name = app_name
9089 self .LIB_VERSION = settings .LIB_VERSION
9190 self .USER_AGENT_SUFFIX = settings .LIB_NAME + "/"
9291 self .http_init = False
@@ -108,6 +107,8 @@ def _determine_api_url(platform, service, action):
108107 api_version = settings .API_RECURRING_VERSION
109108 elif service == "Payout" :
110109 api_version = settings .API_PAYOUT_VERSION
110+ elif service == "BinLookup" :
111+ api_version = settings .API_BIN_LOOKUP_VERSION
111112 else :
112113 api_version = settings .API_PAYMENT_VERSION
113114 return '/' .join ([base_uri , service , api_version , action ])
@@ -219,8 +220,7 @@ def call_api(self, request_data, service, action, idempotency=False,
219220 succesful.
220221 """
221222 if not self .http_init :
222- self .http_client = HTTPClient (self .app_name ,
223- self .USER_AGENT_SUFFIX ,
223+ self .http_client = HTTPClient (self .USER_AGENT_SUFFIX ,
224224 self .LIB_VERSION ,
225225 self .http_force )
226226 self .http_init = True
@@ -358,8 +358,7 @@ def call_hpp(self, message, action, hmac_key="", **kwargs):
358358 :param hmac_key:
359359 """
360360 if not self .http_init :
361- self .http_client = HTTPClient (self .app_name ,
362- self .USER_AGENT_SUFFIX ,
361+ self .http_client = HTTPClient (self .USER_AGENT_SUFFIX ,
363362 self .LIB_VERSION ,
364363 self .http_force )
365364 self .http_init = True
@@ -423,8 +422,7 @@ def call_checkout_api(self, request_data, action, **kwargs):
423422 action (str): The specific action of the API service to be called
424423 """
425424 if not self .http_init :
426- self .http_client = HTTPClient (self .app_name ,
427- self .USER_AGENT_SUFFIX ,
425+ self .http_client = HTTPClient (self .USER_AGENT_SUFFIX ,
428426 self .LIB_VERSION ,
429427 self .http_force )
430428 self .http_init = True
@@ -495,8 +493,7 @@ def call_checkout_api(self, request_data, action, **kwargs):
495493 def hpp_payment (self , request_data , action , hmac_key = "" , ** kwargs ):
496494
497495 if not self .http_init :
498- self .http_client = HTTPClient (self .app_name ,
499- self .USER_AGENT_SUFFIX ,
496+ self .http_client = HTTPClient (self .USER_AGENT_SUFFIX ,
500497 self .LIB_VERSION ,
501498 self .http_force )
502499 self .http_init = True
0 commit comments