OrderService

Namespace

IO\Services

Constants
Type Name Value Description

array

WRAPPED_ORDERITEM_TYPES

[1,2,3,9]

array

VISIBLE_ORDER_TYPES

[1,5]

Properties
Type Name Description

OrderRepositoryContract

$orderRepository

BasketService

$basketService

SessionStorageService

$sessionStorage

FrontendPaymentMethodRepositoryContract

$frontendPaymentMethodRepository

AddressRepositoryContract

$addressRepository

UrlService

$urlService

CheckoutService

$checkoutService

CustomerService

$customerService

string

$pluginNamespace

Methods
public __construct($orderRepository, $basketService, $sessionStorage, $frontendPaymentMethodRepository, $addressRepository, $urlService, $checkoutService, $customerService)

OrderService constructor.

Parameters

Type

Name

Description

OrderRepositoryContract

$orderRepository

BasketService

$basketService

SessionStorageService

$sessionStorage

FrontendPaymentMethodRepositoryContract

$frontendPaymentMethodRepository

AddressRepositoryContract

$addressRepository

UrlService

$urlService

CheckoutService

$checkoutService

CustomerService

$customerService

public placeOrder():LocalizedOrder

Place an order

public executePayment($orderId, $paymentId):array

Execute the payment for a given order.

Parameters

Type

Name

Description

int

$orderId

The order id to execute payment for

int

$paymentId

The MoP-ID to execute

public findOrderById($orderId, $wrap = true):mixed

Find an order by ID

Parameters

Type

Name

Description

int

$orderId

bool

$wrap

public findOrderByAccessKey()
public getOrdersForContact($contactId, $page = 1, $items = 50, $filters = [], $wrapped = true): PaginatedResult

Get a list of orders for a contact

Parameters

Type

Name

Description

int

$contactId

int

$page

int

$items

array

$filters

bool

$wrapped

public getOrdersCompact()
public getLatestOrderForContact($contactId):LocalizedOrder

Get the last order created by the current contact

Parameters

Type

Name

Description

int

$contactId

public getOrderPropertyByOrderId()
public isReturnActive()
public createOrderReturn()
public getReturnableItems($order):array
Parameters

Type

Name

Description

Order

$order

public getPaymentMethodListForSwitch($currentPaymentMethodId, $orderId = null):Collection

List all payment methods available for switch in MyAccount

Parameters

Type

Name

Description

int

$currentPaymentMethodId

null

$orderId

public complete($order)

Do steps after creating the order

Parameters

Type

Name

Description

Order

$order