gandi.cli icon indicating copy to clipboard operation
gandi.cli copied to clipboard

Add user validation on non refundable >X€ operations

Open kalou opened this issue 11 years ago • 8 comments

Playing with the certificate command, I just spent €10 to buy a certificate for pouet.com

While it's not very disturbing for a temporary VM (a few cents if you delete it immediately) I believe we should add confirmation messages for higher cost operations. Pricing information would be a must but might be a little more difficult to implement right now.

kalou avatar Oct 14 '14 10:10 kalou

Not sure about the amount anyway.

kalou avatar Oct 14 '14 10:10 kalou

Use of catalog.list could be a starting point, won ´t produce correct price for premium domain but work for all others case AFAIK

gdchamal avatar Oct 14 '14 11:10 gdchamal

The pricing isn't currently available as a public API FYI

romuald avatar Oct 14 '14 12:10 romuald

Alright, we should focus on displaying what the customer will buy and let him a chance to double-check even technical params (eg. explicit the certificate type and duration, remind the CN for verification, use an explicit sentence such as "will be billed on your account")

kalou avatar Oct 14 '14 12:10 kalou

@gdchamal @romuald catalog.list method is indeedpublic but can only process hosting products, not domains or certificates

@kalou displaying a short summary like for vm creation is a good idea, do you want only a summary or a prompt for confirmation before launching ? (and a --flag to bypass this prompt for scripting)

sayoun avatar Oct 16 '14 09:10 sayoun

I believe submitting a certificate request is worth double checking the CN and certificate type/cost so I'd go for a confirmation

Thanks!

kalou avatar Oct 16 '14 10:10 kalou

@sayoun catalog.list can price domains and certificates (but not correctly premium domains), but yes will slow down process

example of catalog.list parameter : for domain: {'action': {'name': 'create'}, 'product' : {'description' : '.fr', 'type': 'domain'}} for cert: {'action': {'name': 'create'}, 'product' : {'description' : 'cert_std_1_0_0', 'type': 'certificate'}}

gdchamal avatar Oct 16 '14 15:10 gdchamal

@gdchamal ok my mistake I was calling hosting.catalog.list instead of catalog.list

sayoun avatar Oct 16 '14 16:10 sayoun