AddApplicationTransaction
Description
This method is used to add an application transaction.
Syntax
ApplicationTransactionResponse ApplicationDataResponse AddApplicationTransaction(SecurityToken ueSecurityToken securityToken, ApplicationTransactionRequest applicationTransactionRequest)
Arguments
Type | Name | Description |
---|---|---|
SecurityToken | securityToken | Merchant security token: used to identify merchant and validate transaction. (required) |
Return Value
Type | Description |
---|---|
ApplicationTransactionRequest | Returns result of AddApplicationTransaction request. |
Example
public function AddApplicationTransaction()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$addRequest = array(
'securityToken' => $securityToken,
'applicationTransactionRequest' => array(
'CustomerInternalId' => '********-454757-4567457-********',
'TransactionId' => '3454354',
'TransactionTypeId' => 'sale',
'LinkedToInternalId' => '467457-454237-4567457-4222',
'SoftwareId' => 'PHP',
'TransactionDate' => date('Y-m-d H:i:s'),
'TransactionNotes' => 'Order Id: 123',
'LinkedToTypeId' => 'SalesOrder',
'LinkedToExternalUniqueId' => 'order123'
)
);
$response = $this->soapClient->AddApplicationTransaction($addRequest);
$result = $response->AddApplicationTransactionResult;
}
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header />
<soapenv:Body>
<ebiz:AddApplicationTransaction>
<ebiz:securityToken>
<ebiz:SecurityId>********-23f6-4466-a993-********</ebiz:SecurityId>
<ebiz:UserId>?</ebiz:UserId>
<ebiz:Password>?</ebiz:Password>
</ebiz:securityToken>
<ebiz:applicationTransactionRequest>
<ebiz:CustomerInternalId>********-ae18-4b19-a122-********</ebiz:CustomerInternalId>
<ebiz:TransactionId>3122534709</ebiz:TransactionId>
<ebiz:TransactionTypeId>Authorization</ebiz:TransactionTypeId>
<ebiz:SoftwareId>IOSMobileApp</ebiz:SoftwareId>
<ebiz:LinkedToTypeId>SalesOrder</ebiz:LinkedToTypeId>
<ebiz:LinkedToInternalId>********-92fd-4e5b-bf84-********</ebiz:LinkedToInternalId>
<ebiz:LinkedToExternalUniqueId>SO101145</ebiz:LinkedToExternalUniqueId>
<ebiz:TransactionDate>2021-06-28</ebiz:TransactionDate>
<ebiz:TransactionCustomFields>
<!--Zero or more repetitions:-->
<ebiz:EbizCustomField>
<ebiz:FieldId>?</ebiz:FieldId>
<ebiz:FieldCaption>?</ebiz:FieldCaption>
<ebiz:FieldName>?</ebiz:FieldName>
<ebiz:FieldValue>?</ebiz:FieldValue>
<ebiz:FieldType>?</ebiz:FieldType>
<ebiz:FieldDataType>?</ebiz:FieldDataType>
<ebiz:FieldDescription>?</ebiz:FieldDescription>
</ebiz:EbizCustomField>
</ebiz:TransactionCustomFields>
</ebiz:applicationTransactionRequest>
</ebiz:AddApplicationTransaction>
</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">
<AddApplicationTransactionResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<AddApplicationTransactionResult>
<ApplicationTransactionInternalId>********-8e18-4d79-a4e5-********</ApplicationTransactionInternalId>
<Status>Success</Status>
<StatusCode>1</StatusCode>
<Error />
<ErrorCode>0</ErrorCode>
</AddApplicationTransactionResult>
</AddApplicationTransactionResponse>
</s:Body>
</s:Envelope>
public void AddApplicationTransaction()
{
eBizService apiClient = new eBizService();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "*******-c870-41b8-aa5c-********",
UserId = "",
Password = ""
};
ApplicationTransactionRequest transactionRequest = new ApplicationTransactionRequest();
transactionRequest.CustomerInternalId = "********-25b2-473e-af6b-********";
transactionRequest.TransactionId = "2750394928";
transactionRequest.TransactionTypeId = "Sale";
transactionRequest.LinkedToTypeId = "Test123";
transactionRequest.LinkedToInternalId = "********-25b2-473e-af6b-********";
transactionRequest.LinkedToExternalUniqueId = "Test123";
transactionRequest.TransactionDate = "04/27/2022";
transactionRequest.TransactionNotes = "Sample notes";
var response = apiClient.AddApplicationTransaction(securityToken, transactionRequest);
Console.WriteLine(response.Status);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Error);
Console.WriteLine(response.ErrorCode);
Console.ReadLine();
}
Updated over 2 years ago