GetReceiptsList

Retrieve a list of custom receipt templates.

Description

This method allows you pull a list of the receipt templates based on the target receipt type. This type can be Email, Print, or Both.

An array of Receipt objects is returned. For efficiency reasons, the actual templates (Receipt.TemplateHTML and Receipt.TemplateText) are not returned by this method. Use getReceipt to pull the full Receipt object, including the templates.

If an error occurs, an exception will be thrown.

Syntax

Receipt [] GetReceiptsList( SecurityToken securityToken, string receiptType);

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant. (required)

string

receiptType

Type of receipts to retrieve (Print, Email, or Both). (required)

Return Value

Receipt []

Returns an array of Receipt objects.

Exceptions

Code

Message

SystemError

Error pulling receipt templates.

Examples

<?php 
 
try { 
  $templates = $client->GetReceiptsList(securityToken, "Email"); 
} 
 
catch(SoapFault $e) { 
 
  echo $e->getMessage(); 
 
} 
 
?>
string receiptType = "email";
 
            try
            {
                Receipt[] receipt = client.GetReceiptsList(securityToken, receiptType);
                MessageBox.Show(string.Concat(receipt.Length));
 
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }