def purchase_certificate():
    options = {}
    for key in request.form:
        options[key] = request.form[key]

    logging.info(options)

    try:
        check_request(options)
        normalize_request(options)
        cert = process_request(options)
    except WildCardCSRError:
        msg = "Wildcard domain not allowed"
        return jsonify(status="ERROR", msg=msg)
    except DomainCouponMismatchError, e:
        logging.error("Domain coupon mismatch")
        msg = "Error: %s" % e
        return jsonify(status="ERROR", msg=msg)
def process_order():
    options = {}
    for key in request.form:
        options[key] = request.form[key]

    logging.info(options)

    try:
        check_request(options)
        normalize_request(options)
        cert = process_request(options)
    except WildCardCSRError:
        options["error"] = "Wildcard domain not allowed"
        return buy_worker(options)
    except DomainCouponMismatchError, e:
        logging.error("Domain coupon mismatch")
        options["error"] = "Error: %s" % e
        return buy_worker(options)
Beispiel #3
0
def process_order():
    options = {}
    for key in request.form:
        options[key] = request.form[key]

    logging.info(options)

    try:
        options = check_request(options)
        options = normalize_request(options)
        cert = process_request(options)
    except WildCardCSRError:
        options['error'] = "Wildcard domain not allowed"
        return buy(options)
    except Exception, e:
        logging.exception("Uncaught exception while processing order")
        logging.error(e)
        options['error'] = 'Error: %s' % e
        return buy(options)