- Migration: shopify_variant_id on products_sizes, shopify_order_id on products_sales - ShopifyService: paginated REST client (2024-10 API) - shopify:map — one-time command to link variants by SKU - shopify:sync — reconciliation command (Shopify is master) - VerifyShopifyWebhook middleware: HMAC-SHA256 verification - ShopifyWebhookController: idempotent orders/paid handler, FIFO inventory deduction - Webhook route: POST /api/webhooks/shopify/orders-paid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f54b471848
commit
467d85dfec
11 files changed
+349
-1
No files matched your search
@@ -1,8 +1,13 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Api\LotController;
|
||||
use App\Http\Controllers\ShopifyWebhookController;
|
||||
use App\Http\Middleware\VerifyShopifyWebhook;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/lot/{lot_number}', [LotController::class, 'show'])
|
||||
->middleware('throttle:30,1')
|
||||
->name('api.lot');
|
||||
|
||||
Route::post('/webhooks/shopify/orders-paid', [ShopifyWebhookController::class, 'ordersPaid'])
|
||||
->middleware(VerifyShopifyWebhook::class);
|
||||
Reference in new issue
Block a user