nepal-can-php-sdk, which may introduce indirect dependencies (e.g., Guzzle for HTTP requests). Verify SDK stability and compatibility with Laravel’s HTTP stack.dispatchSync for critical updates, delay() for non-critical ones).composer require pralhadstha/nepalcan-laravel
php artisan vendor:publish --provider="OmniCargo\NepalCan\NepalCanServiceProvider"
NCM_API_TOKEN and NCM_API_BASE_URL in .env.use OmniCargo\NepalCan\Facades\NepalCan;
$shipment = NepalCan::shipments()->create([
'from' => 'Kathmandu',
'to' => 'Pokhara',
'items' => [...],
]);
NepalCan\Events\WebhookReceived:
public function handle(WebhookReceived $event) {
// Process shipment update, tracking, etc.
}
public function __construct(private NepalCanClient $client) {}
composer.json constraints).cURL or Guzzle (handled by the underlying SDK).shipments, trackings, or webhook_events in your app’s DB.OmniCargo\NepalCan).shipment_delivered).failed_jobs table or a custom table).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| NCM API downtime | Shipments/tracking fail | Implement retry logic with exponential backoff. |
| Webhook delivery failures | Missed updates (e.g., COD payments) | Use queue retries + dead-letter queue. |
| Invalid API credentials | All API calls fail | Monitor HTTP 401/403 errors; alert ops. |
| SDK version incompatibility | API calls break | Pin SDK version in composer.json. |
| COD payment disputes | Revenue loss | Log disputes; integrate with accounting system. |
How can I help you explore Laravel packages today?