developer:soap-1.4:methods:deletereceipt

Soap API v1.4

deleteReceipt

Delete receipt template

Description

This method allows you to delete an existing custom receipt template.

If the receipt is successfully deleted “true” will be returned. If an error occurs, an exception will be thrown.

See also addReceipt

Syntax

integer deleteReceipt ( ueSecurityToken, ReceiptRefNum)

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and retrieve the custom fields.
integer ReceiptRefNum Gateway assigned receipt ID

Return Value

boolean Returns true if receipt is deleted

Exceptions

The following exceptions (errors) are applicable to this method.

Code Message Advice
20030 Requested receipt not found ReceiptRefNum must match an existing receipt.

Examples

PHP

For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

<?php 
 
try { 
  $ReceiptRefNum = 2;
  $res = $client->deleteReceipt($token, $ReceiptRefNum); 
} 
 
catch(SoapFault $e) { 
 
  echo $e->getMessage(); 
 
} 
 
?> 

VB

For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the Visual Basic .Net Soap How-to.

 

.NET C#

For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the C Sharp .Net Soap How-to.

            string receiptRefNum = "5";
            Boolean response;
 
            try
            {
                response = client.deleteReceipt(token, receiptRefNum);
                MessageBox.Show(string.Concat(response));
 
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

XML

Request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns1="urn:usaepay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:deleteReceipt>
<Token xsi:type="ns1:ueSecurityToken">
<ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
<PinHash xsi:type="ns1:ueHash">
<HashValue xsi:type="xsd:string">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>
<Seed xsi:type="xsd:string">12678150211876663375</Seed>
<Type xsi:type="xsd:string">sha1</Type>
</PinHash>
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
</Token>
  <ReceiptRefNum xsi:type="xsd:integer">73</ReceiptRefNum>
</ns1:deleteReceipt>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:ns1="urn:usaepay" 
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:deleteReceiptResponse>
  <deleteReceiptResponseReturn xsi:type="xsd:boolean">true</deleteReceiptResponseReturn>
</ns1:deleteReceiptResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Change History

Version Change
1.3 Method added in this release
developer/soap-1.4/methods/deletereceipt.txt · Last modified: 2010/08/30 12:44 by tem

Page Tools