use product type if set to support consumables and subscriptions
[stouyapi.git] / bin / import-game-data.php
index e9626383954589bcbcfc330521fefd1f67eae44b..0227b459ff3bbfa3bc22c73ef8c6d5d5742e731c 100755 (executable)
@@ -380,12 +380,13 @@ function buildProduct($product)
         return null;
     }
     return [
-        'type'          => 'entitlement',
+        'type'          => $product->type ?? 'entitlement',
         'identifier'    => $product->identifier,
         'name'          => $product->name,
         'description'   => $product->description ?? '',
         'localPrice'    => $product->localPrice,
         'originalPrice' => $product->originalPrice,
+        'priceInCents'  => $product->originalPrice * 100,
         'percentOff'    => 0,
         'currency'      => $product->currency,
     ];