Django 贝宝 "POST /notify/ HTTP/1.0" 500 59
Django-paypal "POST /notify/ HTTP/1.0" 500 59
[31/Mar/2015 12:20:55] "POST /notify/ HTTP/1.0" 500 59
我收到此错误,仅此而已。信号简单未连接
@csrf_exempt
def showme(sender, **kwargs):
ipn_obj = sender
if ipn_obj.payment_status == "Completed":
user_profile = auth_user.objects.get(id=ipn_obj.custom)
if user_profile.balance==None:
user_profile.balance = float(10)
else:
user_profile.balance += float(10)
user_profile.save()
payment_was_successful.connect(showme)
我的通知url
@csrf_exempt
def notify(request):
payment_was_successful.connect(showme)
return HttpResponse('OK4')
通过手动添加通知url逻辑修复错误
@csrf_exempt
def notify(request):
if request.POST.get("payment_status") == "Completed":
user_profile = auth_user.objects.get(id=request.POST.get("custom"))
if user_profile.balance==None:
user_profile.balance = float(10)
else:
user_profile.balance += float(10)
user_profile.save()
return HttpResponse('OK4')
[31/Mar/2015 12:20:55] "POST /notify/ HTTP/1.0" 500 59
我收到此错误,仅此而已。信号简单未连接
@csrf_exempt
def showme(sender, **kwargs):
ipn_obj = sender
if ipn_obj.payment_status == "Completed":
user_profile = auth_user.objects.get(id=ipn_obj.custom)
if user_profile.balance==None:
user_profile.balance = float(10)
else:
user_profile.balance += float(10)
user_profile.save()
payment_was_successful.connect(showme)
我的通知url
@csrf_exempt
def notify(request):
payment_was_successful.connect(showme)
return HttpResponse('OK4')
通过手动添加通知url逻辑修复错误
@csrf_exempt
def notify(request):
if request.POST.get("payment_status") == "Completed":
user_profile = auth_user.objects.get(id=request.POST.get("custom"))
if user_profile.balance==None:
user_profile.balance = float(10)
else:
user_profile.balance += float(10)
user_profile.save()
return HttpResponse('OK4')