def has_billing_profile(self): try: api = PaymentAPI() if api.get_customers(self.user.username): return True except Exception: pass return False
def usaepay_members(request): members = [] api = PaymentAPI() for m in Member.objects.active_members(): username = m.user.username customers = api.get_customers(username) if customers: for c in customers: if c.Enabled: members.append({'member': m, 'username': username, 'next': c.Next, 'customer_number': c.CustNum}) return render_to_response('staff/usaepay_members.html', {'members': members}, context_instance=RequestContext(request))
def usaepay_members(request): members = [] api = PaymentAPI() for u in User.helper.active_members(): username = u.username customers = api.get_customers(username) if customers: for c in customers: if c.Enabled: members.append({'user': u, 'username': username, 'next': c.Next, 'customer_number': c.CustNum}) return render(request, 'staff/billing/usaepay_members.html', {'members': members})
def usaepay_members(request): members = [] api = PaymentAPI() for u in User.helper.active_members(): username = u.username customers = api.get_customers(username) if customers: for c in customers: if c.Enabled: members.append({'user': u, 'username': username, 'next': c.Next, 'customer_number': c.CustNum}) return render(request, 'staff/usaepay_members.html', {'members': members})
def usaepay_members(request): members = [] api = PaymentAPI() for u in User.helper.active_members(): username = u.username customers = api.get_customers(username) if customers: for c in customers: if c.Enabled: members.append({"user": u, "username": username, "next": c.Next, "customer_number": c.CustNum}) return render_to_response( "staff/usaepay_members.html", {"members": members}, context_instance=RequestContext(request) )