9 Commits
3.1.0 ... 3.3.0

Author SHA1 Message Date
JCash
92d90bb4de Fixed nul pointer deferencing 2021-10-06 09:55:49 +02:00
Björn Ritzl
e6e2f2de63 Update iap.script_api 2021-09-09 13:26:08 +02:00
Björn Ritzl
3468b52658 Merge pull request #41 from BigButtonCo/master
Add original_json to transaction for validating purchases on android
2021-09-09 13:23:13 +02:00
Mathias Westerdahl
bda785ef08 Merge pull request #44 from defold/buffer-threading-fix
Fixed threading issue of checking if command buffer is empty
2021-09-07 14:34:35 +02:00
JCash
b3b79006d7 Fixed threading issue of checking if command buffer is empty 2021-08-02 10:10:00 +02:00
Björn Ritzl
8b2c7b0bca Removed old Amazon SDK version 2021-07-22 19:58:18 +02:00
BigButtonCo
1a6d2f01e5 Merge branch 'defold:master' into master 2021-06-03 20:05:02 +02:00
BigButtonCo
276437b981 Update IapGooglePlay.java 2021-04-12 19:26:56 +02:00
BigButtonCo
246fcd3179 Added original_json 2021-04-12 19:22:33 +02:00
5 changed files with 13 additions and 3 deletions

View File

@@ -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.

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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);