$paymentUniqueId,
Shopware()->
Session()->
get('sUserId'
),
]);
if (empty($orderNumber)) { $user =
$this->
getUser();
$basket =
$this->
getBasket();
if (!\
is_array($basket)) { throw new RuntimeException('Cart must not be empty at this point'
);
} $order =
Shopware()->
Modules()->
Order();
$order->sUserData =
$user;
$order->sComment =
Shopware()->
Session()->
get('sComment'
);
$order->sBasketData =
$basket;
$order->sAmount =
$basket[CheckoutKey::AMOUNT
];
$order->sAmountWithTax = !
empty($basket[CartKey::AMOUNT_WITH_TAX_NUMERIC
]) ?
$basket[CartKey::AMOUNT_WITH_TAX_NUMERIC
] :
$basket[CartKey::AMOUNT_NUMERIC
];
$order->sAmountNet =
$basket[CartKey::AMOUNT_NET_NUMERIC
];
$order->sShippingcosts =
$basket[CheckoutKey::SHIPPING_COSTS
];
$order->sShippingcostsNumeric =
$basket[CheckoutKey::SHIPPING_COSTS_WITH_TAX
];
$order->sShippingcostsNumericNet =
$basket[CheckoutKey::SHIPPING_COSTS_NET
];
$order->bookingId =
$transactionId;
$order->dispatchId =
Shopware()->
Session()->
get('sDispatch'
);