diff options
Diffstat (limited to 'postgresqleu/paypal/util.py')
-rw-r--r-- | postgresqleu/paypal/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/postgresqleu/paypal/util.py b/postgresqleu/paypal/util.py index 1eb03243..d7d38096 100644 --- a/postgresqleu/paypal/util.py +++ b/postgresqleu/paypal/util.py @@ -128,6 +128,11 @@ class PaypalAPI(object): elif 'alternate_full_name' in t['payer_info']['payer_name']: r['NAME'] = t['payer_info']['payer_name']['alternate_full_name'] + # If we haven't found a name on the transaction *anywhere*, set the name field to + # the email address. + if not r['NAME']: + r['NAME'] = r['EMAIL'] + if 'fee_amount' in t['transaction_info']: r['FEEAMT'] = t['transaction_info']['fee_amount']['value'] |