add payment details page

This commit is contained in:
2026-01-13 04:29:23 -03:00
parent 7e09e49ed8
commit 091499399f
6 changed files with 82 additions and 7 deletions

View File

@@ -30,11 +30,14 @@ class InvoiceNotFoundError(NotFoundError): ...
class StatusAttr(Enum):
PAID = 'paid_at'
# Post-migration (orders): uncomment the following lines
# PAID = 'paid_at'
# EXTERNALLY_PAID = 'paid_at'
EXTERNALLY_PAID = 'payment_date'
PAID = 'payment_date'
CANCELED = 'canceled_at'
REFUNDED = 'refunded_at'
EXPIRED = 'expired_at'
EXTERNALLY_PAID = 'paid_at'
def _status_attr(status: str) -> StatusAttr | None:

View File

@@ -62,8 +62,9 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
if charge['success'] is True:
transact.update(
key=KeyPair(order_id, '0'),
# Post-migration (orders): rename `payment_date` to `paid_at`
update_expr='SET #status = :status, \
paid_at = :now, \
payment_date = :now, \
updated_at = :now',
expr_attr_names={
'#status': 'status',