Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix bug where refund is not filtered from both capture and charge transactions
Unknown46298719ec12
diff --git a/saleor/payment/gateways/stripe/__init__.py b/saleor/payment/gateways/stripe/__init__.pyindex 5ac4716ebd..ea39e00060 100644--- a/saleor/payment/gateways/stripe/__init__.py+++ b/saleor/payment/gateways/stripe/__init__.py@@ -105,7 +105,8 @@ def refund(payment, amount, **connection_params):stripe_amount = get_amount_for_stripe(amount, payment.currency)capture_txn = payment.transactions.filter(- kind=TransactionKind.CHARGE, is_success=True).first()+ kind__in=[TransactionKind.CAPTURE, TransactionKind.CHARGE],+ is_success=True).first()if capture_txn is not None:try:@@ -134,7 +135,7 @@ def void(payment, **connection_params):client, error = _get_client(**connection_params), ''capture_txn = payment.transactions.filter(- kind=TransactionKind.CHARGE, is_success=True).first()+ kind=TransactionKind.AUTH, is_success=True).first()if capture_txn is not None:try: