Add user validation on non refundable >X€ operations
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.
Not sure about the amount anyway.
Use of catalog.list could be a starting point, won ´t produce correct price for premium domain but work for all others case AFAIK
The pricing isn't currently available as a public API FYI
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")
@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)
I believe submitting a certificate request is worth double checking the CN and certificate type/cost so I'd go for a confirmation
Thanks!
@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 ok my mistake I was calling hosting.catalog.list instead of catalog.list