Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added blueprint for nchl client #2

Merged
merged 1 commit into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nepali_wallets/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from ._khalti import KhaltiClient
from ._esewa import EsewaClient
from ._nchl import ConnectIPSClient
33 changes: 33 additions & 0 deletions nepali_wallets/client/_nchl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from .base import BasePaymentClient


class ConnectIPSClient(BasePaymentClient):
username: str
password: str
success_url: str
failure_url: str
login_url: str

def _get_request_headers(self) -> dict:
return {}

def _get_request_body(self) -> dict:
return {}

def create_intent(self, *args, **kwargs):
raise NotImplementedError()

def complete_payment(self, *args, **kwargs):
raise NotImplementedError()

def verify_payment(self, *args, **kwargs) -> dict:
raise NotImplementedError()

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if self.sandbox:
self.base_url = 'https://uat.connectips.com:7443'
self.login_url = "https://uat.connectips.com:7443/connectipswebgw/loginpage"
else:
self.base_url = 'https://login.connectips.com'
self.login_url = "https://login.connectips.com/connectipswebgw/loginpage"