Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Mage_Checkout

Module: Shopping Cart API

Resource: cart_payment

Method:
  • cart_payment.list (SOAP V1)
  • shoppingCartPaymentList (SOAP V2)

Allows you to retrieve a list of available payment methods for a shopping cart (quote).

Arguments:

TypeNameDescription
stringsessionIdSession ID
intquoteIdShopping cart ID
stringstoreStore view ID or code (optional)

Return:

TypeNameDescription
arrayresultArray of shoppingCartPaymentMethodResponseEntity

The shoppingCartPaymentMethodResponseEntity content is as follows:

TypeNameDescription
stringcodePayment method code
stringtitlePayment method title
associativeArraycc_typesArray of credit card types

Examples

Request Example SOAP V1
$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'cart_payment.list', 'quoteId');
var_dump($result);
Response Example SOAP V1
array
  0 =>
    array
      'code' => string 'checkmo' (length=7)
      'title' => string 'Check / Money order' (length=19)
      'ccTypes' => null
  1 =>
    array
      'code' => string 'ccsave' (length=6)
      'title' => string 'Credit Card (saved)' (length=19)
      'ccTypes' =>
        array
          'AE' => string 'American Express' (length=16)
          'VI' => string 'Visa' (length=4)
          'MC' => string 'MasterCard' (length=10)
          'DI' => string 'Discover' (length=8)

Create the Magento file system owner