func (g *Gateway) UnmarshalYAML(unmarshal func(interface{}) error) error {
	var n string
	if err := unmarshal(&n); err != nil {
		return err
	}
	*g = NewGateway(n)
	if *g == UnknownGateway {
		return fmt.Errorf("payment gateway is not recognized")
	}
	return nil
}
UnmarshalYAML convert string to Gateway enum
package payment
import (
	"fmt"
	"strings"
)
type Gateway int
const (
	UnknownGateway Gateway = iota
	GatewayMidtrans
	GatewayXendit
)
func (g Gateway) String() string {
	return []string{"unkown", "midtrans", "xendit"}[g]
}