Add Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Adds the specified Payment to the end of the PaymentCollection.

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

Syntax

'Declaration
Public Sub Add ( _
    payment As Payment _
)
'Usage
Dim instance As PaymentCollection
Dim payment As Payment

instance.Add(payment)
public void Add(
    Payment payment
)
public:
void Add(
    Payment^ payment
)
public function Add(
    payment : Payment
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

payment is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The entry being added is already a member of a collection.

ConfiguredLimitExceededException

The number of payments in the collection is already at the PaymentCountPerOrderGroupLimit set in the web.config.

EntityAlreadyExistsException

A Payment with the same PaymentId already exists in the collection.

Remarks

Adds the specified Payment to the end of the PaymentCollection. Successfully calling Add updates LastModified. ParentOrderForm and OrderGroupId will be set during an Add operation.

Permissions

See Also

Reference

PaymentCollection Class

PaymentCollection Members

Microsoft.CommerceServer.Runtime.Orders Namespace