Added Hosting Order model, Created Billing Address Model , Method to create a customer using Stripe API , Created Customer Stripe profile to store for further charges , Method in order to charge an amount to a customer
This commit is contained in:
		
					parent
					
						
							
								f5978a7da9
							
						
					
				
			
			
				commit
				
					
						bf334a38d4
					
				
			
		
					 17 changed files with 281 additions and 42 deletions
				
			
		|  | @ -1,19 +1,17 @@ | |||
| from django import forms | ||||
| from .models import ContactMessage | ||||
| from .models import ContactMessage, BillingAddress | ||||
| from django.template.loader import render_to_string | ||||
| from django.core.mail import EmailMultiAlternatives | ||||
| from django.utils.translation import ugettext_lazy as _ | ||||
| from utils.fields import CountryField | ||||
| # from utils.fields import CountryField | ||||
| 
 | ||||
| 
 | ||||
| class BillingAddressForm(forms.Form): | ||||
|     street_address = forms.CharField() | ||||
|     city = forms.CharField() | ||||
|     postal_code = forms.CharField() | ||||
|     country = CountryField() | ||||
| class BillingAddressForm(forms.ModelForm): | ||||
|     token = forms.CharField(widget=forms.HiddenInput()) | ||||
| 
 | ||||
|     class Meta: | ||||
|         model = BillingAddress | ||||
|         fields = ['street_address', 'city', 'postal_code', 'country'] | ||||
|         labels = { | ||||
|             'street_address': _('Street Address'), | ||||
|             'city': _('City'), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue