map对齐
Build docker and publish / build (20.15.1) (push) Successful in 8m21s

This commit is contained in:
2026-03-07 05:54:49 -08:00
parent 71f4bd1f5f
commit a0ae7b1c8d
4 changed files with 150 additions and 53 deletions
@@ -83,27 +83,11 @@ func (l *AttachTransactionByIdLogic) AttachById(req *types.AttachAppleTransactio
apiCfg.PrivateKey = strings.ReplaceAll(apiCfg.PrivateKey, "-----END\nPRIVATE\nKEY-----", "-----END PRIVATE KEY-----")
}
// Fallback to hardcoded key (For debugging/dev)
if apiCfg.PrivateKey == "" {
apiCfg.PrivateKey = `-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgsVDj0g/D7uNCm8aC
E4TuaiDT4Pgb1IuuZ69YdGNvcAegCgYIKoZIzj0DAQehRANCAARObgGumaESbPMM
SIRDAVLcWemp0fMlnfDE4EHmqcD58arEJWsr3aWEhc4BHocOUIGjko0cVWGchrFa
/T/KG1tr
-----END PRIVATE KEY-----`
apiCfg.KeyID = "2C4X3HVPM8"
}
if apiCfg.KeyID == "" || apiCfg.IssuerID == "" || apiCfg.PrivateKey == "" {
l.Errorw("attach by id credential missing")
l.Errorw("attach by id credential missing", logger.Field("keyID", apiCfg.KeyID), logger.Field("issuerID", apiCfg.IssuerID), logger.Field("hasPrivateKey", apiCfg.PrivateKey != ""))
return nil, errors.Wrapf(xerr.NewErrCode(xerr.ERROR), "apple server api credential missing")
}
// Hardcode IssuerID as fallback (since it was missing in config)
if apiCfg.IssuerID == "" || apiCfg.IssuerID == "some_issuer_id" {
apiCfg.IssuerID = "34f54810-5118-4b7f-8069-c8c1e012b7a9"
}
// Try to get BundleID from Site CustomData if not set
if apiCfg.BundleID == "" {
var customData struct {