Commerce Foundation PaymentMethod CommerceQuery

This Commerce Server 2009 operation is used to retrieve the list of payment methods that the server supports.

Syntax

        var queryPaymentMethod = new CommerceQuery<CommerceEntity>("PaymentMethod");
      

Parameters

Parameters

Description

CommerceModelSearch

Optionally, you can set the PaymentType field if you want to only obtain PaymentMethods of the specified type. If you do not set the PaymentType field, then the system returns all configured payment methods.

Operation Sequence Components

Operation Sequence Component

Description

PaymentMethodQueryProcessor

Retrieves the payment methods dataset from Commerce Server and adds the requested ones to the response.

Valid Query Operations

Property

Description

CommerceRequest.SearchCiteria.Model.PaymentType

If this parameter is set, then payment methods matching this PaymentType are returned. If this parameter is not set, then all payment methods are returned.

Return Value

Returns a CommerceQueryOperationResponse containing entities matching the provided search criteria.

Returns a CommerceUpdateOperationResponse containing the number of items updated. If UpdateOptions.ReturnModel was specified in the request, the response will also contain the commerce entities that were updated.

Returns a CommerceCreateOperationResponse. If CreateOptions.ReturnModel was specified in the request, the response will contain the entity created.

Returns a CommerceDeleteOperationResponse. If DeleteOptions.ReturnDeletedCount was true in the request, the response will contain the number of entities deleted.

The CommerceResponse.CommerceEntities is zero or more matching PaymentMethod objects.

Exceptions

FaultException<GeneralOperationFault> - an unexpected error occurred while processing the request.

See Also

Other Resources

Developing with the Commerce Foundation Orders System

Commerce Foundation Payment

CommerceQuery