func (le *LetsEncrypt) acceptChallenge(challenge *acme.Challenge, order *acme.Order) (*acme.Order, error) {
	// Do this challenge
	_, err := le.AcmeClient.Accept(le.Ctx, challenge)
	if err != nil {
		return nil, err
	}

	// Wait until order is completed
	order, err = le.AcmeClient.WaitOrder(le.Ctx, order.URI)
	if err != nil {
		return nil, err
	}

	if order.Status != acme.StatusReady {
		return nil, errValidationFailed
	}

	return order, nil
}
// acceptChallenge will accept a given challenge (http-01) for the given order and waits until LetsEncrypt has validated
// the order. It will then return a validated order which we can use for requesting the actual certificate through
// FinalizeOrder.
acceptChallenge will accept a given challenge  for the given order and waits until LetsEncrypt has validated
the order. It will then return a validated order which we can use for requesting the actual certificate through
FinalizeOrder.
// acceptChallenge will accept a given challenge ( http - 01 ) for the given order and waits until LetsEncrypt has validated // the order . It will then return a validated order which we can use for requesting the actual certificate through // FinalizeOrder .
func (le *LetsEncrypt) acceptChallenge(challenge *acme.Challenge, order *acme.Order) (*acme.Order, error) {
	_, err := le.AcmeClient.Accept(le.Ctx, challenge)
	if err != nil {
		return nil, err
	}
	order, err = le.AcmeClient.WaitOrder(le.Ctx, order.URI)
	if err != nil {
		return nil, err
	}
	if order.Status != acme.StatusReady {
		return nil, errValidationFailed
	}
	return order, nil
}
func ( le * LetsEncrypt ) acceptChallenge ( challenge * acme . Challenge , order * acme . Order ) ( * acme . Order , error ) { _ , err := le . AcmeClient . Accept ( le . Ctx , challenge ) if err != nil { return nil , err } order , err = le . AcmeClient . WaitOrder ( le . Ctx , order . URI ) if err != nil { return nil , err } if order . Status != acme . StatusReady { return nil , errValidationFailed } return order , nil }
acceptChallenge will accept a given challenge  for the given order and waits until LetsEncrypt has validated
the order.
acceptChallenge will accept a given challenge for the given order and waits until LetsEncrypt has validated the order .
// Do this challenge // Wait until order is completed