diff --git a/src/pretix/plugins/paypal2/client/core/paypal_http_client.py b/src/pretix/plugins/paypal2/client/core/paypal_http_client.py index b4812203c7..4552d9b5fc 100644 --- a/src/pretix/plugins/paypal2/client/core/paypal_http_client.py +++ b/src/pretix/plugins/paypal2/client/core/paypal_http_client.py @@ -32,7 +32,7 @@ class PayPalHttpClient(VendorPayPalHttpClient): # Cached access tokens are not updated by PayPal to include new Merchants that granted access rights since # the access token was generated. Therefor we increment the cycle count and by that invalidate the cached # token and pull a new one. - incr = cache.get('pretix_paypal_token_hash_cycle', default=0) + incr = cache.get('pretix_paypal_token_hash_cycle', default=1) # Then we get all the items that make up the current credentials and create a hash to detect changes checksum = hashlib.sha256(''.join([ diff --git a/src/pretix/plugins/paypal2/views.py b/src/pretix/plugins/paypal2/views.py index 0f4bbd72d8..7721582d59 100644 --- a/src/pretix/plugins/paypal2/views.py +++ b/src/pretix/plugins/paypal2/views.py @@ -211,7 +211,7 @@ def isu_return(request, *args, **kwargs): try: cache.incr('pretix_paypal_token_hash_cycle') except ValueError: - cache.set('pretix_paypal_token_hash_cycle', 0) + cache.set('pretix_paypal_token_hash_cycle', 1) gs = GlobalSettingsObject() prov = Paypal(event)