Skip to content

Commit

Permalink
Add purchase token, bump 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ianrumac committed Jan 21, 2025
1 parent d327664 commit 2da0b91
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/Superwall-Android/releases) on GitHub.

## 1.5.3

### Enhancements
- Add `purchaseToken` to TransactionComplete

## 1.5.2

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion superwall/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
id("signing")
}

version = "1.5.2"
version = "1.5.3"

android {
compileSdk = 34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ data class GoogleBillingPurchaseTransaction(
@Serializable(with = UUIDSerializer::class)
@SerialName("app_account_token")
override val appAccountToken: UUID?,
@SerialName("purchase_token")
override val purchaseToken: String,
override var payment: StorePayment,
) : StoreTransactionType {
constructor(transaction: Purchase) : this(
Expand All @@ -62,5 +64,6 @@ data class GoogleBillingPurchaseTransaction(
revocationDate = null, // Replace with correct mapping
appAccountToken = null, // Replace with correct mapping
payment = StorePayment(transaction), // Replace with correct mapping
purchaseToken = transaction.purchaseToken,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class StoreTransaction(
@Serializable(with = UUIDSerializer::class)
override val appAccountToken: UUID? get() = transaction.appAccountToken

override val purchaseToken: String
get() = transaction.purchaseToken

// fun toDictionary(): Map<String, Any> {
// val json = Json { encodeDefaults = true }
// val jsonString = json.encodeToString(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface StoreTransactionType {
val offerId: String?
val revocationDate: Date?
val appAccountToken: UUID?
val purchaseToken: String
}

// Custom serializer
Expand Down

0 comments on commit 2da0b91

Please sign in to comment.