EmailReceipt
Emails a new receipt for an existing customer. Requires a custom receipt to be selected by ID or name.
Description
This method is used 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
function emailReceipt(){
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$emailReceipt = array(
'securityToken' => $securityToken,
'transactionRefNum' => '123456789',
'receiptRefNum' => '12',
'receiptName' => 'Saeed',
'emailAddress' => '[email protected]',
);
$emailReceiptResponse = $client->EmailReceipt($emailReceipt);
$emailReceiptResponseResult = $emailReceiptResponse->EmailReceiptResponseResult;
}
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>********-90b4-4a38-ad78-********</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>
Updated over 2 years ago