User customer's name instead of email for cardholder_name if not provided

This commit is contained in:
PCoder 2017-12-23 23:07:53 +01:00
parent 1f85273fd0
commit 10bc05f700

View file

@ -379,7 +379,7 @@ class MembershipPaymentView(LoginRequiredMixin, IsNotMemberMixin, FormView):
if 'source' in charge:
cardholder_name = charge['source']['name']
else:
cardholder_name = customer.user.email
cardholder_name = customer.user.name
# Create Billing Address
billing_address = form.save()