This commit is contained in:
Raphael Michel
2023-12-22 14:23:17 +01:00
parent 385c8c6ef1
commit c58a1aaa48

View File

@@ -22,6 +22,7 @@
import copy
import hashlib
import logging
import uuid
import requests
from django.core.cache import cache
@@ -110,6 +111,9 @@ class PayPalHttpClient(VendorPayPalHttpClient):
if self.environment.partner_id:
request.headers["PayPal-Partner-Attribution-Id"] = self.environment.partner_id
if "PayPal-Request-Id" not in request.headers:
request.headers["PayPal-Request-Id"] = str(uuid.uuid4())
def execute(self, request):
reqCpy = copy.deepcopy(request)