paymentsgate 1.5.1__tar.gz → 1.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of paymentsgate might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paymentsgate
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: PaymentsGate's Python SDK for REST API
5
5
  Home-page: https://github.com/paymentsgate/python-secure-api
6
6
  License: MIT
@@ -267,6 +267,17 @@ class PayOutTlvRequestModel(BaseRequestModel):
267
267
  class GetQuoteTlv(BaseRequestModel):
268
268
  data: str
269
269
 
270
+ class TLVExtended(BaseResponseModel):
271
+ merchant: str | None = None # MerchantName
272
+ logo: str | None = None # MerchantLogo or merchant MCC logo
273
+ city: str | None = None # Merchant city
274
+ merchantId: str | None = None # uniq merchant id
275
+ zip: str | None = None # merchant address zip code
276
+ qrRefId: str | None = None # uniq QR code reference id
277
+ invoiceId: str | None = None # Merchant invoiceId
278
+ merchantBank: str | None = None # Merchant bank name
279
+ merchantIban: str | None = None # merchant iban
280
+ merchantBankLogo: str | None = None # merchant bank logo
270
281
 
271
282
  class QuoteTlvResponse(BaseResponseModel):
272
283
  id: str
@@ -277,8 +288,9 @@ class QuoteTlvResponse(BaseResponseModel):
277
288
  feePercent: float # fee percent
278
289
  qrVersion: int # qr code version, 1 - nspk, 2 - tlv encoded, 3 - tlv plain
279
290
  rate: float # exchange rate
280
- merchant: Optional[str] = Field(default=None) # merchant title
281
- logo: Optional[str] = Field(default=None) # merchant logo
291
+ tlv: TLVExtended | None = None
292
+ # merchant: Optional[str] = Field(default=None) # merchant title
293
+ # logo: Optional[str] = Field(default=None) # merchant logo
282
294
 
283
295
 
284
296
  class PayOutTlvRequest(BaseRequestModel):
@@ -14,7 +14,7 @@ name = "paymentsgate"
14
14
  packages = [{include = "paymentsgate"}]
15
15
  readme = "README.md"
16
16
  repository = "https://github.com/paymentsgate/python-secure-api"
17
- version = "1.5.1"
17
+ version = "1.5.2"
18
18
 
19
19
  [tool.poetry.dependencies]
20
20
  pydantic = "^2.8.2"
@@ -17,7 +17,7 @@ install_requires = \
17
17
 
18
18
  setup_kwargs = {
19
19
  'name': 'paymentsgate',
20
- 'version': '1.5.1',
20
+ 'version': '1.5.2',
21
21
  'description': "PaymentsGate's Python SDK for REST API",
22
22
  'long_description': '\n# Paymentsgate Python SDK for Payments REST API\n\n\n## Requirements\n\n- Python >= 3.8.1\n- dependencies:\n - [`requests`](https://github.com/kennethreitz/requests)\n - [`pydantic`](https://docs.pydantic.dev/latest/)\n - [`jwt`](https://pyjwt.readthedocs.io/en/stable/)\n \n## Installation\n\nThe simplest way to install SDK is to use [PIP](https://docs.python.org/3/installing/):\n\n```bash\npip install paymentsgate\n```\n\n## Basic usage\n\n```python\nfrom paymentsgate import ApiClient, Credentials, Currencies\n\n\n# minimal configuration\nconfig = Credentials().fromFile(\'/path/to/credentials.json\');\n\n# create ApiClient\nclient = ApiClient(config, baseUrl=\'https://api.example.com\');\n\n# request quote\nres = cli.Quote(\n {\n "amount": 10.10,\n "currency_from": Currencies.EUR,\n "currency_to": Currencies.AZN,\n }\n)\nprint(res);\n```\n\nThe `credentials.json` file is used to connect to the client and contains all necessary data to use the API. This file can be obtained in your personal cabinet, in the service accounts section. Follow the instructions in the documentation to issue new keys. If you already have keys, but you don\'t feel comfortable storing them in a file, you can use client initialization via variables. In this case, the key data can be stored in external storage instead of on the file system:\n\n```python\nfrom paymentsgate import ApiClient, Credentials\n\nconfig = Credentials(\n account_id="00000000-4000-4000-0000-00000000000a" \n public_key="LS0tLS1CRUdJTiBSU0EgUFJJVkFUNSUlFb3dJQk..."\n)\n\nclient = ApiClient(config, baseUrl=\'https://api.example.com\');\n\n...\n```\n*It is important to note that the data format for key transfer is base46.\n\n## Examples\n\n### create PayIn\n\n```python\nres = cli.PayIn(\n {\n "amount": 10.10,\n "currency": Currencies.AZN,\n "invoiceId": "INVOICE-112123124",\n "clientId": "",\n "successUrl": "https://example.com/success",\n "failUrl": "https://example.com/fail",\n "type": InvoiceTypes.m10\n }\n)\nprint(res);\n```\n\n### create PayOut\n\n```python\nres = cli.PayOut(\n {\n "amount": 5.12,\n "currencyTo": Currencies.EUR,\n "invoiceId": "INVOICE-112123124",\n "clientId": "CLIENT-003010023004",\n "baseCurrency": CurrencyTypes.fiat,\n "feesStrategy": FeesStrategy.add,\n "recipient": {\n "account_number": "4000000000000012",\n "account_owner": "CARD HOLDER",\n "type": CredentialsTypes.card\n }\n }\n)\nprint(res);\n```\n\n### Error handling\n\n```python\ntry:\n res = cli.PayOut(\n {\n "amount": 5.12,\n "currencyTo": Currencies.EUR,\n "invoiceId": "INVOICE-112123124",\n "clientId": "CLIENT-003010023004",\n "baseCurrency": CurrencyTypes.fiat,\n "feesStrategy": FeesStrategy.add,\n "recipient": {\n "account_number": "4000000000000012",\n "account_owner": "CARD HOLDER",\n "type": CredentialsTypes.card\n }\n }\n )\n print(res);\nexcept APIAuthenticationError as err:\n print(f"Authentication fail: {err.message}")\nexcept APIResponseError as err:\n print(f"Exception: {err.error}; Message: {err.message}")\n```',
23
23
  'author': 'PaymentsGate',
File without changes
File without changes