我有一个沙盒PAYPAL区域, 我的语言是python - Django和我使用django-paypal 我的服务器上的ipn tes工作但是 当有人试图买东西时,在沙盒中的paypal过程后我没有收到信号,在我的paypal_ipn中我没有看到交易。 所以问题是我没有收到信号。 这是我在models.py
中的信号代码from paypal.standard.ipn.signals import payment_was_successful
def show_me_the_money(sender, **kwargs):
code = sender.item_number
type, number_product, pagamento_corso_id = code.split('_')
obj = get_object_or_404(PagamentoCorso, int(pagamento_corso_id))
obj.pagamento = True
obj.save()
payment_was_successful.connect(show_me_the_money)
请帮助我因为7天......我非常沮丧! : - )
答案 0 :(得分:5)
我认为您可以使用Paypal测试工具向您的通知网址发送虚假通知。这可能会使调试更容易。
http://www.friendly-stranger.com/pictures/paypal.jpg
你还可以做的是运行django-paypal附带的测试。它应该像
python manage.py test paypal
您还可以查看测试代码并创建自己的测试来调试问题。
如果您仍然无法弄清楚您的网址配置以及将IPN表单传递给模板的视图。
答案 1 :(得分:3)
我有类似的问题。在我的情况下,我可以从访问日志中看到PayPal 访问我的付款通知URL,请求是200 OK,但没有在Django端触发信号。
原来付款处于“待定”状态而不是“已完成”状态(我没有收听paypal.standard.ipn.signals.payment_was_flagged
信号)。
我的付款被标记的原因是错误的settings.PAYPAL_RECEIVER_EMAIL
和错误的paypal_dict["business"]
电子邮件地址。完全相同的问题as for this guy。
答案 2 :(得分:0)
在我的情况下,原因是微不足道的 - 我已经将信号处理程序代码添加到models.py
,它没有自动加载,因此处理程序从未真正使用过并连接到信号。最简单但难看的解决方案是将它们移到<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAgGBgcGERIHBwcVFRMQFhkYFxAVERgYFxMWFxYXGBMVFRYVJCMfGhcgGhcgICsdICcxKCsoHxswMS8mMC4uKCYBCQkJDQwNFw0OGTIhFx0wMjItMioyJzIyJzImMicmMi0mLDEqLTIyJiYyJiYmJi0tMjImLTImJiYyJiYmJiYmMv/AABEIAGMCtAMBIgACEQEDEQH/xAAbAAEAAwEB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iIgb7xHmPK30TfeI8x5W+iIgb7xHmPK30TfeI8x5W+iIgb7xHmPK30TfeI8x5W+iIgb7xHmPK30TfeI8x5W+iIgb7xHmPK30TfeI8x5W+iIgi1NVNVnrJ33IFr2A0+n5oiIP/9k="" width="692" height="99" border="0">
,建议使用Django的documentation方法。