Get Payment Methods

Current version: 8.2

Developer tasks for using service method GetPaymentMethods.

GetPaymentMethods is used to retrieve the available payments methods from Commerce Server to be used with the order system and placing orders.

At your Visual Studio Solution setup:

  1. Reference the Sitecore.Commerce.Connect.CommerceServer and Sitecore.Commerce.dll.

  2. Select the class in your solution where you want to use this service method.

  3. To use the service method, paste the following code:

    RequestResponse
    
    var provider = new CommerceOrderServiceProvider();
    var request = new GetPaymentMethodsRequest("en-us");
    var result = provider.GetPaymentMethods(request);
    var shippingMethods = result.PaymentMethods;
    
    

Do you have some feedback for us?

If you have suggestions for improving this article,