fix: snapshot merchant identity for alipay and easypay

This commit is contained in:
IanShaw027
2026-04-21 13:35:54 +08:00
parent 267844ebe6
commit 0934f737d5
13 changed files with 328 additions and 55 deletions

View File

@@ -240,6 +240,16 @@ func buildPaymentOrderProviderSnapshot(sel *payment.InstanceSelection, req Creat
}
snapshot["currency"] = "CNY"
}
if providerKey == payment.TypeAlipay {
if merchantAppID := strings.TrimSpace(sel.Config["appId"]); merchantAppID != "" {
snapshot["merchant_app_id"] = merchantAppID
}
}
if providerKey == payment.TypeEasyPay {
if merchantID := strings.TrimSpace(sel.Config["pid"]); merchantID != "" {
snapshot["merchant_id"] = merchantID
}
}
if len(snapshot) == 1 {
return nil