From fd2edcb3f1e37638f3d8fce0f7ddd4c826a4f3e1 Mon Sep 17 00:00:00 2001 From: David Grayston Date: Mon, 2 Feb 2026 15:10:40 +0000 Subject: [PATCH 1/2] feat: Added support for WeChat Pay payment method type --- CHANGELOG.md | 6 ++++++ paddle_billing/Entities/Shared/PaymentMethodType.py | 1 + paddle_billing/Entities/Shared/SavedPaymentMethodType.py | 1 + .../Notifications/Entities/Shared/PaymentMethodType.py | 1 + .../Notifications/Entities/Shared/SavedPaymentMethodType.py | 1 + 5 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78f0285..a97b051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-python-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools. +## Unreleased + +### Added + +- Added support for `wechat_pay` payment method type. See [related changelog](https://developer.paddle.com/changelog/2025/wechat-pay-payment-method?utm_source=dx&utm_medium=paddle-python-sdk) + ## 1.12.0 - 2025-11-12 ### Added diff --git a/paddle_billing/Entities/Shared/PaymentMethodType.py b/paddle_billing/Entities/Shared/PaymentMethodType.py index cb664e9..7ef6adf 100644 --- a/paddle_billing/Entities/Shared/PaymentMethodType.py +++ b/paddle_billing/Entities/Shared/PaymentMethodType.py @@ -21,4 +21,5 @@ class PaymentMethodType(PaddleStrEnum, metaclass=PaddleStrEnumMeta): SouthKoreaLocalCard: "PaymentMethodType" = "south_korea_local_card" Unknown: "PaymentMethodType" = "unknown" Upi: "PaymentMethodType" = "upi" + WechatPay: "PaymentMethodType" = "wechat_pay" WireTransfer: "PaymentMethodType" = "wire_transfer" diff --git a/paddle_billing/Entities/Shared/SavedPaymentMethodType.py b/paddle_billing/Entities/Shared/SavedPaymentMethodType.py index 677fc7a..cbb18ec 100644 --- a/paddle_billing/Entities/Shared/SavedPaymentMethodType.py +++ b/paddle_billing/Entities/Shared/SavedPaymentMethodType.py @@ -17,3 +17,4 @@ class SavedPaymentMethodType(PaddleStrEnum, metaclass=PaddleStrEnumMeta): SamsungPay: "SavedPaymentMethodType" = "samsung_pay" SouthKoreaLocalCard: "SavedPaymentMethodType" = "south_korea_local_card" Upi: "SavedPaymentMethodType" = "upi" + WechatPay: "SavedPaymentMethodType" = "wechat_pay" diff --git a/paddle_billing/Notifications/Entities/Shared/PaymentMethodType.py b/paddle_billing/Notifications/Entities/Shared/PaymentMethodType.py index cb664e9..7ef6adf 100644 --- a/paddle_billing/Notifications/Entities/Shared/PaymentMethodType.py +++ b/paddle_billing/Notifications/Entities/Shared/PaymentMethodType.py @@ -21,4 +21,5 @@ class PaymentMethodType(PaddleStrEnum, metaclass=PaddleStrEnumMeta): SouthKoreaLocalCard: "PaymentMethodType" = "south_korea_local_card" Unknown: "PaymentMethodType" = "unknown" Upi: "PaymentMethodType" = "upi" + WechatPay: "PaymentMethodType" = "wechat_pay" WireTransfer: "PaymentMethodType" = "wire_transfer" diff --git a/paddle_billing/Notifications/Entities/Shared/SavedPaymentMethodType.py b/paddle_billing/Notifications/Entities/Shared/SavedPaymentMethodType.py index 677fc7a..cbb18ec 100644 --- a/paddle_billing/Notifications/Entities/Shared/SavedPaymentMethodType.py +++ b/paddle_billing/Notifications/Entities/Shared/SavedPaymentMethodType.py @@ -17,3 +17,4 @@ class SavedPaymentMethodType(PaddleStrEnum, metaclass=PaddleStrEnumMeta): SamsungPay: "SavedPaymentMethodType" = "samsung_pay" SouthKoreaLocalCard: "SavedPaymentMethodType" = "south_korea_local_card" Upi: "SavedPaymentMethodType" = "upi" + WechatPay: "SavedPaymentMethodType" = "wechat_pay" From e3346d5d0a21fbeabdc49874c54a4690198c0fec Mon Sep 17 00:00:00 2001 From: David Grayston Date: Mon, 2 Feb 2026 15:47:13 +0000 Subject: [PATCH 2/2] fix: Code formatting --- examples/logger.py | 1 - paddle_billing/Entities/Shared/__init__.py | 1 - paddle_billing/Entities/Transactions/__init__.py | 1 - paddle_billing/Notifications/Entities/Transactions/__init__.py | 1 - setup.py | 1 - .../Resources/NotificationLogs/test_NotificationLogsClient.py | 1 - 6 files changed, 6 deletions(-) diff --git a/examples/logger.py b/examples/logger.py index 01c5361..ca908fe 100644 --- a/examples/logger.py +++ b/examples/logger.py @@ -3,7 +3,6 @@ from os import getenv from paddle_billing import Client, Environment, Options - # Verify your Paddle API key was provided by a PADDLE_SECRET_API_KEY environment variable # It is strongly advised that you do not include secrets in your source code # Use environment variables, and/or secrets management like Vault to obtain your secrets diff --git a/paddle_billing/Entities/Shared/__init__.py b/paddle_billing/Entities/Shared/__init__.py index 96102c6..ff0533a 100644 --- a/paddle_billing/Entities/Shared/__init__.py +++ b/paddle_billing/Entities/Shared/__init__.py @@ -59,7 +59,6 @@ from paddle_billing.Entities.Shared.UnitPriceOverride import UnitPriceOverride from paddle_billing.Entities.Shared.UnitTotals import UnitTotals - # These two cause circular imports # from paddle_billing.Entities.Shared.TransactionDetailsPreview import TransactionDetailsPreview # from paddle_billing.Entities.Shared.TransactionLineItemPreview import TransactionLineItemPreview diff --git a/paddle_billing/Entities/Transactions/__init__.py b/paddle_billing/Entities/Transactions/__init__.py index 7531152..3f4fccc 100644 --- a/paddle_billing/Entities/Transactions/__init__.py +++ b/paddle_billing/Entities/Transactions/__init__.py @@ -3,7 +3,6 @@ from paddle_billing.Entities.Transactions.TransactionCardType import TransactionCardType from paddle_billing.Entities.Shared.TimePeriod import TimePeriod - # These cause circular imports # from paddle_billing.Entities.Transactions.TransactionDetails import TransactionDetails # from paddle_billing.Entities.Transactions.TransactionItem import TransactionItem diff --git a/paddle_billing/Notifications/Entities/Transactions/__init__.py b/paddle_billing/Notifications/Entities/Transactions/__init__.py index c09cbc7..97fb74d 100644 --- a/paddle_billing/Notifications/Entities/Transactions/__init__.py +++ b/paddle_billing/Notifications/Entities/Transactions/__init__.py @@ -2,7 +2,6 @@ from paddle_billing.Notifications.Entities.Transactions.TransactionBreakdown import TransactionBreakdown from paddle_billing.Notifications.Entities.Transactions.TransactionCardType import TransactionCardType - # These cause circular imports # from paddle_billing.Notifications.Entities.Transactions.TransactionDetails import TransactionDetails # from paddle_billing.Notifications.Entities.Transactions.TransactionItem import TransactionItem diff --git a/setup.py b/setup.py index abd198f..3b1daf3 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ from setuptools import setup, find_packages - setup( version="1.12.0", author="Paddle and contributors", diff --git a/tests/Functional/Resources/NotificationLogs/test_NotificationLogsClient.py b/tests/Functional/Resources/NotificationLogs/test_NotificationLogsClient.py index c4020c6..f5a3053 100644 --- a/tests/Functional/Resources/NotificationLogs/test_NotificationLogsClient.py +++ b/tests/Functional/Resources/NotificationLogs/test_NotificationLogsClient.py @@ -9,7 +9,6 @@ from tests.Utils.ReadsFixture import ReadsFixtures - # The notification id to use for these tests TEST_ID = "ntf_01hher6hqs35t9dzq84g3ggqvh"