2👍
✅
'02'
is a string so it needs to be converted to an int before getting passed to stripe. You might just need to do:
exp_month = int(request.POST.get('exp_month', ''))
exp_year = int(request.POST.get('exp_year', ''))
0👍
You should be accessing the data via the form.cleaned_data
dict rather than directly from the POST. Among other things, the form takes care of converting into the right data type.
- [Answered ]-Getting DUPLICATE error when logging in existing user with Django
- [Answered ]-Pip install error: ModuleNotFoundError No module named 'setuptools'
- [Answered ]-Patching multiple ORM calls in Django
- [Answered ]-Adding newrelic to a python stack (django) deployed via dokku
- [Answered ]-Django ORM Cannot filter by reversed foreign key
Source:stackexchange.com