From 3c9a7ca5fc95c16507df28d5f22f93579e6e86ec Mon Sep 17 00:00:00 2001 From: martian56 Date: Tue, 20 Oct 2026 11:12:30 +0400 Subject: [PATCH] chore(release): 0.4.0 --- CHANGELOG.md | 25 +++++++++++++++++++++++++ pyproject.toml | 2 +- src/epoint/__init__.py | 2 +- uv.lock | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d9f968..52cd35a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.4.0 + +Every change applies to `EpointClient` and `AsyncEpointClient`. + +- `get_status` returns a payment that ended in status `error` instead of raising. On + `get_status`, a 2xx response with `status: "error"` and a `transaction` field is a payment + state. Any other error body and any 4xx or 5xx answer still raise `GatewayError`, and other + methods behave as before. +- `Response.ok` is also true for the B2B `SUCCESS` and the heartbeat's `ok`, listed in the new + `OK_STATUSES`. +- `create_token_split_payment` posts to `/api/1/token/split-payment`, the split payment for + Apple Pay and Google Pay, with the same arguments as `create_split_payment`. +- `checkout_form` builds the signed fields and action URL for the browser form post to + `/api/1/checkout`, returned as a `CheckoutForm`, without making a request. +- New optional parameters: `is_installment` on `create_payment`, `checkout_form` and + `create_payment_request`; `bulk_description` on `create_bank_transfer`; `description` and + `other_attr` on `get_installment_plans`; `other_attr` on `pay_by_installment`; `tin`, + `contract_number` and `merchant_order_id` on `update_invoice`. +- `Response` has typed attributes for `trace_id`, `code`, `bank_transaction`, `bank_response`, + `operation_code`, `rrn`, `card_name`, `card_mask`, `amount`, `card_id`, `order_id` and + `widget_url`. `amount` is a float read from a number or a numeric string. +- `Callback` carries the optional `bank_response`, `trace_id` and `card_id`. +- `parse_b2b_webhook` turns a B2B webhook body into a typed `B2BWebhook`. The docs define no + signature for it, so confirm the result with `get_bank_transfer` before acting on it. + ## 0.3.0 - `register_card` takes `success_redirect_url` and `error_redirect_url`, so a card saved without diff --git a/pyproject.toml b/pyproject.toml index 0ea7234..39c006d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "epoint" -version = "0.3.0" +version = "0.4.0" description = "Python client for the epoint.az payment gateway" readme = "README.md" requires-python = ">=3.10" diff --git a/src/epoint/__init__.py b/src/epoint/__init__.py index 24bb146..3d2eeab 100644 --- a/src/epoint/__init__.py +++ b/src/epoint/__init__.py @@ -21,7 +21,7 @@ from .errors import EpointError, GatewayError, SignatureError, TransportError from .models import B2BWebhook, Callback, CheckoutForm, Response -__version__ = "0.3.0" +__version__ = "0.4.0" __all__ = [ "AZN_ONLY", diff --git a/uv.lock b/uv.lock index 490d804..c386944 100644 --- a/uv.lock +++ b/uv.lock @@ -193,7 +193,7 @@ toml = [ [[package]] name = "epoint" -version = "0.3.0" +version = "0.4.0" source = { editable = "." } dependencies = [ { name = "httpx" },