|
@@ -390,7 +390,10 @@ class PaypalCycleNotify(View):
|
|
agreement_id = paypal_body.get('billing_agreement_id')
|
|
agreement_id = paypal_body.get('billing_agreement_id')
|
|
paypal_transaction_id = paypal_body.get('id')
|
|
paypal_transaction_id = paypal_body.get('id')
|
|
amount = paypal_body.get('amount')
|
|
amount = paypal_body.get('amount')
|
|
- fee = paypal_body['transaction_fee'].get('value', 0)
|
|
|
|
|
|
+ if 'transaction_fee' in paypal_body:
|
|
|
|
+ fee = paypal_body['transaction_fee']['value']
|
|
|
|
+ else:
|
|
|
|
+ fee = 0
|
|
PaypalWebHookEventInsert = {
|
|
PaypalWebHookEventInsert = {
|
|
'webhook_event_id': json_obj.get('id'),
|
|
'webhook_event_id': json_obj.get('id'),
|
|
'resource_type': json_obj.get('resource_type'),
|
|
'resource_type': json_obj.get('resource_type'),
|