Commit graph

252 commits

Author SHA1 Message Date
PCoder
c285e1d9eb Set respective order_confirm_url for landing vs hosting flows
For hosting flow also take the user to add_ssh_key after payment
2019-07-01 20:30:06 +05:30
PCoder
207c3a6c6c Skip SSH key page for generic products page 2019-07-01 08:57:39 +05:30
PCoder
79eba3b70c Remove add SSH key form in order confirmation related code 2019-07-01 08:28:28 +05:30
PCoder
47fd9a8f28 Adjust urls in datacenterlight/hosting apps urls/views after refactor 2019-07-01 08:09:37 +05:30
PCoder
f502e53845 Add basic implementation of AskSSHKeyView 2019-07-01 06:45:48 +05:30
PCoder
feeb102f92 Do SSH key validation only if the user doesn't have an existing key and
the user has input some value in the add ssh key field
2019-06-25 03:48:29 +02:00
PCoder
9ee1b7c124 Make public_key form params mandatory only if existing keys do not exist 2019-06-25 02:25:17 +02:00
PCoder
ecc26d14e5 Show previous keys if exist in order confirmation 2019-06-24 17:24:35 +02:00
PCoder
87f5bf3dcc Pass UserHostingKeyForm to the context of OrderConfirmationView 2019-06-24 04:32:27 +02:00
1bfb710ee6 Change datacenterlight.ch message form to send email to support@ungleich.ch 2018-11-11 17:01:19 +01:00
PCoder
c36554b4d1 Round total_price also to 2 decimal places 2018-10-18 06:58:18 +02:00
PCoder
42d6f38f0c Merge branch 'master' into task/5681/offer-512mb-ram 2018-10-08 07:56:57 +02:00
PCoder
5985ded36f Obtain product_slug from session
Obtaining slug from kwargs won't work in OrderConfirmation page
because we do not set the kwargs for that page. To resolve this,
I add the product_slug to the generic_payment_details dict in the
session
2018-10-06 07:31:41 +02:00
PCoder
2b7d4bbef5 Redirect to product page on error 2018-10-05 11:10:10 +02:00
PCoder
10dab1350a Use refactored method clear_all_session_vars 2018-10-05 11:01:49 +02:00
PCoder
12eabc5f6c Redirect user to product page on login
For the case when user is on product page and tries logging in
2018-10-05 08:58:57 +02:00
PCoder
ec70cd1c83 Pass product_id to ProductPaymentForm 2018-10-03 22:53:24 +02:00
PCoder
193b87bbb5 Use proper payment form 2018-10-03 09:36:43 +02:00
PCoder
ca18004819 Remove stale reference to product_id 2018-10-03 09:36:00 +02:00
PCoder
e1c91d886b Use explicit index in plan name formatting 2018-10-03 09:35:20 +02:00
PCoder
495ac0c6d6 Use ProductPaymentForm instead of GenericPaymentForm
Only if product_id is in the session, which identifies that we are
coming here via product_slug
2018-10-03 08:19:33 +02:00
PCoder
1cdc9ea657 Clear product_id from session 2018-10-03 08:18:19 +02:00
PCoder
a4065c7e24 Handle product_slug 2018-10-03 07:55:56 +02:00
PCoder
e47f4f05b4 Handler if product_slug is given (wip) 2018-10-02 10:02:02 +02:00
PCoder
c2dbbf0424 Update views.py to include 512mb ram case
RAM server side validation is as follows:
- pid is a mandatory parameter for a valid RAM, otherwise a
 validation error is raised
- check if enable_512mb_ram is enabled. In this case, validate
if the input ram is either a whole number or 0.5 and in the range
0.5 <= value <= 200
- otherwise check ram is a whole number in the range
1 <= value <= 200
2018-10-01 07:52:28 +02:00
PCoder
3075cffd77 Include product_id in generic payment Stripe plan name 2018-09-26 23:01:04 +02:00
PCoder
232022aaaf Fix flake8 errors 2018-09-26 22:51:34 +02:00
PCoder
6c03e3f712 Change generic payment subject and correct misplaced comma
Data Center LightConfirmation of your payment ->
Confirmation of your payment
2018-09-26 22:42:33 +02:00
PCoder
52d048a555 Add missing Cheers string in email 2018-09-26 22:35:11 +02:00
PCoder
3148dbccf8 Translate text + reformat 2018-09-26 22:31:06 +02:00
PCoder
84056a5b36 Correct generic payment email as per Sanghee's corrections 2018-09-26 22:21:59 +02:00
PCoder
737681136f Correct flake8 error 2018-09-26 21:23:46 +02:00
PCoder
4575ff60ec Refactor validation code + Add product_id to context 2018-09-26 09:15:24 +02:00
PCoder
51c5fa98dd Save description and product_id 2018-09-25 02:14:11 +02:00
PCoder
ed7ffb355f Server side validation of the POSTed product 2018-09-25 02:13:39 +02:00
PCoder
1988020006 Handle generic-payment-form POST
To return pricing based on user's selected product
2018-09-25 02:12:42 +02:00
PCoder
481f13d20c Check key existence 2018-09-24 22:27:25 +02:00
PCoder
d99271f71d Redirect users to orders after generic payment is successful 2018-09-23 17:19:24 +02:00
PCoder
ff993e32db Revert back to POST parameters for billing-form method 2018-09-23 17:01:29 +02:00
PCoder
dd82bdc9da Fix a flake8 error 2018-09-23 13:27:33 +02:00
PCoder
7f3b916c58 Reformat code 2018-09-23 13:26:48 +02:00
PCoder
d23624c525 Modify datacenterlight/views.py to includes various cases of generic payment 2018-09-23 13:15:26 +02:00
PCoder
730492089b Modify PaymentOrderView to accomodate the new generic payment case (WIP) 2018-09-22 08:20:49 +02:00
PCoder
8a30100488 Use price in stripe plan name too 2018-09-05 23:26:51 +02:00
PCoder
34ed51a643 Don't dissociate card if transaction fails 2018-07-07 02:03:42 +02:00
PCoder
5cd62abc70 Refactor code 2018-07-05 20:36:43 +02:00
PCoder
1e214f7b21 Improve comment 2018-07-05 20:35:34 +02:00
PCoder
6b663d82a1 Remove unused variable 2018-07-05 20:35:00 +02:00
PCoder
faa0604fae Remove redundant code 2018-07-05 09:58:07 +02:00
PCoder
8d7b01d7e2 Disable dissociating card on subscription failure 2018-07-05 09:57:47 +02:00