<?php

declare (strict_types=1);
namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Service\Ucp\Checkout;

use WC_Order;
/**
 * Interface for creating WooCommerce orders from UCP checkout sessions.
 */
interface CheckoutOrderCreatorInterface
{
    /**
     * Create an order from the current cart state.
     *
     * @param string               $session_id  UCP checkout session ID.
     * @param array<string, mixed> $payment     Payment information from the request.
     * @param array<string, mixed> $platform    Platform information (e.g., webhook URL).
     *
     * @return WC_Order The created and prepared order.
     * @throws \Exception If cart validation or order creation fails.
     */
    public function create_from_cart(string $session_id, array $payment, array $platform): WC_Order;
}
