Dekodi: Try to find correct PayPal ID

This commit is contained in:
Raphael Michel
2019-05-02 09:12:57 +02:00
parent efb598e93a
commit 363dc74c31

View File

@@ -50,7 +50,7 @@ class DekodiNREIExporter(BaseExporter):
if p.provider == 'paypal':
paypal_email = p.info_data.get('payer', {}).get('payer_info', {}).get('email')
try:
ppid = p.info_data['transactions'][0]['related_resources']['sale']['id']
ppid = p.info_data['transactions'][0]['related_resources'][0]['sale']['id']
except:
ppid = p.info_data.get('id')
payments.append({