mirror of
https://github.com/defold/extension-iap
synced 2025-09-27 17:12:18 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
92d90bb4de | ||
|
e6e2f2de63 | ||
|
3468b52658 | ||
|
bda785ef08 | ||
|
b3b79006d7 | ||
|
1a6d2f01e5 | ||
|
276437b981 | ||
|
246fcd3179 |
@@ -226,6 +226,10 @@
|
||||
type: string
|
||||
desc: Apple only[icon:apple]. The original transaction. This field is only set when `state` is `TRANS_STATE_RESTORED`.
|
||||
|
||||
- name: original_json
|
||||
type: string
|
||||
desc: Android only[icon:android]. The purchase order details in JSON format.
|
||||
|
||||
- name: signature
|
||||
type: string
|
||||
desc: Google Play only[icon:googleplay]. A string containing the signature of the purchase data that was signed with the private key of the developer.
|
||||
|
@@ -592,8 +592,12 @@ static dmExtension::Result UpdateIAP(dmExtension::Params* params)
|
||||
}
|
||||
|
||||
static dmExtension::Result FinalizeIAP(dmExtension::Params* params)
|
||||
{
|
||||
if (g_IAP.m_Listener)
|
||||
{
|
||||
dmScript::DestroyCallback(g_IAP.m_Listener);
|
||||
}
|
||||
|
||||
g_IAP.m_Listener = 0;
|
||||
|
||||
if (g_IAP.m_PendingTransactions) {
|
||||
|
@@ -121,13 +121,14 @@ void IAP_Queue_Push(IAPCommandQueue* queue, IAPCommand* cmd)
|
||||
void IAP_Queue_Flush(IAPCommandQueue* queue, IAPCommandFn fn, void* ctx)
|
||||
{
|
||||
assert(fn != 0);
|
||||
|
||||
DM_MUTEX_SCOPED_LOCK(queue->m_Mutex);
|
||||
|
||||
if (queue->m_Commands.Empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DM_MUTEX_SCOPED_LOCK(queue->m_Mutex);
|
||||
|
||||
for(uint32_t i = 0; i != queue->m_Commands.Size(); ++i)
|
||||
{
|
||||
fn(&queue->m_Commands[i], ctx);
|
||||
|
@@ -102,6 +102,7 @@ public class IapGooglePlay implements PurchasesUpdatedListener {
|
||||
p.put("date", toISO8601(new Date(purchase.getPurchaseTime())));
|
||||
p.put("receipt", purchase.getPurchaseToken());
|
||||
p.put("signature", purchase.getSignature());
|
||||
p.put("original_json", purchase.getOriginalJson());
|
||||
}
|
||||
catch (JSONException e) {
|
||||
Log.wtf(TAG, "Failed to convert purchase", e);
|
||||
|
Reference in New Issue
Block a user