Store PayPal transaction type
This commit is contained in:
@@ -77,7 +77,8 @@ class Transaction(models.Model):
|
||||
category = models.TextField(blank=True, null=True)
|
||||
account_type = models.TextField(blank=True, null=True)
|
||||
info_source = models.TextField(blank=True, null=True)
|
||||
paypal_txn_id = models.CharField(max_length=17, blank=True, null=True)
|
||||
paypal_txn_id = models.CharField(max_length=17, blank=True, null=True, unique=True)
|
||||
paypal_txn_type = models.CharField(max_length=64, blank=True, null=True)
|
||||
paypal_payer_id = models.CharField(max_length=13, blank=True, null=True)
|
||||
|
||||
report_type = models.TextField(blank=True, null=True)
|
||||
|
@@ -63,6 +63,7 @@ class TransactionSerializer(serializers.ModelSerializer):
|
||||
'user',
|
||||
'recorder',
|
||||
'paypal_txn_id',
|
||||
'paypal_txn_type',
|
||||
'paypal_payer_id',
|
||||
]
|
||||
|
||||
|
@@ -122,6 +122,7 @@ def build_tx(data):
|
||||
payment_method=data.get('payment_type', 'unknown'),
|
||||
paypal_payer_id=data.get('payer_id', 'unknown'),
|
||||
paypal_txn_id=data.get('txn_id', 'unknown'),
|
||||
paypal_txn_type=data.get('txn_type', 'unknown'),
|
||||
reference_number=data.get('txn_id', 'unknown'),
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user