### ManageCustomer API Request (C#)
Source: https://ipreporting.com/developers/api-docs/index
Example of how to make a GET request to the ManageCustomer API using C# and the RestSharp library. It demonstrates setting up the client, request, and handling the response.
```csharp
var client = new RestClient("https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/ManageCustomer?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987");
client.Timeout = -1;
client.FollowRedirects = false;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### ManageCustomer API Request (Node.js)
Source: https://ipreporting.com/developers/api-docs/index
Example of how to make a GET request to the ManageCustomer API using Node.js and the 'request' module. It shows how to configure the request options and handle the response.
```javascript
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/ManageCustomer?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
```
--------------------------------
### ManageCustomer API Request (PHP)
Source: https://ipreporting.com/developers/api-docs/index
Example of how to make a GET request to the ManageCustomer API using PHP with the HTTP_Request2 library. It covers setting the URL, method, configuration, and handling the response status.
```php
setUrl('https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/ManageCustomer?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
```
--------------------------------
### C# Example for ManageContract API
Source: https://ipreporting.com/developers/api-docs/index
This C# code snippet demonstrates how to make a GET request to the ManageContract API using the RestClient library. It includes setting the API endpoint, request method, and handling the response.
```C#
var client = new RestClient("https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/ManageContract?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987&BillAmt=8.99&TaxAmt=0.55&TotalAmt=9.54&StartDate=01/02/2015&EndDate=01/02/2016&NextBillDt=07/02/2015&BillingPeriod=Month&BillingInterval=1&MaxFailures=2&FailureInterval=1&Status=ACTIVE&ExtData='456985'&BillingInterval=1&MaxFailures=2&FailureInterval=1");
client.Timeout = -1;
client.FollowRedirects = false;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### XML Payload Examples for IPPay API
Source: https://ipreporting.com/developers/api-docs/index
Examples of XML payloads used for IPPay API requests, demonstrating different user-defined fields.
```xml
UDTEST12
TESTTERMINAL
ENQ
```
```xml
UDTEST56
TESTTERMINAL
ENQ
```
--------------------------------
### XML 'Debug' Response Example
Source: https://ipreporting.com/developers/api-docs/index
Shows an example of a 'Debug' response message in XML format. This response may contain additional information useful for troubleshooting.
```xml
PENDING
Processing transaction...
2023-10-27T10:00:00Z
```
--------------------------------
### XML CREDIT Transaction Example
Source: https://ipreporting.com/developers/api-docs/index
Shows an example of a CREDIT transaction request in XML format. This is used to issue a refund to a customer for a previous transaction.
```xml
CREDIT
25.00
USD
PREVIOUS_SALE_TRANSACTION_ID
...
MMYY
```
--------------------------------
### XML 'ENQ' Transaction Example
Source: https://ipreporting.com/developers/api-docs/index
Provides an example of an 'ENQ' (Enquiry) transaction request in XML format. This is used to check the status of a previous transaction.
```xml
ENQ
TRANSACTION_ID_TO_ENQUIRE
```
--------------------------------
### PING Response Example (XML)
Source: https://ipreporting.com/developers/api-docs/index
This snippet shows an example of a successful PING response from the IPPay API. It includes TransactionID, ActionCode, and ResponseText.
```XML
L20120313151732863
000
APPROVED
```
--------------------------------
### ValidExpDate Method Request Example in PHP
Source: https://ipreporting.com/developers/api-docs/index
This PHP code snippet demonstrates how to use the HTTP_Request2 library to send a GET request to the ValidExpDate method. It includes setting the URL, method, configuration for redirects, and headers, along with error handling.
```php
setUrl('https://transactions.test.secureexchange.net/SmartPayments/validate.asmx/ValidExpDate?ExpDate=0509');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Cookie' => 'ASP.NET_SessionId=2jnp55ivcyisuvbsiwag0vwh; __RequestVerificationToken_L0FkbWlu0=4Ju7_C5kO34WnYkSc9ANs8AKMGf0_X_2lsJ7SXRjpDjIRuRiBsHElpFViy2R_3opkl9-j-Sw1KN09cpYFb6FJVhBU6Q1'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
```
--------------------------------
### XML Third Party Gateway SALE Transaction Example
Source: https://ipreporting.com/developers/api-docs/index
Shows an example of a SALE transaction when using a third-party gateway, formatted in XML. This may include additional parameters specific to the third-party integration.
```xml
SALE
200.00
USD
...
MMYY
...
THIRD_PARTY_GATEWAY_ID
TP_REF_123
```
--------------------------------
### IPpay Transaction Response Example
Source: https://ipreporting.com/developers/api-docs/index
Example of a successful IPpay transaction response, including TransactionID, TransactionType, ActionCode, Approval, and ResponseText.
```XML
M20170203170826130 AUTHONLY 000 TEST10 APPROVED
```
--------------------------------
### EHECK Response Example
Source: https://ipreporting.com/developers/api-docs/index
This snippet shows an example of a successful response from the EHECK processing gateway, indicating that the check was accepted.
```XML
E20120322032420403
000
000000
CHECK ACCEPTED
```
--------------------------------
### EHECK Response Example
Source: https://ipreporting.com/developers/api-docs/index
This snippet shows an example of a successful EHECK response, including transaction ID, action code, approval status, and a response text indicating acceptance.
```xml
E20120322032420403
000
000000
CHECK ACCEPTED
```
--------------------------------
### XML SALE Transaction Example
Source: https://ipreporting.com/developers/api-docs/index
Illustrates an example of a SALE transaction request in XML format. This is a common transaction type that authorizes and captures funds in a single step.
```xml
SALE
120.50
USD
...
MMYY
...
789 Pine Ln
Somewhere
TX
75001
USA
```
--------------------------------
### XML Credit Card Transaction with New Token Request Example
Source: https://ipreporting.com/developers/api-docs/index
Demonstrates an example of a credit card transaction that also requests a new token in XML. This combines a payment with token creation.
```xml
SALE
50.00
USD
...
MMYY
...
true
CREDIT_CARD
```
--------------------------------
### ENQ Transaction C# Example
Source: https://ipreporting.com/developers/api-docs/index
This C# code example shows how to send an 'ENQ' transaction request using RestSharp, including setting headers, the XML body, and making the POST request to the IPPay API.
```csharp
var client = new RestClient("https://testgtwy.ippay.com/ippay/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/xml");
request.AddHeader("Cookie", "incap_ses_1190_2592775=AugpWF60l1z1nAuZWbuDEHd1cmIAAAAAFPbYOa25/h8e7s83hbfdIQ==; incap_ses_1193_2592757=DeSWdsKIpjXf2R44xWOOEBt9c2IAAAAAsFgjiIZROpmfxniEFrhXyA==; incap_ses_1193_2592763=LfqqHYhm6HOftB44xWOOEIR8c2IAAAAAGAeDRLiOZLqLBUh62koqxg==; incap_ses_1193_2592775=iyhiad9FKn6XTGU4xWOOEO3ndGIAAAAAaT3SCQQxFv89Yf5hlZgWcg==; incap_ses_1194_2592775=CZk1dnmqtBmbO2N6wfCREOvjc2IAAAAAVmE+rrvblq4X/MfnxYUiuw==; visid_incap_2592757=FK6mmFukSt635DkOv9pR6Bt9c2IAAAAAQUIPAAAAAACI4lgrw+Z/DMsI1/j94Vsf; visid_incap_2592763=bkPSmOsRS86i4ejhjcoKP4R8c2IAAAAAQUIPAAAAAABvLIl7sjcJbhCuV/qcYsP2; visid_incap_2592775=pJnhZvncRRurSRtxfkB3RDcncmIAAAAAQUIPAAAAAAA1Gk4EgUACQZsYuMpOX5Du");
var body = "\n ENQ\n TESTTERMINAL\n UDTEST0203201701\n";
request.AddParameter("application/xml", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### AddRecurringCreditCard in C#
Source: https://ipreporting.com/developers/api-docs/index
Example of how to use the AddRecurringCreditCard method via a GET request using RestSharp in C#. This method adds customer and credit card details for recurring billing.
```C#
var client = new RestClient("https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/AddRecurringCreditCard?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&BillAmt=8.99&TaxAmt=0.55&TotalAmt=9.54&StartDate=1/2/2015&EndDate=1/2/2016&BillingPeriod=Month&BillingInterval=1 &MaxFailures=2&FailureInterval=1&CcAccountNum=4012002000060010&CcExpDate=1209&CcNameOnCard= John Smith&CcStreet=123 Main&CcZip=4490&ExtData='785496'&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987");
client.Timeout = -1;
client.FollowRedirects = false;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### AddRecurringCreditCard in PHP
Source: https://ipreporting.com/developers/api-docs/index
Example of how to use the AddRecurringCreditCard method via a GET request using the HTTP_Request2 library in PHP. This method adds customer and credit card details for recurring billing.
```php
setUrl('https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/AddRecurringCreditCard?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&BillAmt=8.99&TaxAmt=0.55&TotalAmt=9.54&StartDate=1/2/2015&EndDate=1/2/2016&BillingPeriod=Month&BillingInterval=1 &MaxFailures=2&FailureInterval=1&CcAccountNum=4012002000060010&CcExpDate=1209&CcNameOnCard= John Smith&CcStreet=123 Main&CcZip=4490&ExtData=\'785496\'&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
```
--------------------------------
### TOKENIZE Transaction Example
Source: https://ipreporting.com/developers/api-docs/index
Demonstrates a sample 'TOKENIZE' transaction request for $13.99, including a $1 service charge, accessing a savings account. It also shows the expected successful response.
```XML
TOKENIZE
TESTTERMINAL
SC0327153017T10018
Mickey Mouse
1399
100
071025661
071025661
135
```
```XML
SC0327153017T10018
000
000000
TOKENIZE ACCEPTED
```
--------------------------------
### AddRecurringCreditCard in Node.js
Source: https://ipreporting.com/developers/api-docs/index
Example of how to use the AddRecurringCreditCard method via a GET request using the 'request' library in Node.js. This method adds customer and credit card details for recurring billing.
```javascript
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/AddRecurringCreditCard?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&BillAmt=8.99&TaxAmt=0.55&TotalAmt=9.54&StartDate=1/2/2015&EndDate=1/2/2016&BillingPeriod=Month&BillingInterval=1 &MaxFailures=2&FailureInterval=1&CcAccountNum=4012002000060010&CcExpDate=1209&CcNameOnCard= John Smith&CcStreet=123 Main&CcZip=4490&ExtData=\'785496\'&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
```
--------------------------------
### GetCardTrx Transaction Details (C#)
Source: https://ipreporting.com/developers/api-docs/index
Retrieves transaction details using the RestClient in C#. This example demonstrates making a GET request to the specified URL and includes setting headers and handling the response.
```csharp
var client = new RestClient("https://transactions.test.secureexchange.net/admin/ws/trxdetail.asmx?UserName=TestUserName&Password=Test1234&RPNum=111&BeginDt=6/5/2015&EndDt=6/20/2015&TransType=Sale&Result=0&ExcludeVoid=0&TransformType=XML&ExtData=12536");
client.Timeout = -1;
client.FollowRedirects = false;
var request = new RestRequest(Method.GET);
request.AddHeader("Cookie", "ASP.NET_SessionId=2jnp55ivcyisuvbsiwag0vwh; __RequestVerificationToken_L0FkbWlu0=4Ju7_C5kO34WnYkSc9ANs8AKMGf0_X_2lsJ7SXRjpDjIRuRiBsHElpFViy2R_3opkl9-j-Sw1KN09cpYFb6FJVhBU6Q1");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### Perform SALE + TOKENIZE with PHP
Source: https://ipreporting.com/developers/api-docs/index
PHP code example using the HTTP_Request2 library to execute a SALE + TOKENIZE request. It demonstrates setting the URL, method, headers, and request body.
```PHP
setUrl('https://testgtwy.ippay.com/ippay/');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Type' => 'application/xml',
'Cookie' => 'incap_ses_1190_2592775=AugpWF60l1z1nAuZWbuDEHd1cmIAAAAAFPbYOa25/h8e7s83hbfdIQ==; incap_ses_1193_2592757=DeSWdsKIpjXf2R44xWOOEBt9c2IAAAAAsFgjiIZROpmfxniEFrhXyA==; incap_ses_1193_2592763=LfqqHYhm6HOftB44xWOOEIR8c2IAAAAAGAeDRLiOZLqLBUh62koqxg==; incap_ses_1193_2592775=Zrhje9Ot3RoUpSk4xWOOEN+nc2IAAAAA6WNG/m4ouK3PuOtbKslY9g==; visid_incap_2592757=FK6mmFukSt635DkOv9pR6Bt9c2IAAAAAQUIPAAAAAACI4lgrw+Z/DMsI1/j94Vsf; visid_incap_2592763=bkPSmOsRS86i4ejhjcoKP4R8c2IAAAAAQUIPAAAAAABvLIl7sjcJbhCuV/qcYsP2; visid_incap_2592775=pJnhZvncRRurSRtxfkB3RDcncmIAAAAAQUIPAAAAAAA1Gk4EgUACQZsYuMpOX5Du'
));
$request->setBody('\n SALE\n TESTTERMINAL\n 4000300020001000\n 12\n 14\n 99999\n');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' '
. $response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
```
--------------------------------
### ValidExpDate Method Request Example in C#
Source: https://ipreporting.com/developers/api-docs/index
This C# code snippet demonstrates how to make a GET request to the ValidExpDate method using the RestSharp library. It includes setting the URL, timeout, headers, and processing the response.
```csharp
var client = new RestClient("https://transactions.test.secureexchange.net/SmartPayments/validate.asmx/ValidExpDate?ExpDate=0509");
client.Timeout = -1;
client.FollowRedirects = false;
var request = new RestRequest(Method.GET);
request.AddHeader("Cookie", "ASP.NET_SessionId=2jnp55ivcyisuvbsiwag0vwh; __RequestVerificationToken_L0FkbWlu0=4Ju7_C5kO34WnYkSc9ANs8AKMGf0_X_2lsJ7SXRjpDjIRuRiBsHElpFViy2R_3opkl9-j-Sw1KN09cpYFb6FJVhBU6Q1");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### ProcessCreditCard Transaction - Sale Example
Source: https://ipreporting.com/developers/api-docs/index
This snippet demonstrates how to perform a 'Sale' transaction using the ProcessCreditCard service. It includes essential parameters like UserName, Password, TransType, CardNum, ExpDate, NameOnCard, Amount, and InvNum.
```XML
TestUserName
Test1234
SALE
123456789
0615
Nick Knight
1000.00
6533
111
Park Place Lansdale
111
<CustomerID>2586</CustomerID><Force>T</Force><Presentation><CardPresent>False</CardPresent></Presentation>
```
--------------------------------
### Validate Credit Card using Node.js
Source: https://ipreporting.com/developers/api-docs/index
Shows how to validate a credit card with the ValidCard API method using Node.js. This example uses the 'request' library to send a GET request with specific headers and logs the response body.
```javascript
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://transactions.test.secureexchange.net/SmartPayments/validate.asmx/ValidCard?ExpDate=0509&CardNumber=4012002000060010',
'headers': {
'Cookie': 'ASP.NET_SessionId=2jnp55ivcyisuvbsiwag0vwh; __RequestVerificationToken_L0FkbWlu0=4Ju7_C5kO34WnYkSc9ANs8AKMGf0_X_2lsJ7SXRjpDjIRuRiBsHElpFViy2R_3opkl9-j-Sw1KN09cpYFb6FJVhBU6Q1'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
```
--------------------------------
### Debug Response Example (XML)
Source: https://ipreporting.com/developers/api-docs/index
This XML snippet demonstrates the structure of a response when a Zappte syntax error is detected. It includes details about the transaction, action code, response text, and specific error messages indicating the location and nature of the parsing fault.
```XML
900
INVALID MESSAGE TYPE
INPUT XML STREAM FAILS PARSING. Faulty Zappte message.
Error on line 11, column 15
Message: Unknown element ‘Amount’
```
--------------------------------
### IPR Transaction Response Example (With Data)
Source: https://ipreporting.com/developers/api-docs/index
This XML response shows the structure when transaction data is available. It includes a 'Transactions' element with attributes for type, run, start, and end times, and nested 'Transaction' elements with details like ipTransID.
```xml
2022-03-07 06:40:27.0
000000000000000000144970343
```
--------------------------------
### Perform SALE + TOKENIZE with Node.js
Source: https://ipreporting.com/developers/api-docs/index
Node.js code example using the 'request' module to send a SALE + TOKENIZE request to the IPPay API. It sets up the request method, URL, headers, and XML body.
```Node.js
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://testgtwy.ippay.com/ippay/',
'headers': {
'Content-Type': 'application/xml',
'Cookie': 'incap_ses_1190_2592775=AugpWF60l1z1nAuZWbuDEHd1cmIAAAAAFPbYOa25/h8e7s83hbfdIQ==; incap_ses_1193_2592757=DeSWdsKIpjXf2R44xWOOEBt9c2IAAAAAsFgjiIZROpmfxniEFrhXyA==; incap_ses_1193_2592763=LfqqHYhm6HOftB44xWOOEIR8c2IAAAAAGAeDRLiOZLqLBUh62koqxg==; incap_ses_1193_2592775=Zrhje9Ot3RoUpSk4xWOOEN+nc2IAAAAA6WNG/m4ouK3PuOtbKslY9g==; visid_incap_2592757=FK6mmFukSt635DkOv9pR6Bt9c2IAAAAAQUIPAAAAAACI4lgrw+Z/DMsI1/j94Vsf; visid_incap_2592763=bkPSmOsRS86i4ejhjcoKP4R8c2IAAAAAQUIPAAAAAABvLIl7sjcJbhCuV/qcYsP2; visid_incap_2592775=pJnhZvncRRurSRtxfkB3RDcncmIAAAAAQUIPAAAAAAA1Gk4EgUACQZsYuMpOX5Du'
},
body: '\n SALE\n TESTTERMINAL\n 4000300020001000\n 12\n 14\n 99999\n'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
```
--------------------------------
### Update Temporary Credit Card
Source: https://ipreporting.com/developers/api-docs/index
Updates an existing temporary credit card associated with a given GUID. Only provided attributes (card type, number, holder, expiration, start dates, CVV) will be updated. CVV is stored in memory temporarily.
```XML
```
--------------------------------
### Validate Credit Card using PHP
Source: https://ipreporting.com/developers/api-docs/index
Provides a PHP example for validating a credit card using the ValidCard API method. It leverages the HTTP_Request2 library to make a GET request, set headers, and handle potential errors or successful responses.
```php
setUrl('https://transactions.test.secureexchange.net/SmartPayments/validate.asmx/ValidCard?ExpDate=0509&CardNumber=4012002000060010');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Cookie' => 'ASP.NET_SessionId=2jnp55ivcyisuvbsiwag0vwh; __RequestVerificationToken_L0FkbWlu0=4Ju7_C5kO34WnYkSc9ANs8AKMGf0_X_2lsJ7SXRjpDjIRuRiBsHElpFViy2R_3opkl9-j-Sw1KN09cpYFb6FJVhBU6Q1'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .\n $response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>
```
--------------------------------
### ENQ Transaction JavaScript Example
Source: https://ipreporting.com/developers/api-docs/index
This JavaScript code example demonstrates how to make an 'ENQ' transaction request using the 'request' library, specifying the POST method, XML content type, and the transaction details in the request body.
```javascript
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://testgtwy.ippay.com/ippay/',
'headers': {
'Content-Type': 'application/xml',
'Cookie': 'incap_ses_1190_2592775=AugpWF60l1z1nAuZWbuDEHd1cmIAAAAAFPbYOa25/h8e7s83hbfdIQ==; incap_ses_1193_2592757=DeSWdsKIpjXf2R44xWOOEBt9c2IAAAAAsFgjiIZROpmfxniEFrhXyA==; incap_ses_1193_2592763=LfqqHYhm6HOftB44xWOOEIR8c2IAAAAAGAeDRLiOZLqLBUh62koqxg==; incap_ses_1193_2592775=iyhiad9FKn6XTGU4xWOOEO3ndGIAAAAAaT3SCQQxFv89Yf5hlZgWcg==; incap_ses_1194_2592775=CZk1dnmqtBmbO2N6wfCREOvjc2IAAAAAVmE+rrvblq4X/MfnxYUiuw==; visid_incap_2592757=FK6mmFukSt635DkOv9pR6Bt9c2IAAAAAQUIPAAAAAACI4lgrw+Z/DMsI1/j94Vsf; visid_incap_2592763=bkPSmOsRS86i4ejhjcoKP4R8c2IAAAAAQUIPAAAAAABvLIl7sjcJbhCuV/qcYsP2; visid_incap_2592775=pJnhZvncRRurSRtxfkB3RDcncmIAAAAAQUIPAAAAAAA1Gk4EgUACQZsYuMpOX5Du'
},
body: '\n ENQ\n TESTTERMINAL\n UDTEST0203201701\n'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
```
--------------------------------
### PHP Example for ManageContract API
Source: https://ipreporting.com/developers/api-docs/index
This PHP code snippet illustrates how to call the ManageContract API using the HTTP_Request2 library. It sets the URL, HTTP method, and redirect configuration, then sends the request and outputs the response body or any error messages.
```php
setUrl('https://transactions.test.secureexchange.net/admin/ws/recurring.asmx/ManageContract?Username=GoWirelessMoTo&Password=Test1234&TransType=333&CustomerKey=ADD&CustomerID=222500&CustomerName=John Smith&FirstName=Smith&LastName=John &Title=Customer&Street1=485 Main Street&City=Atlanta&StateID=GA&Zip=40586&CountryID=USA&DayPhone=9998889999&NightPhone=9998889999&Fax=9998889123&Email=john.smith@gmail.com&Mobile=8885756987&BillAmt=8.99&TaxAmt=0.55&TotalAmt=9.54&StartDate=01/02/2015&EndDate=01/02/2016&NextBillDt=07/02/2015&BillingPeriod=Month&BillingInterval=1&MaxFailures=2&FailureInterval=1&Status=ACTIVE&ExtData=\'456985\'&BillingInterval=1&MaxFailures=2&FailureInterval=1');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
```
--------------------------------
### Perform SALE + TOKENIZE Request in C#
Source: https://ipreporting.com/developers/api-docs/index
Example of how to send a SALE + TOKENIZE request using C# with RestSharp. It demonstrates setting up the RestClient, request headers, and the XML body, then executing the request and printing the response content.
```C#
var client = new RestClient("https://testgtwy.ippay.com/ippay/");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/xml");
request.AddHeader("Cookie", "incap_ses_1190_2592775=AugpWF60l1z1nAuZWbuDEHd1cmIAAAAAFPbYOa25/h8e7s83hbfdIQ==; incap_ses_1193_2592757=DeSWdsKIpjXf2R44xWOOEBt9c2IAAAAAsFgjiIZROpmfxniEFrhXyA==; incap_ses_1193_2592763=LfqqHYhm6HOftB44xWOOEIR8c2IAAAAAGAeDRLiOZLqLBUh62koqxg==; incap_ses_1193_2592775=Zrhje9Ot3RoUpSk4xWOOEN+nc2IAAAAA6WNG/m4ouK3PuOtbKslY9g==; visid_incap_2592757=FK6mmFukSt635DkOv9pR6Bt9c2IAAAAAQUIPAAAAAACI4lgrw+Z/DMsI1/j94Vsf; visid_incap_2592763=bkPSmOsRS86i4ejhjcoKP4R8c2IAAAAAQUIPAAAAAABvLIl7sjcJbhCuV/qcYsP2; visid_incap_2592775=pJnhZvncRRurSRtxfkB3RDcncmIAAAAAQUIPAAAAAAA1Gk4EgUACQZsYuMpOX5Du");
var body = @"\n SALE\n TESTTERMINAL\n 4000300020001000\n 12\n 14\n 99999\n";
request.AddParameter("application/xml", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```
--------------------------------
### Sample XML Transactions and Responses
Source: https://ipreporting.com/developers/api-docs/index
Provides sample XML data for testing transactions and their expected responses, as documented for the Zappte TestSim.
```xml
**SAMPLE XML TRANSACTIONS AND EXPECTED RESPONSES**
```