Commerce Foundation CreditCard

This Commerce Server 2009 commerce entity is used to store information for a single credit card.

Model

This commerce entity can be modified, as required. This model, taken from the out-of-the-box site, is provided as an example.

<CommerceEntity name="CreditCard">
    <DisplayName value="CreditCard">
      <LanguageSpecific value="fr: CreditCard" language="fr-CA"/>
    </DisplayName>
    <Description value="User Credit Card">
      <LanguageSpecific value="fr: User Credit Card" language="fr-CA"/>
    </Description>
    <EntityMappings>
      <EntityMapping csType="Microsoft.CommerceServer.Runtime.Orders.CreditCardPayment" csAssembly="Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" csArea="Orders">
        <PropertyMappings>
          <PropertyMapping property="Id" csProperty="PaymentId"/>
          <PropertyMapping property="CustomerName" csProperty="CustomerNameOnPayment"/>
        </PropertyMappings>
      </EntityMapping>
      <EntityMapping csType="Microsoft.CommerceServer.Runtime.Profiles.Profile" csAssembly="Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" csDefinitionName="CreditCard" csArea="Profiles">
        <PropertyMappings>
          <PropertyMapping property="AdapterLastChangedDate" csProperty="ProfileSystem.csadapter_date_last_changed" />
          <PropertyMapping property="BillingAddressId" csProperty="GeneralInfo.billing_address" />
          <PropertyMapping property="CreditCardIdentifier" csProperty="GeneralInfo.last_4_digits" />
          <PropertyMapping property="CreditCardNumber" csProperty="GeneralInfo.cc_number" />
          <PropertyMapping property="DateCreated" csProperty="ProfileSystem.date_created" />
          <PropertyMapping property="DateModified" csProperty="ProfileSystem.date_last_changed" />
          <PropertyMapping property="ExpirationMonth" csProperty="GeneralInfo.expiration_month" />
          <PropertyMapping property="ExpirationYear" csProperty="GeneralInfo.expiration_year" />
          <PropertyMapping property="Id" csProperty="GeneralInfo.id" />
          <PropertyMapping property="KeyIndex" csProperty="ProfileSystem.KeyIndex" />
          <PropertyMapping property="ModifiedBy" csProperty="ProfileSystem.user_id_changed_by" />
        </PropertyMappings>
      </EntityMapping>
    </EntityMappings>
    <Properties>
      <Property name="CreditCardNumber" dataType="String">
        <DisplayName value="Credit Card Number">
          <LanguageSpecific value="fr: Credit Card Number" language="fr-CA"/>
        </DisplayName>
        <Description value="Credit Card Number">
          <LanguageSpecific value="fr: Credit Card Number" language="fr-CA"/>
        </Description>
        <Constraints>
          <RequiredProperty>
        <Message value="Credit Card Number is required">
          <LanguageSpecific value="fr: Credit Card Number is required" language="fr-CA"/>
        </Message>
          </RequiredProperty>
          <Range minValue="0" minBoundaryType="Include" maxValue="40" maxBoundaryType="Include">
        <Message value="Credit Card Number length must be within the defined range.">
          <LanguageSpecific value="fr: Credit Card Number length must be within the defined range." language="fr-CA"/>
        </Message>
          </Range>
        </Constraints>
      </Property>
      <Property name="BillingAddressId" dataType="String" />
    </Properties>
</CommerceEntity>

Properties

Property

Type

Description

AdapterLastChangedDate

DateTime?

Used for BizTalk adapter functionality.

AuthorizationCode

String

The credit card authorization code provided by the payment processor. This property is only meaningful when the CreditCard is being accessed as part of a Basket operation.

BillingAddressId

String

The billing address for the credit card.

CreditCardIdentifier

String

A user-viewable identifier for this credit card. For example, last four digits of the credit card.

CreditCardNumber

String

Account number of this credit card.

Dd464496.alert_note(en-US,CS.90).gifNote:
The full credit card number will never be returned by the service. Instead it will only return a masked version of the credit card number.

CustomerName

String

The customer's name as it appears on the credit card. This property is only meaningful when the CreditCard is being accessed as part of a Basket operation.

DateCreated

DateTime?

Date the credit card was created.

DateModified

DateTime?

Date the credit card was last modified.

DisplayName

String

The display name of the payment account. This property is only meaningful when the CreditCard is being accessed as part of a Basket operation.

ExirationYear

int?

Expiration year of the credit card.

ExpirationMonth

int?

Expiration month of the credit card.

Id

String

ID for this credit card.

KeyIndex

int?

Key index that was used to encrypt the sensitive data in this profile. This property is read-only.

ModifiedBy

String

User that last modified the credit card.

ValidationCode

String

A validation code specific to the credit card vendor. For example, CVV number. This property is only meaningful when the CreditCard is being accessed as part of a Basket operation.

Relationships

Relationship

Description

PaymentMethod

The payment method associated with this credit card.

Supported Operations

Commerce Foundation Basket CommerceQuery

Commerce Foundation Basket CommerceUpdate

Commerce Foundation UserProfile CommerceCreate

Commerce Foundation UserProfile CommerceQuery

Commerce Foundation UserProfile CommerceUpdate

See Also

Other Resources

Developing with the Commerce Foundation Profiles System

Commerce Foundation PaymentMethod