99
1010
1111class SSLCommerz :
12- sslc_is_sandbox : bool
13- sslc_store_id : str
14- sslc_store_pass : str
15- sslc_mode_name : str
16- integration_data : Dict [str , str ] = {}
12+ sslc_is_sandbox : bool
13+ sslc_store_id : str
14+ sslc_store_pass : str
15+ sslc_mode_name : str
16+ integration_data : Dict [str , str ] = {}
1717
1818 def __init__ (self , sslc_is_sandbox = True , sslc_store_id = '' , sslc_store_pass = '' ) -> None :
1919 self .sslc_mode_name = self .set_sslcommerz_mode (sslc_is_sandbox )
@@ -34,7 +34,7 @@ def set_sslcommerz_mode(sslc_is_sandbox: bool) -> str:
3434class SSLCSession (SSLCommerz ):
3535 def __init__ (self , sslc_is_sandbox = True , sslc_store_id = '' , sslc_store_pass = '' ) -> None :
3636 super ().__init__ (sslc_is_sandbox , sslc_store_id , sslc_store_pass )
37-
37+
3838 def set_urls (self , success_url : str , fail_url : str , cancel_url : str , ipn_url : str = '' ) -> None :
3939 self .integration_data ['success_url' ] = success_url
4040 self .integration_data ['fail_url' ] = fail_url
@@ -74,7 +74,7 @@ def init_payment(self):
7474 post_url = self .sslc_session_api
7575 post_data = self .integration_data
7676 response_sslc = requests .post (post_url , post_data )
77- response_data : Dict [str , str ] = {}
77+ response_data : Dict [str , str ] = {}
7878
7979 if response_sslc .status_code == 200 :
8080 response_json = json .loads (response_sslc .text )
@@ -98,8 +98,8 @@ def __init__(self, sslc_is_sandbox=True, sslc_store_id='', sslc_store_pass='') -
9898 super ().__init__ (sslc_is_sandbox , sslc_store_id , sslc_store_pass )
9999
100100 def validate_transaction (self , validation_id ):
101- query_params : Dict [str , str ] = {}
102- response_data : Dict [str , str ] = {}
101+ query_params : Dict [str , str ] = {}
102+ response_data : Dict [str , str ] = {}
103103 query_params ['val_id' ] = validation_id
104104 query_params ['store_id' ] = self .sslc_store_id
105105 query_params ['store_passwd' ] = self .sslc_store_pass
@@ -123,10 +123,9 @@ def validate_transaction(self, validation_id):
123123 response_data ['data' ] = 'Validation failed due to status code ' + str (validation_response .status_code )
124124 return response_data
125125
126-
127126 def validate_ipn_hash (self , ipn_data ):
128127 if self .key_check (ipn_data , 'verify_key' ) and self .key_check (ipn_data , 'verify_sign' ):
129- check_params : Dict [str , str ] = {}
128+ check_params : Dict [str , str ] = {}
130129 verify_key = ipn_data ['verify_key' ].split (',' )
131130
132131 for key in verify_key :
0 commit comments