다음을 통해 공유


AcceptBasket Method

Validates the specified basket with the specified pipeline.

Namespace:  Microsoft.CommerceServer.Orders
Assembly:  Microsoft.CommerceServer.Orders.CrossTierTypes (in Microsoft.CommerceServer.Orders.CrossTierTypes.dll)

Syntax

'Declaration
Public Function AcceptBasket ( _
    basketXml As XmlElement, _
    pipelineName As String, _
    saveOrder As Boolean _
) As XmlElement
'Usage
Dim instance As BasketManager
Dim basketXml As XmlElement
Dim pipelineName As String
Dim saveOrder As Boolean
Dim returnValue As XmlElement

returnValue = instance.AcceptBasket(basketXml, _
    pipelineName, saveOrder)
public XmlElement AcceptBasket(
    XmlElement basketXml,
    string pipelineName,
    bool saveOrder
)
public:
XmlElement^ AcceptBasket(
    XmlElement^ basketXml, 
    String^ pipelineName, 
    bool saveOrder
)
public function AcceptBasket(
    basketXml : XmlElement, 
    pipelineName : String, 
    saveOrder : boolean
) : XmlElement

Parameters

  • saveOrder
    Type: System..::.Boolean
    Specifies whether the resulting order should be saved to the database. true to save to the database; otherwise false.

Return Value

Type: System.Xml..::.XmlElement
The XML representation of the basket or the purchase order.

Exceptions

Exception Condition
NotAuthorizedException

The user does not have permission to perform this operation.

NotSupportedException

Called in local mode and this method is implemented only for agent mode.

TimeoutException

Thrown if an SQL command timeout occurs.

Remarks

Validates the specified basket with the specified pipeline.

In order to perform an AcceptBasket, the user must have the OrdersViewer permissions. See Orders System Roles [CS06] for more information about the specific roles in the Order System.

If saveOrder is true, after validation the basket will be converted to a purchase order and will be saved to the database. If the saveOrder is true, the Create PurchaseOrder permission is required. If the pipeline execution reports a warning then this method will return the basket xml. The user should look at "Purchase_Errors" and "Basket_Errors" weakly typed properties in the OrderForm class to get the list of warnings.

Some order system APIs support distributed transactions. If a cookie with a valid transaction is found the order system enlists as part of that transaction. If a valid transaction is not found the order system initiates a new transaction.

Permissions

See Also

Reference

BasketManager Class

BasketManager Members

Microsoft.CommerceServer.Orders Namespace