func SaveAPI(w http.ResponseWriter, r *http.Request) {
	name := strings.TrimSpace(r.FormValue("name"))
	street := strings.TrimSpace(r.FormValue("street"))
	suite := strings.TrimSpace(r.FormValue("suite"))
	city := strings.TrimSpace(r.FormValue("city"))
	state := strings.TrimSpace(r.FormValue("state"))
	postal := strings.TrimSpace(r.FormValue("postal"))
	country := strings.TrimSpace(r.FormValue("country"))
	phone := strings.TrimSpace(r.FormValue("phone"))
	email := strings.TrimSpace(r.FormValue("email"))
	percentFee, _ := strconv.ParseFloat(r.FormValue("percentFee"), 64)
	fixedFee, _ := strconv.ParseFloat(r.FormValue("fixedFee"), 64)
	statementDesc := strings.TrimSpace(r.FormValue("descriptor"))
	if len(statementDesc) > maxStatementDescriptorLength {
		statementDesc = statementDesc[:maxStatementDescriptorLength]
	}
	percentFeeStr := "0.0" + strconv.FormatFloat(percentFee*100, 'f', 0, 64)
	percentFee, _ = strconv.ParseFloat(percentFeeStr, 64)
	data := Info{}
	data.CompanyName = name
	data.Street = street
	data.Suite = suite
	data.City = city
	data.State = strings.ToUpper(state)
	data.PostalCode = postal
	data.Country = strings.ToUpper(country)
	data.PhoneNum = phone
	data.Email = email
	data.PercentFee = percentFee
	data.FixedFee = fixedFee
	data.StatementDescriptor = statementDesc
	c := r.Context()
	err := save(c, data)
	if err != nil {
		output.Error(err, "", w)
		return
	}
	output.Success("dataSaved", data, w)
}
SaveAPI saves new or updates existing company info in the datastore
package company
import (
	"context"
	"errors"
	"log"
	"net/http"
	"strconv"
	"strings"
	"cloud.google.com/go/datastore"
	"github.com/coreymgilmore/stripe-appengine-frontend/pkgs/datastoreutils"
	"github.com/coreymgilmore/stripe-appengine-frontend/pkgs/output"
	"github.com/coreymgilmore/stripe-appengine-frontend/pkgs/sqliteutils"
)
const datastoreKeyName = "companyInfoKey"
const maxStatementDescriptorLength = 22
const (
	defaultPercentFee = 0.0290  
	defaultFixedFee   = 0.30    
)
var ErrCompanyDataDoesNotExist = errors.New("company: info does not exist")
type Info struct {
	CompanyName         string  `json:"company_name"`          
	Street              string  `json:"street"`                
	Suite               string  `json:"suite"`                 
	City                string  `json:"city"`                  
	State               string  `json:"state"`                 
	PostalCode          string  `json:"postal_code"`           
	Country             string  `json:"country"`               
	PhoneNum            string  `json:"phone_num"`             
	Email               string  `json:"email"`                 
	PercentFee          float64 `json:"percentage_fee"`        
	FixedFee            float64 `json:"fixed_fee"`             
	StatementDescriptor string  `json:"statement_descriptor"`  
	ID int64 `json:"sqlite_user_id"`
}
var defaultCompanyInfo = Info{
	CompanyName:         "",
	Street:              "",
	Suite:               "",
	City:                "",
	State:               "",
	PostalCode:          "",
	Country:             "",
	PhoneNum:            "",
	Email:               "",
	PercentFee:          defaultPercentFee,
	FixedFee:            defaultFixedFee,
	StatementDescriptor: "",
}
func GetAPI(w http.ResponseWriter, r *http.Request) {
	info, err := Get(r)
	if err != nil {
		output.Error(err, "", w)
		return
	}
	output.Success("dataFound", info, w)
}
func Get(r *http.Request) (Info, error) {
	data := Info{}
	var err error
	if sqliteutils.Config.UseSQLite {
		c := sqliteutils.Connection
		q := `
			SELECT *
			FROM ` + sqliteutils.TableCompanyInfo + ` 
			WHERE ID=?
		`
		err = c.Get(&data, q, sqliteutils.DefaultCompanyInfoID)
	} else {
		c := r.Context()
		client, err := datastoreutils.Connect(c)
		if err != nil {
			return data, err
		}
		key := datastore.NameKey(datastoreutils.EntityCompanyInfo, datastoreKeyName, nil)
		err = client.Get(c, key, &data)
		if err == datastore.ErrNoSuchEntity {
			log.Println("company.Get", "Company info doesn't exist yet.  Returning default values.")
			return defaultCompanyInfo, nil
		}
	}
	return data, err
}