Skip to content

Commit 25add61

Browse files
committed
Refactoring
1 parent d1a3a9f commit 25add61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/windows.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ impl<R: Runtime> Iap<R> {
239239
&self,
240240
product_id: String,
241241
product_type: String,
242-
offer_token: Option<String>,
242+
options: Option<PurchaseOptions>,
243243
) -> crate::Result<Purchase> {
244244
let context = self.get_store_context()?;
245245

@@ -254,6 +254,7 @@ impl<R: Runtime> Iap<R> {
254254
let store_id = HSTRING::from(&product_id);
255255

256256
// Create purchase properties if we have an offer token (for subscriptions)
257+
let offer_token = options.and_then(|opts| opts.offer_token);
257258
let purchase_result = if let Some(token) = offer_token {
258259
let properties = StorePurchaseProperties::Create(&HSTRING::from(&product_id))?;
259260

0 commit comments

Comments
 (0)