完成华为支付的验单

This commit is contained in:
ayflying
2025-08-06 10:26:08 +08:00
parent 039acea0af
commit 999f1f6a84
3 changed files with 52 additions and 19 deletions

View File

@@ -6,21 +6,14 @@ import (
)
const (
AuthTokenUrl = "https://oauth-api.cloud.huawei.com/rest.php?nsp_fmt=JSON&nsp_svc=huawei.oauth2.user.getTokenInfo"
OrderUrl = "https://orders-drcn.iap.hicloud.com/applications/purchases/tokens/verify"
LocationShanghai = "Asia/Shanghai"
RSA = "RSA"
RSA2 = "RSA2"
OrderResponseOk = "0"
PurchaseStateOk = 0
TokenUrl = "https://oauth-login.cloud.huawei.com/oauth2/v3/token"
)
func getOrderUrl(accountFlag int) string {
if accountFlag == 1 {
// site for telecom carrier
return "https://orders-at-dre.iap.dbankcloud.com"
//return "https://orders-at-dre.iap.dbankcloud.com"
return "https://orders-drcn.iap.cloud.huawei.com.cn"
} else {
// TODO: replace the (ip:port) to the real one
return "http://exampleserver/_mockserver_"