Skip to content

Commit

Permalink
Merge pull request #15 from deltaDNA/5.0.5
Browse files Browse the repository at this point in the history
5.0.5 import
  • Loading branch information
PhilCooperKing committed Apr 23, 2021
2 parents ad2d943 + 30d5b79 commit bf6f405
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/Android.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/ConfigurationWindow.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/DefineSymbolsHelper.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/DeltaDNASdkChecker.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/InitialisationHelper.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/MenuItems.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/SdkChecker.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/WindowHelper.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/DeltaDNA/Editor/iOS.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions Assets/DeltaDNA/Runtime/AudiencePinpointer.cs
Expand Up @@ -42,10 +42,14 @@ public static void RecordInstallEvent()
/// <summary>
/// Record this event when an in-app purchase was made with real money.
/// </summary>
/// <param name="realCurrencyAmount"></param>
/// <param name="realCurrencyType"></param>
/// <param name="realCurrencyAmount">The amount of real currency spent in the purchase, in the smallest denomination of that currency (e.g. cents for USD, pence for GBP etc)</param>
/// <param name="realCurrencyType">The currency code of the currency spent in this purchase (e.g. USD for US Dollars)</param>
/// <param name="transactionID">The Apple transaction ID for this purchase as received from Apple's StoreKit API</param>
/// <param name="transactionReceipt">The receipt data (base64 encoded) as received from Apple's StoreKit API</param>
public static void RecordPurchaseEvent(int realCurrencyAmount,
string realCurrencyType)
string realCurrencyType,
string transactionID,
string transactionReceipt)
{
#if UNITY_IOS
if (CheckForRequiredFields())
Expand All @@ -54,8 +58,17 @@ public static void RecordInstallEvent()

signalTrackingEvent.AddParam("realCurrencyAmount", realCurrencyAmount);
signalTrackingEvent.AddParam("realCurrencyType", realCurrencyType);
signalTrackingEvent.AddParam("transactionID", transactionID);

DDNA.Instance.RecordEvent(signalTrackingEvent);

if (DDNA.Instance.Settings.AutomaticallyGenerateTransactionForAudiencePinpointer) {
Transaction transactionEvent = new Transaction("Pinpointer Signal Transaction", "PURCHASE", new Product(), new Product());
transactionEvent.SetReceipt(transactionReceipt);
transactionEvent.SetTransactionId(transactionID);

DDNA.Instance.RecordEvent(transactionEvent);
}
}
#endif
}
Expand Down
5 changes: 4 additions & 1 deletion Assets/DeltaDNA/Runtime/Helpers/Settings.cs
Expand Up @@ -18,7 +18,7 @@ namespace DeltaDNA
{
public class Settings
{
public static readonly string SDK_VERSION = "Unity SDK v5.0.2";
public static readonly string SDK_VERSION = "Unity SDK v5.0.5";

internal static readonly string ENGAGE_API_VERSION = "4";

Expand Down Expand Up @@ -74,6 +74,7 @@ internal Settings()
MaxConcurrentImageCacheFetches = 3;
MultipleActionsForEventTriggerEnabled = false;
MultipleActionsForImageMessagesEnabled = false;
AutomaticallyGenerateTransactionForAudiencePinpointer = true;
}

/// <summary>
Expand Down Expand Up @@ -213,5 +214,7 @@ public bool DebugMode
public int HttpRequestConfigurationTimeoutSeconds { get; set; }
public int HttpRequestConfigurationMaxRetries { get; set; }
public int HttpRequestConfigurationRetryBackoffFactorSeconds { get; set; }

public bool AutomaticallyGenerateTransactionForAudiencePinpointer { get; set; }
}
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,19 @@
# Change Log

## [5.0.5-preview] - 2021-04-23

### New
- Signal purchase method will now send a verifiable transaction

## [5.0.4-preview] - 2021-04-16

### Fixed
- Fixed issue where parsing of some cached dates would throw an exception for certain user cultures
- Fixed PlayServicesResolver being placed within the DeltaDNA folder instead of at the project root
- Fixed default setting for "use application version" being false instead of true
- Fixed some legal terms in LICENSE and README files
- Fixed issue in Audience Pinpointer helpers where the ATT status was not reported correctly

## [5.0.1](https://github.com/deltaDNA/unity-sdk/releases/tag/5.0.1)

### Fixed
Expand Down

0 comments on commit bf6f405

Please sign in to comment.