@fleetbase/storefront-engine 0.3.29 → 0.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/composer.json
CHANGED
package/extension.json
CHANGED
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ use Fleetbase\FleetOps\Models\Order;
|
|
|
6
6
|
use Fleetbase\Storefront\Models\Network;
|
|
7
7
|
use Fleetbase\Storefront\Models\NotificationChannel;
|
|
8
8
|
use Fleetbase\Storefront\Models\Store;
|
|
9
|
+
use Fleetbase\Support\Utils;
|
|
9
10
|
use Illuminate\Container\Container;
|
|
10
11
|
use Kreait\Laravel\Firebase\FirebaseProjectManager;
|
|
11
12
|
use NotificationChannels\Apn\ApnMessage;
|
|
@@ -117,7 +118,9 @@ class PushNotification
|
|
|
117
118
|
$notificationChannel = static::getNotificationChannel('apn', $storefront, $order);
|
|
118
119
|
$config = (array) $notificationChannel->config;
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
$isProductionEnv = Utils::castBoolean(data_get($config, 'production', app()->isProduction()));
|
|
122
|
+
|
|
123
|
+
return new PushOkClient(PuskOkToken::create($config), $isProductionEnv);
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
public static function getStorefrontFromOrder(Order $order): Network|Store|null
|