Skip to content

Commit

Permalink
Merge pull request #375 from qonversion/fix/updatePolicy
Browse files Browse the repository at this point in the history
Fixed update policy issue for purchase with options.
  • Loading branch information
SpertsyanKM authored Dec 24, 2024
2 parents 1aa69ab + 7d1ee0b commit 58c4d3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/internal/qonversion_internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,16 @@ class QonversionInternal implements Qonversion {
promoOfferData['timestamp'] = purchaseOptions.promotionalOffer?.paymentDiscount.timestamp;
}

final updatePolicy = purchaseOptions.updatePolicy;
final rawResult = await _channel
.invokeMethod(Constants.mPurchase, {
Constants.kProductId: product.qonversionId,
Constants.kOldProductId: purchaseOptions.oldProduct?.qonversionId,
Constants.kOfferId: purchaseOptions.offerId,
Constants.kApplyOffer: purchaseOptions.applyOffer,
Constants.kUpdatePolicyKey: purchaseOptions.updatePolicy,
Constants.kUpdatePolicyKey: updatePolicy != null
? StringUtils.capitalize(describeEnum(updatePolicy))
: null,
Constants.kPurchaseContextKeys: purchaseOptions.contextKeys,
Constants.kPurchaseQuantity: purchaseOptions.quantity,
Constants.kPromoOffer: promoOfferData,
Expand Down

0 comments on commit 58c4d3d

Please sign in to comment.