ipakyuli


Nameipakyuli JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/islombeknv/ipakyulibank.git
SummaryA brief description
upload_time2024-10-20 10:00:09
maintainerNone
docs_urlNone
authorBank Transaction
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Bank Transaction Documentation

This guide explains how to use the `BankTransaction` class from the `ipakyuli.transfer` module for creating, confirming, and canceling bank transfers.

## Installation

Ensure that you have installed the required dependencies for `ipakyuli.transfer`. If it's part of a package, you can install it using:

```bash
pip install ipakyuli
```
## Bank Authentication
Before initiating a transaction, you'll need to authenticate with the bank's API by providing necessary credentials like API URL, login, password, and cash box ID.

Example Authentication Data
```python
bank_auth = {
    "api_url": "https://example-api-url.com",  # Replace with the actual API URL
    "login": "your_login",                     # Your login credentials
    "password": "your_password",               # Your password
    "cash_box_id": "your_cash_box_id"          # Cash box ID provided by the bank
}
```
## Card Data
Card information should be provided in a dictionary containing the PAN (card number) and expiry date.

```python
card_data = {
    "pan": "8600123412341234",  # Example card number (PAN)
    "expiry": "2509"            # Expiry date in YYMM format
}
```

## Bank Transaction

To initiate a bank transaction, you'll use the BankTransaction class, passing in the card data and authentication credentials.

```python
from ipakyuli.transfer import BankTransaction

# Initialize the BankTransaction instance
bank = BankTransaction(card_data=card_data, **bank_auth)

```
## Transfer Creation
To create a new transfer, provide the amount, order ID, and a description of the payment.
```python
transfer_data = {
    "amount": 5000.0,           # Amount in the local currency
    "order_id": "3",            # Unique ID for the order
    "desc": "payment description" # Description of the payment
}

# Create a new transfer
bank.transfer_create(**transfer_data)
```
## Transfer Confirmation
After creating a transfer, you can confirm it using the confirmation code sent by the bank.

```python
# Confirm the transfer using the confirmation code
bank.transfer_confirm(code="1234")
```

## Transfer Cancellation
If you need to cancel the transfer for any reason, you can do so using the transfer_cancel method
```python
# Cancel the transfer
bank.transfer_cancel()
```
## Example Workflow
Here's an example of how the full transaction process works:

```python
from ipakyuli.transfer import BankTransaction

# Authentication credentials and card data
bank_auth = {
    "api_url": "https://example-api-url.com",
    "login": "your_login",
    "password": "your_password",
    "cash_box_id": "your_cash_box_id"
}

card_data = {
    "pan": "8600123412341234",  # Example card number (PAN)
    "expiry": "2509"            # Expiry date in YYMM format
}

# Initialize the BankTransaction instance
bank = BankTransaction(card_data=card_data, **bank_auth)

# Create a new transfer
transfer_data = {
    "amount": 5000.0,
    "order_id": "3",
    "desc": "payment description"
}
bank.transfer_create(**transfer_data)

# Confirm the transfer
bank.transfer_confirm(code="1234")

# Cancel the transfer if needed
bank.transfer_cancel()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/islombeknv/ipakyulibank.git",
    "name": "ipakyuli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Bank Transaction",
    "author_email": "islomjon2702@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1a/d1/9323ffba5868392c3d8e6d7198b8a5fa1b1c1c10aa817210f1a850067b42/ipakyuli-0.1.0.tar.gz",
    "platform": null,
    "description": "# Bank Transaction Documentation\r\n\r\nThis guide explains how to use the `BankTransaction` class from the `ipakyuli.transfer` module for creating, confirming, and canceling bank transfers.\r\n\r\n## Installation\r\n\r\nEnsure that you have installed the required dependencies for `ipakyuli.transfer`. If it's part of a package, you can install it using:\r\n\r\n```bash\r\npip install ipakyuli\r\n```\r\n## Bank Authentication\r\nBefore initiating a transaction, you'll need to authenticate with the bank's API by providing necessary credentials like API URL, login, password, and cash box ID.\r\n\r\nExample Authentication Data\r\n```python\r\nbank_auth = {\r\n    \"api_url\": \"https://example-api-url.com\",  # Replace with the actual API URL\r\n    \"login\": \"your_login\",                     # Your login credentials\r\n    \"password\": \"your_password\",               # Your password\r\n    \"cash_box_id\": \"your_cash_box_id\"          # Cash box ID provided by the bank\r\n}\r\n```\r\n## Card Data\r\nCard information should be provided in a dictionary containing the PAN (card number) and expiry date.\r\n\r\n```python\r\ncard_data = {\r\n    \"pan\": \"8600123412341234\",  # Example card number (PAN)\r\n    \"expiry\": \"2509\"            # Expiry date in YYMM format\r\n}\r\n```\r\n\r\n## Bank Transaction\r\n\r\nTo initiate a bank transaction, you'll use the BankTransaction class, passing in the card data and authentication credentials.\r\n\r\n```python\r\nfrom ipakyuli.transfer import BankTransaction\r\n\r\n# Initialize the BankTransaction instance\r\nbank = BankTransaction(card_data=card_data, **bank_auth)\r\n\r\n```\r\n## Transfer Creation\r\nTo create a new transfer, provide the amount, order ID, and a description of the payment.\r\n```python\r\ntransfer_data = {\r\n    \"amount\": 5000.0,           # Amount in the local currency\r\n    \"order_id\": \"3\",            # Unique ID for the order\r\n    \"desc\": \"payment description\" # Description of the payment\r\n}\r\n\r\n# Create a new transfer\r\nbank.transfer_create(**transfer_data)\r\n```\r\n## Transfer Confirmation\r\nAfter creating a transfer, you can confirm it using the confirmation code sent by the bank.\r\n\r\n```python\r\n# Confirm the transfer using the confirmation code\r\nbank.transfer_confirm(code=\"1234\")\r\n```\r\n\r\n## Transfer Cancellation\r\nIf you need to cancel the transfer for any reason, you can do so using the transfer_cancel method\r\n```python\r\n# Cancel the transfer\r\nbank.transfer_cancel()\r\n```\r\n## Example Workflow\r\nHere's an example of how the full transaction process works:\r\n\r\n```python\r\nfrom ipakyuli.transfer import BankTransaction\r\n\r\n# Authentication credentials and card data\r\nbank_auth = {\r\n    \"api_url\": \"https://example-api-url.com\",\r\n    \"login\": \"your_login\",\r\n    \"password\": \"your_password\",\r\n    \"cash_box_id\": \"your_cash_box_id\"\r\n}\r\n\r\ncard_data = {\r\n    \"pan\": \"8600123412341234\",  # Example card number (PAN)\r\n    \"expiry\": \"2509\"            # Expiry date in YYMM format\r\n}\r\n\r\n# Initialize the BankTransaction instance\r\nbank = BankTransaction(card_data=card_data, **bank_auth)\r\n\r\n# Create a new transfer\r\ntransfer_data = {\r\n    \"amount\": 5000.0,\r\n    \"order_id\": \"3\",\r\n    \"desc\": \"payment description\"\r\n}\r\nbank.transfer_create(**transfer_data)\r\n\r\n# Confirm the transfer\r\nbank.transfer_confirm(code=\"1234\")\r\n\r\n# Cancel the transfer if needed\r\nbank.transfer_cancel()\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A brief description",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/islombeknv/ipakyulibank.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7160cc1b554edae66af50e7a6bad032e77bfe11f8d02c9b31b5228bc328aaf11",
                "md5": "56ba2fec081a4aba3c3c47e2eeadbb47",
                "sha256": "58296cc56a105c2f72972c40c29e70c1d72da85e8bf079036dce0bcb0ef48bd2"
            },
            "downloads": -1,
            "filename": "ipakyuli-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "56ba2fec081a4aba3c3c47e2eeadbb47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5022,
            "upload_time": "2024-10-20T10:00:07",
            "upload_time_iso_8601": "2024-10-20T10:00:07.150057Z",
            "url": "https://files.pythonhosted.org/packages/71/60/cc1b554edae66af50e7a6bad032e77bfe11f8d02c9b31b5228bc328aaf11/ipakyuli-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ad19323ffba5868392c3d8e6d7198b8a5fa1b1c1c10aa817210f1a850067b42",
                "md5": "1a91cda266dc080067933509b37c5d43",
                "sha256": "17f38299f27c5139c7fe99ae2ba9a6101976b5e94f3af6d960c823dbbbe1d1ef"
            },
            "downloads": -1,
            "filename": "ipakyuli-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1a91cda266dc080067933509b37c5d43",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4209,
            "upload_time": "2024-10-20T10:00:09",
            "upload_time_iso_8601": "2024-10-20T10:00:09.314694Z",
            "url": "https://files.pythonhosted.org/packages/1a/d1/9323ffba5868392c3d8e6d7198b8a5fa1b1c1c10aa817210f1a850067b42/ipakyuli-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 10:00:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "islombeknv",
    "github_project": "ipakyulibank",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ipakyuli"
}
        
Elapsed time: 0.94411s