EmailReceipt

Emails a new receipt for an existing customer. Requires a custom receipt to be selected by ID or name.

Description

This method allows you to email a new receipt for an existing transaction. This requires a receipt reference number or receipt name, a transaction reference number, and a valid email address. Receipt reference numbers are returned by GetReceiptsList and can be found in the merchant console on the receipts edit page.

Syntax

EmailReceiptResponse EmailReceipt( SecurityToken securityToken, string transactionRefNum, string receiptRefNum, string receiptName, string emailAddress);

Return Object

Type

Description

EmailReceiptResponse

Contains response data. (required)

Examples

<?php 
 
try {
 
  transactionRefNum=123456789; 
  receiptRefNum=12;
  $sent = $this->client->EmailReceipt($this->securityToken, transactionRefNum, receiptRefNum, "", '[email protected]');
 
} 
 
catch(SoapFault $e) { 
 
  echo $e->getMessage(); 
 
} 
 
?>
string refnum;
            transactionRefNum = "46973419";
            string receiptName = "Receipt 1";
 
            Boolean result;
 
            try
            {
                EmailReceiptResponse emailReceiptResponse = client.EmailReceipt(securityToken, transactionRefNum, "", receiptName, "[email protected]");
                if (emailReceiptResponse.StatusCode == 1)
                {
                    MessageBox.Show(string.Concat("Email is sent"));
                }
                else MessageBox.Show("Error");
            }
 
 
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:EmailReceipt>
         <!--Optional:-->
         <ebiz:securityToken>
            <!--Optional:-->
            <ebiz:SecurityId>1dc496d1-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <!--Optional:-->
            <ebiz:UserId/>
            <!--Optional:-->
            <ebiz:Password/>
         </ebiz:securityToken>
         <!--Optional:-->
         <ebiz:transactionRefNum>128351609</ebiz:transactionRefNum>
         <!--Optional:-->
         <ebiz:receiptRefNum></ebiz:receiptRefNum>
         <!--Optional:-->
         <ebiz:receiptName>Full receipt test</ebiz:receiptName>
         <!--Optional:-->
         <ebiz:emailAddress>[email protected]</ebiz:emailAddress>
      </ebiz:EmailReceipt>
   </soapenv:Body>
</soapenv:Envelope>


Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <EmailReceiptResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <EmailReceiptResult>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </EmailReceiptResult>
      </EmailReceiptResponse>
   </s:Body>
</s:Envelope>