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: if 'source' in charge:
cardholder_name = charge['source']['name'] cardholder_name = charge['source']['name']
else: else:
cardholder_name = customer.user.email cardholder_name = customer.user.name
# Create Billing Address # Create Billing Address
billing_address = form.save() billing_address = form.save()