Commit graph

3089 commits

Author SHA1 Message Date
PCoder
af1690b846 Fix: obtaining stripe_customer in landing flow 2017-10-29 21:36:12 +01:00
PCoder
63eb7fc0e2 Rename contains to get_user_card_details 2017-10-29 21:31:11 +01:00
PCoder
abe8c9efa5 Add error details to messages datacenterlight landing flow 2017-10-29 15:05:32 +01:00
PCoder
bea3477d84 Handle errors related to payment by redirecting to payment page 2017-10-29 14:45:14 +01:00
PCoder
23e7edf7c2 Return True if associate_customer_card runs ok 2017-10-29 14:40:15 +01:00
PCoder
82ad9ac337 Add selected card handling in landing flow "Order confirmation" page 2017-10-29 13:17:26 +01:00
PCoder
2ffaee2d5b Add clear_items_from_list utility function 2017-10-29 13:14:29 +01:00
PCoder
248283b369 Show user's credit cards dynamically in landing payment page 2017-10-28 23:44:06 +02:00
PCoder
bafb4e7b68 Remove hasCreditcard js code - not used anymore 2017-10-28 23:42:30 +02:00
PCoder
db8dd9af54 Hosting payment: select card text update 2017-10-28 23:18:10 +02:00
PCoder
7e5cab2cc4 Fix PEP8 warnings 2017-10-28 22:44:58 +02:00
PCoder
2a8f02a197 Order by preferred and id fields for cards in settings page 2017-10-28 22:32:35 +02:00
PCoder
cac00d4b9e Implement select default card functionality 2017-10-28 22:19:53 +02:00
PCoder
dc8ea8d253 Make save_default_card method static 2017-10-28 22:18:54 +02:00
PCoder
c47b5cdc72 Add form to send selected card in settings page 2017-10-28 22:17:46 +02:00
PCoder
175180e193 Show DEFAULT text against the default card in the settings page 2017-10-28 20:45:00 +02:00
PCoder
2a59a3336b Add metadata (vm_id) to Stripe subscription 2017-10-28 20:25:18 +02:00
PCoder
d2ae94327a Associate card only if it has not already been done 2017-10-28 18:29:19 +02:00
PCoder
06a5cba50e Add contains utility method 2017-10-28 18:28:14 +02:00
PCoder
4be105a0a9 Set default card for newly added card in hosting flow 2017-10-28 16:48:03 +02:00
PCoder
a17a5f66bc Set preferred = False for cards that are not preferred 2017-10-28 16:47:10 +02:00
PCoder
b6d1e8df6b Set preferred for the card that's used for a subscription 2017-10-28 15:45:05 +02:00
PCoder
6212c9df50 Manage token and card_id properly in hosting flow 2017-10-28 15:30:42 +02:00
PCoder
d14a643171 Set preferred field as in card_details 2017-10-28 15:26:15 +02:00
PCoder
8759e2a4b5 Save default card only if Stripe's default_source is not None 2017-10-28 15:14:42 +02:00
PCoder
73169e825d Add set_as_default parameter for associate_customer_card method 2017-10-28 15:13:38 +02:00
PCoder
38168e8f8f Allow use of previous cards in hosting flow 2017-10-27 00:45:26 +02:00
PCoder
bd7db30633 Add card hidden field to BillingAddressForm 2017-10-27 00:43:07 +02:00
PCoder
1374eaf1a2 Rename id to stripe_api_cus_id 2017-10-27 00:41:49 +02:00
PCoder
a6d28bff86 Add set_default_card and set_default_card_from_stripe methods 2017-10-27 00:40:38 +02:00
M.Ravi
4dd407da67 Use card_id as session variable instead of token and customer 2017-10-26 17:57:11 +02:00
M.Ravi
780fa6cb60 Add get_or_create_user_card_detail method 2017-10-26 17:56:12 +02:00
M.Ravi
85d19c004b Remove redundant code in check_customer 2017-10-26 15:21:29 +02:00
M.Ravi
692f82cba4 Code rearrange 2017-10-26 15:15:27 +02:00
M.Ravi
ef9dc446db Use hasattr to check if a user already has a stripecustomer object 2017-10-26 15:00:54 +02:00
M.Ravi
8d2c120b43 Associate newly added card with customer from hosting 2017-10-26 12:29:16 +02:00
PCoder
de5035d12e Add id_card input element 2017-10-22 00:21:08 +02:00
PCoder
21bb336166 Add js code to submit id_card 2017-10-22 00:20:40 +02:00
PCoder
8351b1bf8b Use refactored get_all_cards_list function 2017-10-21 23:14:55 +02:00
PCoder
bf91bf3822 Change text: delete card to remove card 2017-10-21 23:14:05 +02:00
PCoder
7f4993c3f0 Update hosting payment template to use added cards 2017-10-21 23:12:53 +02:00
PCoder
303eb4112d Add doc. and return empty list for get_all_cards_list function 2017-10-21 21:34:54 +02:00
PCoder
14c7d6ac0e Refactor getting all cards to UserCardDetail.get_all_cards_list() 2017-10-21 21:27:21 +02:00
PCoder
8df72620d6 Add 'billing address updated' message in that case 2017-10-21 20:58:54 +02:00
PCoder
1e08ae5426 Stripe API: Use list() instead of all() as the former is deprecated 2017-10-21 20:46:29 +02:00
PCoder
fb2056bf95 Update stripe_id for a missing case 2017-10-21 20:45:00 +02:00
PCoder
600b549704 Handle case where a Stripe account may have been deleted via dashboard 2017-10-21 20:39:00 +02:00
PCoder
75e90dbacd Refactor and add messages 2017-10-21 20:37:50 +02:00
PCoder
be8181ec42 Add _messages template to hosting/settings.html 2017-10-21 17:02:24 +02:00
PCoder
70b6bbdf2f Save card id as a parameter and use it to delete a source 2017-10-21 13:27:35 +02:00