Comments (3)
Per history API https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history
GET https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionId}
The transactionId
should be used in this API, and as far as I know, there is no API to reflect the transctionID from the raw receipt. Please correct me if something is missing.
One work around could be, first call client.Verify
with raw receipt, and get the transactionId from this API. Then call the history API with this transactionId.
As for retrieving the transactionId from the receipt on the app (client side), the transactionIdentifier
of SKPaymentTransaction
is the transactionId.
Then, the client sends the transactionId to the server, and this transactionId is used to ios server API on the server side.
Could you please share some logic of App Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt
?
from go-iap.
Per history API https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history
GET https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionId}
The
transactionId
should be used in this API, and as far as I know, there is no API to reflect the transctionID from the raw receipt. Please correct me if something is missing.One work around could be, first call
client.Verify
with raw receipt, and get the transactionId from this API. Then call the history API with this transactionId.As for retrieving the transactionId from the receipt on the app (client side), the
transactionIdentifier
ofSKPaymentTransaction
is the transactionId.Then, the client sends the transactionId to the server, and this transactionId is used to ios server API on the server side.
Could you please share some logic of
App Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt
?
感谢老铁的回复。直接CH 交流吧。
早前我接入的是 verifyReceipt API,看官方文档已经弃用,客户端上传给服务端的是票据。
然后看到一篇文章是可以通过票据解析出transation_id,没有go,也查不到相关开源的实现,所以这里就疑惑了。
App Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt ,这个我是看掘金的一篇文章:
文章地址
官方提供的 SDK 里确实也是有提供 getTransactionldFromAppReceipt 方法,直接把票据解码出来。
在这之前我是不确定在交易后客户端能否拿到 transation_id
现在也还在和客户端确认中,看文档应该是可以在客户端拿到吧?
最终确认下,你做过苹果的订阅的流程是走客户端上报:transaction_id 吗?
from go-iap.
Per history API https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history
GET https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionId}
The
transactionId
should be used in this API, and as far as I know, there is no API to reflect the transctionID from the raw receipt. Please correct me if something is missing.
One work around could be, first callclient.Verify
with raw receipt, and get the transactionId from this API. Then call the history API with this transactionId.
As for retrieving the transactionId from the receipt on the app (client side), thetransactionIdentifier
ofSKPaymentTransaction
is the transactionId.
Then, the client sends the transactionId to the server, and this transactionId is used to ios server API on the server side.
Could you please share some logic ofApp Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt
?感谢老铁的回复。直接CH 交流吧。
早前我接入的是 verifyReceipt API,看官方文档已经弃用,客户端上传给服务端的是票据。 然后看到一篇文章是可以通过票据解析出transation_id,没有go,也查不到相关开源的实现,所以这里就疑惑了。 App Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt ,这个我是看掘金的一篇文章: 文章地址
官方提供的 SDK 里确实也是有提供 getTransactionldFromAppReceipt 方法,直接把票据解码出来。
在这之前我是不确定在交易后客户端能否拿到 transation_id 现在也还在和客户端确认中,看文档应该是可以在客户端拿到吧?
Yes
最终确认下,你做过苹果的订阅的流程是走客户端上报:transaction_id 吗?
Yes
from go-iap.
Related Issues (20)
- Hope to provide a function to decode JWSRenewalInfo HOT 3
- Consider add error type for request apple store api HOT 1
- PriceIncreaseStatus in JWSRenewalInfoDecodedPayload should be *int32 HOT 6
- Consider implement jwt.Cliams for the structure in path appstore HOT 1
- When encountering overly large receipt data, the returned JSON will be truncated, resulting in JSON validation failure HOT 9
- question related to the naming of playstore VeirfyProduct and VerifySubscriptionV2 methods HOT 2
- AutoRenewStatus const type HOT 1
- 苹果解析ParseSignedTransaction,为什么没有Price HOT 1
- Wrong type of consumptionState field HOT 1
- ios prod、sandbox验单 HOT 5
- offerDiscountType is missing in JWSTransactionDecodedPayload HOT 2
- Is there more detail error msg when verify google iap HOT 4
- can not connect https://oauth2.googleapis.com/token HOT 1
- appstore api: return status code 401 HOT 12
- How do you validate a Google Pay token for a sandbox? HOT 4
- Sandbox 401 error by appstore server api HOT 4
- IOS server api refund transaction revocation reason gives unexpected value HOT 10
- How to parse V2Notification from signedPayload HOT 3
- Check whether the token has expired a few minutes earlier HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-iap.