mirror of
https://github.com/defold/extension-iap
synced 2025-09-28 01:22:19 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
92d90bb4de | ||
|
e6e2f2de63 | ||
|
3468b52658 | ||
|
bda785ef08 | ||
|
b3b79006d7 | ||
|
8b2c7b0bca | ||
|
1a6d2f01e5 | ||
|
276437b981 | ||
|
246fcd3179 |
@@ -226,6 +226,10 @@
|
|||||||
type: string
|
type: string
|
||||||
desc: Apple only[icon:apple]. The original transaction. This field is only set when `state` is `TRANS_STATE_RESTORED`.
|
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
|
- name: signature
|
||||||
type: string
|
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.
|
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.
|
||||||
|
Binary file not shown.
@@ -592,8 +592,12 @@ static dmExtension::Result UpdateIAP(dmExtension::Params* params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static dmExtension::Result FinalizeIAP(dmExtension::Params* params)
|
static dmExtension::Result FinalizeIAP(dmExtension::Params* params)
|
||||||
|
{
|
||||||
|
if (g_IAP.m_Listener)
|
||||||
{
|
{
|
||||||
dmScript::DestroyCallback(g_IAP.m_Listener);
|
dmScript::DestroyCallback(g_IAP.m_Listener);
|
||||||
|
}
|
||||||
|
|
||||||
g_IAP.m_Listener = 0;
|
g_IAP.m_Listener = 0;
|
||||||
|
|
||||||
if (g_IAP.m_PendingTransactions) {
|
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)
|
void IAP_Queue_Flush(IAPCommandQueue* queue, IAPCommandFn fn, void* ctx)
|
||||||
{
|
{
|
||||||
assert(fn != 0);
|
assert(fn != 0);
|
||||||
|
|
||||||
|
DM_MUTEX_SCOPED_LOCK(queue->m_Mutex);
|
||||||
|
|
||||||
if (queue->m_Commands.Empty())
|
if (queue->m_Commands.Empty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DM_MUTEX_SCOPED_LOCK(queue->m_Mutex);
|
|
||||||
|
|
||||||
for(uint32_t i = 0; i != queue->m_Commands.Size(); ++i)
|
for(uint32_t i = 0; i != queue->m_Commands.Size(); ++i)
|
||||||
{
|
{
|
||||||
fn(&queue->m_Commands[i], ctx);
|
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("date", toISO8601(new Date(purchase.getPurchaseTime())));
|
||||||
p.put("receipt", purchase.getPurchaseToken());
|
p.put("receipt", purchase.getPurchaseToken());
|
||||||
p.put("signature", purchase.getSignature());
|
p.put("signature", purchase.getSignature());
|
||||||
|
p.put("original_json", purchase.getOriginalJson());
|
||||||
}
|
}
|
||||||
catch (JSONException e) {
|
catch (JSONException e) {
|
||||||
Log.wtf(TAG, "Failed to convert purchase", e);
|
Log.wtf(TAG, "Failed to convert purchase", e);
|
||||||
|
Reference in New Issue
Block a user