Skip to content

Commit

Permalink
Merge c3692ee into c4f96d0
Browse files Browse the repository at this point in the history
  • Loading branch information
dulacp committed Dec 20, 2013
2 parents c4f96d0 + c3692ee commit 16bbd05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion payments/views.py
Expand Up @@ -129,7 +129,8 @@ def subscribe(request, form_class=PlanForm):
customer = request.user.customer
except ObjectDoesNotExist:
customer = Customer.create(request.user)
customer.update_card(request.POST.get("stripe_token"))
if request.POST.get("stripe_token"):
customer.update_card(request.POST.get("stripe_token"))
customer.subscribe(form.cleaned_data["plan"])
data["form"] = form_class()
data["location"] = reverse("payments_history")
Expand Down

0 comments on commit 16bbd05

Please sign in to comment.