Code Monkey home page Code Monkey logo

Comments (3)

richzw avatar richzw commented on July 29, 2024 1

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.

SFLAQiu avatar SFLAQiu commented on July 29, 2024

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 ?

感谢老铁的回复。直接CH 交流吧。

早前我接入的是 verifyReceipt API,看官方文档已经弃用,客户端上传给服务端的是票据。
然后看到一篇文章是可以通过票据解析出transation_id,没有go,也查不到相关开源的实现,所以这里就疑惑了。
App Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt ,这个我是看掘金的一篇文章:
文章地址
Snipaste_2024-01-22_18-50-10

官方提供的 SDK 里确实也是有提供 getTransactionldFromAppReceipt 方法,直接把票据解码出来。

在这之前我是不确定在交易后客户端能否拿到 transation_id
现在也还在和客户端确认中,看文档应该是可以在客户端拿到吧?
最终确认下,你做过苹果的订阅的流程是走客户端上报:transaction_id 吗?

from go-iap.

richzw avatar richzw commented on July 29, 2024

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 ?

感谢老铁的回复。直接CH 交流吧。

早前我接入的是 verifyReceipt API,看官方文档已经弃用,客户端上传给服务端的是票据。 然后看到一篇文章是可以通过票据解析出transation_id,没有go,也查不到相关开源的实现,所以这里就疑惑了。 App Store Server LibraryReceiptUtility::getTransactionldFromAppReceipt ,这个我是看掘金的一篇文章: 文章地址 Snipaste_2024-01-22_18-50-10

官方提供的 SDK 里确实也是有提供 getTransactionldFromAppReceipt 方法,直接把票据解码出来。

在这之前我是不确定在交易后客户端能否拿到 transation_id 现在也还在和客户端确认中,看文档应该是可以在客户端拿到吧?

Yes

最终确认下,你做过苹果的订阅的流程是走客户端上报:transaction_id 吗?

Yes

from go-iap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.