<?php
// Inject App\Services\IctwGateway into your existing authorized controller.
// Your controller must verify order ownership, BDT currency and allowed local order status.
// $link=$gateway->create($attempt->gateway_reference, $attempt->amount_bdt, $attempt->method);
// return redirect()->away($link['checkout_url']); // Client checks gateway origin/path.
// In a scheduled reconciliation command:
// $status=$gateway->status($attempt->gateway_reference,$attempt->amount_bdt,$attempt->method);
// DB::transaction(function() use($orderId,$status,$attempt) {
//   $order=Order::whereKey($orderId)->lockForUpdate()->firstOrFail();
//   Re-check order status and the immutable attempt total/method/reference before any write.
//   If status is verified and the order is still eligible, save TrxID and mark Paid once.
//   Use a UNIQUE local provider+TrxID constraint and an outbox for emails/fulfilment.
// });
// Model and field names depend on the client's website. This file does not create public routes.
