Partager via


GiftCertificatePayment Constructor (String, Guid)

Initializes a new instance of the GiftCertificatePayment class using the specified billing address ID and payment method name.

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

Syntax

'Declaration
Public Sub New ( _
    billingAddressId As String, _
    paymentMethodId As Guid _
)
'Usage
Dim billingAddressId As String
Dim paymentMethodId As Guid

Dim instance As New GiftCertificatePayment(billingAddressId, _
    paymentMethodId)
public GiftCertificatePayment(
    string billingAddressId,
    Guid paymentMethodId
)
public:
GiftCertificatePayment(
    String^ billingAddressId, 
    Guid paymentMethodId
)
public function GiftCertificatePayment(
    billingAddressId : String, 
    paymentMethodId : Guid
)

Parameters

  • paymentMethodId
    Type: System..::.Guid
    The ID of a payment method used for this payment.

Exceptions

Exception Condition
ArgumentException

The length of the billingAddressId string is greater than the maximum allowable length specified in the orders storage mapping file.

Remarks

The default maximum length for billingAddressId is 50 characters, as defined in the corresponding table column constraint specified in the default orders storage mapping file, OrderObjectMappings.xml. The specified payment method name should meet the criteria for PaymentMethodId.

GiftCertificatePayment is derived from the abstract Payment class and represents a payment mechanism.

Permissions

See Also

Reference

GiftCertificatePayment Class

GiftCertificatePayment Members

GiftCertificatePayment Overload

Microsoft.CommerceServer.Runtime.Orders Namespace

CreditCardPayment

CashCardPayment

PurchaseOrderPayment