mirror of
https://github.com/pretix/pretix.git
synced 2026-08-27 13:24:41 +00:00
Paypal2: handle incomming capture webhooks (Z#23240966) (#6456)
* store the state of the payment regardless of the state control.html shows the banner that the payment is in review depending on payment.info * handle capture ressource * Update src/pretix/plugins/paypal2/views.py Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu> * add test * cleanup logic regarding uninteresting resource_type * store payment.info during _execute_payment asap --------- Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
This commit is contained in:
co-authored by
Phin Wolkwitz
parent
ea792e76b2
commit
4d9dfa88fe
@@ -677,6 +677,8 @@ class PaypalMethod(BasePaymentProvider):
|
||||
raise PaymentException(_('We had trouble communicating with PayPal'))
|
||||
else:
|
||||
pp_captured_order = response.result
|
||||
payment.info = json.dumps(pp_captured_order.dict())
|
||||
payment.save()
|
||||
|
||||
try:
|
||||
ReferencedPayPalObject.objects.get_or_create(order=payment.order, payment=payment, reference=pp_captured_order.id)
|
||||
|
||||
Reference in New Issue
Block a user