|
@@ -360,7 +360,7 @@ class PaypalCycleNotify(View):
|
|
|
billing_agreement = paypalrestsdk.BillingAgreement.find(agreement_id)
|
|
|
logger.info(type(billing_agreement))
|
|
|
# 记录钩子日志
|
|
|
- PaypalWebHookEventInsert['agreement_desc'] = json.dumps(billing_agreement.__dict__)
|
|
|
+ PaypalWebHookEventInsert['agreement_desc'] = repr(billing_agreement)
|
|
|
PaypalWebHookEvent.objects.create(**PaypalWebHookEventInsert)
|
|
|
|
|
|
# 订阅续费订单(如果完成周期数`==0,则是自动续费第一次扣款。否则说明是续费订单)
|
|
@@ -570,7 +570,7 @@ class PaypalCycleNotify(View):
|
|
|
agreement_id = paypal_body.get('billing_agreement_id')
|
|
|
billing_agreement = paypalrestsdk.BillingAgreement.find(agreement_id)
|
|
|
# 记录钩子日志
|
|
|
- PaypalWebHookEventInsert['agreement_desc'] = json.dumps(billing_agreement.__dict__)
|
|
|
+ PaypalWebHookEventInsert['agreement_desc'] = repr(billing_agreement)
|
|
|
PaypalWebHookEvent.objects.create(**PaypalWebHookEventInsert)
|
|
|
return HttpResponse('success')
|
|
|
|