mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
PPv2: Do not PATCH custom_id and description for APMs (#2898)
This commit is contained in:
@@ -615,6 +615,11 @@ class PaypalMethod(BasePaymentProvider):
|
|||||||
'proceed.'))
|
'proceed.'))
|
||||||
|
|
||||||
if pp_captured_order.status == 'APPROVED':
|
if pp_captured_order.status == 'APPROVED':
|
||||||
|
# We are suspecting that some or even all APMs cannot be PATCHed after being approved by the buyer,
|
||||||
|
# without the PayPal Order losing its APPROVED-status again.
|
||||||
|
# Since APMs are already created with their proper custom_id and description (at the time the PayPal
|
||||||
|
# Order is created for the APM, we already have pretix order code), we skip the PATCH-request.
|
||||||
|
if payment.order.code not in pp_captured_order.purchase_units[0].custom_id:
|
||||||
try:
|
try:
|
||||||
custom_id = '{prefix}{orderstring}{postfix}'.format(
|
custom_id = '{prefix}{orderstring}{postfix}'.format(
|
||||||
prefix='{} '.format(self.settings.prefix) if self.settings.prefix else '',
|
prefix='{} '.format(self.settings.prefix) if self.settings.prefix else '',
|
||||||
|
|||||||
Reference in New Issue
Block a user