字段“ option_selection1”没有默认值

时间:2019-04-26 10:19:33

标签: django-paypal

当我清除付款过程数据时,我的ipn数据库中没有数据。.它引发错误...字段'option_selection1'没有默认值。.

def home1(request):
    args = {}
    paypal_dict = {
        "business": "***&****",
        "amount": "1.00",
        "currency_code": "INR",
        "item_name": "police",
        "invoice": "unique-invoice-00001",
        "notify_url": request.build_absolute_uri(reverse('paypal-ipn')),
        #"notify_url": "http://13.233.99.180:8000/a-very-hard-to-guess-url/",
        "return": request.build_absolute_uri(reverse('api.views.paypal_return')),
        #"return": "http://13.233.99.180:8000/paypal-return/",
        #"cancel_return": "http://13.233.99.180:8000/paypal-cancel",
        "cancel_return": request.build_absolute_uri(reverse('api.views.paypal_cancel')),
        "custom":"premium_plan",
         # Custom command to correlate to some function later (optional)
    }
    form = PayPalPaymentsForm(initial=paypal_dict)
    args["form"] = form
    return render_to_response("home1.html", args)

0 个答案:

没有答案