package setting

var WechatPayAppID = ""
var WechatPayMchID = ""
var WechatPayAPIv3Key = ""
var WechatPaySerialNo = ""
var WechatPayPubKeyID = ""
var WechatPayNotifyURL = ""
var WechatPayKeyPath = ""
var WechatPayPubKeyPath = ""
var WechatPayKeyB64 = ""
var WechatPayPubKeyB64 = ""
var WechatPayMinTopUp = 1
var WechatPayUnitPrice = 7.0

// IsWechatPayConfigured 检查微信支付核心配置是否完整
func IsWechatPayConfigured() bool {
	return WechatPayAppID != "" &&
		WechatPayMchID != "" &&
		WechatPayAPIv3Key != "" &&
		WechatPaySerialNo != "" &&
		WechatPayPubKeyID != "" &&
		(WechatPayKeyPath != "" || WechatPayKeyB64 != "") &&
		(WechatPayPubKeyPath != "" || WechatPayPubKeyB64 != "")
}

// OnWechatPayConfigChanged 配置变更时调用的回调函数（由 controller 包注册）
var OnWechatPayConfigChanged func()
