mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 04:50:59 +08:00
🎨 Support in-app purchase PRO Features and Subscription on iOS https://github.com/siyuan-note/siyuan/issues/14159
This commit is contained in:
parent
205ebd26b5
commit
45dc8a18e6
@ -56,6 +56,7 @@ import (
|
|||||||
// -6:参数错误
|
// -6:参数错误
|
||||||
// -7:校验 accountToken 失败
|
// -7:校验 accountToken 失败
|
||||||
// -8:校验 transaction 失败
|
// -8:校验 transaction 失败
|
||||||
|
// -9:未知的商品
|
||||||
func VerifyAppStoreTransaction(accountToken, transactionID string) (retCode int) {
|
func VerifyAppStoreTransaction(accountToken, transactionID string) (retCode int) {
|
||||||
retCode = -2
|
retCode = -2
|
||||||
retMsg := "unknown error"
|
retMsg := "unknown error"
|
||||||
@ -169,6 +170,12 @@ func VerifyAppStoreTransaction(accountToken, transactionID string) (retCode int)
|
|||||||
logging.LogErrorf(retMsg)
|
logging.LogErrorf(retMsg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if -6 == result.Code {
|
||||||
|
retCode = -9
|
||||||
|
retMsg = fmt.Sprintf("verify app store transaction failed [code=%d, msg=%s]", result.Code, result.Msg)
|
||||||
|
logging.LogErrorf(retMsg)
|
||||||
|
return
|
||||||
|
}
|
||||||
if -64 == result.Code {
|
if -64 == result.Code {
|
||||||
retCode = -2
|
retCode = -2
|
||||||
retMsg = fmt.Sprintf("verify app store transaction failed [code=%d, msg=%s]", result.Code, result.Msg)
|
retMsg = fmt.Sprintf("verify app store transaction failed [code=%d, msg=%s]", result.Code, result.Msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user