return $orderId;
} protected function createTransaction(string
$orderId, string
$paymentMethodId): string
{ $this->ids->
set( 'transaction_state',
$this->initialStateIdLoader->
get(OrderTransactionStates::STATE_MACHINE
) );
$transaction =
(new OrderTransactionBuilder($this->ids, 'transaction'
)) ->
add('orderId',
$orderId) ->
add('paymentMethodId',
$paymentMethodId) ->
add('stateId',
$this->ids->
get('transaction_state'
)) ->
add('payload', '{}'
) ->
amount(100
) ->
build();
$this->orderTransactionRepository->
upsert([$transaction],
$this->context
);
return $this->ids->
get('transaction'
);
}