我正在研究 django-paypal IPN 源代码,我意识到它没有 subscr_payment 交易类型的信号。
我可以假设如果我收到一条 subscr_signup IPN 消息,支付成功了吗?
我的信号处理程序
def subscription_succesful(sender, **kwargs):
ipn_obj = sender
if ipn_obj.payment_status == "Completed":
user = User.objects.get(pk=ipn_obj.custom)
business = Business.objects.get(user=user)
business.active = True
business.save()
subscription_signup.connect(subscription_succesful)
这目前不起作用,因为 ipn_obj.payment_status 未在 subscr_signup IPN 消息中发送。