GetReceiptsList

Retrieve a list of custom receipt templates.

Description

This method is used to 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.TemplateHTMLand 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 appear.

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.

<?php 
 
try { 
  $templates = $client->GetReceiptsList(securityToken, "Email"); 
} 
 
catch(SoapFault $e) { 
 
  echo $e->getMessage(); 
 
} 
 
?>

Examples

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header />
   <soapenv:Body>
      <ebiz:GetReceiptsList>
         <ebiz:securityToken>
            <ebiz:SecurityId>*******-794B-4CEE-B4DF-********</ebiz:SecurityId>
            <ebiz:UserId>?</ebiz:UserId>
            <ebiz:Password>?</ebiz:Password>
         </ebiz:securityToken>
         <ebiz:receiptType>?</ebiz:receiptType>
      </ebiz:GetReceiptsList>
   </soapenv:Body>
</soapenv:Envelope>

Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <GetReceiptsListResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetReceiptsListResult>
            <Receipt>
               <ReceiptRefNum>12</ReceiptRefNum>
               <Name>New Order (Customer Email)</Name>
               <Subject>Customer Receipt - Transaction [transaction.response] - Authcode #[transaction.authcode]</Subject>
               <FromEmail>support@centurybizsolutions.com</FromEmail>
               <Target>email</Target>
               <ContentType>html</ContentType>
            </Receipt>
            <Receipt>
               <ReceiptRefNum>4</ReceiptRefNum>
               <Name>Transaction API and Payment Form (Customer)</Name>
               <Subject>Customer Receipt - Transaction [transaction.response] - Authcode #[transaction.authcode]</Subject>
               <FromEmail>support@centurybizsolutions.com</FromEmail>
               <Target>email</Target>
               <ContentType>html</ContentType>
            </Receipt>
            <Receipt>
               <ReceiptRefNum>10</ReceiptRefNum>
               <Name>Transaction API and Payment Form (Merchant)</Name>
               <Subject>Merchant Receipt - Transaction [transaction.response] - Authcode #[transaction.authcode]</Subject>
               <FromEmail>support@centurybizsolutions.com</FromEmail>
               <Target>email</Target>
               <ContentType>html</ContentType>
            </Receipt>
         </GetReceiptsListResult>
      </GetReceiptsListResponse>
   </s:Body>
</s:Envelope>