upstream/2026.2.0 #13

Merged
simon merged 193 commits from upstream/2026.2.0 into master 2026-03-23 20:25:58 +00:00
Showing only changes of commit 028a41f3e4 - Show all commits
+10 -9
View File
@@ -791,16 +791,17 @@ class PaypalMethod(BasePaymentProvider):
any_captures = False
all_captures_completed = True
for purchaseunit in pp_captured_order.purchase_units:
for capture in purchaseunit.payments.captures:
try:
ReferencedPayPalObject.objects.get_or_create(order=payment.order, payment=payment, reference=capture.id)
except ReferencedPayPalObject.MultipleObjectsReturned:
pass
if hasattr(purchaseunit, 'payments'):
for capture in purchaseunit.payments.captures:
try:
ReferencedPayPalObject.objects.get_or_create(order=payment.order, payment=payment, reference=capture.id)
except ReferencedPayPalObject.MultipleObjectsReturned:
pass
if capture.status != 'COMPLETED':
all_captures_completed = False
else:
any_captures = True
if capture.status != 'COMPLETED':
all_captures_completed = False
else:
any_captures = True
if not (any_captures and all_captures_completed):
messages.warning(request, _('PayPal has not yet approved the payment. We will inform you as '
'soon as the payment completed.'))