Bitaqaty Business system offers online shopping malls an option to add Bitaqaty Business products to their malls. Based on the agreement made with Bitaqaty Business merchant relationship department, a specific list of Bitaqaty Business local products will be allowed to be purchased on POS site by their customers
Upon signing the contract with Bitaqaty Business, POS site is handed the following keys for the staging environment:
Upon signing the contract with Bitaqaty Business, POS site is handed the following keys for the staging environment:
Name | Description |
---|---|
credential |
|
Serial |
|
Voucher |
|
Name | Description |
---|---|
SG | VAT Calculated on total product amount |
SM | VAT Calculated on different between EndUser Price and FaceValue |
OS | VAT in this case will be 0 |
Environment | URL | Port |
---|---|---|
Staging | https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl | 443 |
Production | https://www.netader.com/webservice/OneCardPOSSystem.wsdl |
443 |
Environment | URL |
---|---|
Staging | https://www.ocstaging.net/sec/posLogin.html |
Production | https://www.netader.com/sec/posLogin.html |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
signature | MD5 Hash | MD5 (posUsername + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
errorCode | String | in case of error Response Code, refer to Response Codes | 0..1 | - | |
productList | list of product | List of products objects, refer to below table | 0..* | List of Codes |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
productCode | long | Bitaqaty Business product code | 1 | 8 | |
nameAr | String | Product name in Arabic | 1 | 255 | |
nameEn | String | Product name in English | 1 | 255 | |
productPrice | double | Product original price | 1 | 8 | |
productCurrency | string | Product currency | 1 | 255 | |
posPrice | double | POS site price | 1 | 8 | |
posCurrency | string | POS currency | 1 | 255 | |
available | boolean |
|
1 | 1 | |
merchantid | Long | Bitaqaty Business product code | 1 | 8 | |
merchantNameAr | String | Merchant name in Arabic | 1 | 255 | |
merchantNameEn | String | Merchant name in English | 1 | 255 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductListRequest>
<web:posUsername>Test6@hotmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductListRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductListRequest>
<web:posUsername>Test@hotmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductListRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'signature'=>$password
);
$myXMLData = $client->__soapCall('refillAccount', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
String countryCode="Canada";
String xml = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductListRequest>
<web:posUsername>Test@gmail.com</web:posUsername>
<web:signature>5s1a65sa1casc1as5c11sc</web:signature>
</web:POSGetProductListRequest>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
signature | MD5 Hash |
MD5 (posUsername + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
errorCode | String | in case of error Response Code, refer to Response Codes | 0..1 | - | |
productID | list of product | List of products ID's , refer to below table | 0..* | List of Products |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
productCode | long | Bitaqaty Business product code | 1 | 8 | |
available | boolean |
|
1 | 1 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductIDRequest>
<web:posUsername>Test6@hotmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductIDRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductIDRequest>
<web:posUsername>Test@hotmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductIDRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'signature'=>$signature
);
$myXMLData = $client->__soapCall('POSGetProductIDRequest', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
String countryCode="Canada";
String xml = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductIDRequest>
<web:posUsername>Test@gmail.com</web:posUsername>
<web:signature>5s1a65sa1casc1as5c11sc</web:signature>
</web:POSGetProductIDRequest>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
productCode | Long | Bitaqaty Business product code | 1 | Yes | 8 |
signature | MD5 Hash |
MD5 (posUsername +productCode + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
errorCode | String | in case of error Response Code, refer to Response Codes | 0..1 | - | |
productCode | long | Bitaqaty Business product code | 0..1 | 8 | |
nameAr | string | Product name in Arabic | 0..1 | 255 | |
nameEr | string | Product name in English | 0..1 | 255 | |
productPrice | double | Product original price | 0..1 | 8 | |
productCurrency | String | Product currency | 0..1 | 255 | |
posPrice | double | POS site price | 0..1 | 8 | |
posCurrency | string | POS currency | 0..1 | 255 | |
Available | boolean |
|
0..1 | 1 | |
merchantNameAr | string | Merchant name in Arabic | 0..1 | 255 | |
merchantNameEn | string | Merchant name in English | 0..1 | 255 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductInfoRequest>
<web:posUsername>Test6@hotmail.com</web:posUsername>
<web:productCode>565446445546</web:productCode>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductInfoRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductInfoRequest>
<web:posUsername>Test@hotmail.com</web:posUsername>
<web:productCode>565446445546</web:productCode>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductInfoRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$productCode ='4564565465';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'signature'=>$signature,
'productCode'=>$productCode
);
$myXMLData = $client->__soapCall('POSGetProductInfo', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
String countryCode="Canada";
String xml = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductInfoRequest>
<web:posUsername>Test@gmail.com</web:posUsername>
<web:productCode>565446445546</web:productCode>
<web:signature>5s1a65sa1casc1as5c11sc</web:signature>
</web:POSGetProductInfoRequest>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
signature | MD5 Hash |
MD5 (posUsername + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
errorCode | String | in case of error Response Code, refer to Response Codes | 0..1 | - | |
balance | double | POS balance | 0..1 | 8 | |
Currency | String | POS currency | 0..1 | 255 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSCheckBalanceRequest>
<web:posUsername>Test6@hotmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSCheckBalanceRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSCheckBalanceRequest>
<web:posUsername>Test@hotmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSCheckBalanceRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'signature'=>$signature
);
$myXMLData = $client->__soapCall('POSCheckBalance', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
String countryCode="Canada";
String xml = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSCheckBalance>
<web:posUsername>Test@gmail.com</web:posUsername>
<web:signature>5s1a65sa1casc1as5c11sc</web:signature>
</web:POSCheckBalance>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
trxRefNumber | String | Transaction number generated and given by POS merchant | 1 | Yes | 255 |
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
signature | MD5 Hash | MD5 (posUsername + trxRefNumber + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
errorCode | String | in case of error Response Code, refer to Response Codes | 0..1 | - | |
amount | double | Paid amount in POS Currency | 0..1 | 8 | |
currency | String | POS currency | 0..1 | 255 | |
secret | String | Item secret | 0..1 | 255 | |
serial | String | Item serial | 0..1 | 255 | |
username | String | Item username | 0..1 | 255 | |
productType | int | Purchased product type, refer to enum illustration in below table | 0..1 | 32 | |
trxDate | Date | Date of transaction | 0..1 | 255 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSQueryByTransactionRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:trxRefNumber>HG5561651</web:trxRefNumber>
<web:signature>414sa5c156csc1sa5651sc56sa</web:signature>
</web:POSQueryByTransactionRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSQueryByTransactionRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:trxRefNumber>HG5561651</web:trxRefNumber>
<web:signature>414sa5c156csc1sa5651sc56sa</web:signature>
</web:POSQueryByTransactionRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$trxRefNumber ='FG156165615';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'trxRefNumber'=>$trxRefNumber,
'signature'=>$signature
);
$myXMLData = $client->__soapCall('POSQueryByTransaction', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSQueryByTransactionRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:trxRefNumber>HG5561651</web:trxRefNumber>
<web:signature>414sa5c156csc1sa5651sc56sa</web:signature>
</web:POSQueryByTransactionRequest>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
productCode | long | he selected product code in Bitaqaty Business system | 1 | Yes | 8 |
signature | MD5 Hash |
MD5 (posUsername + product Code + secretKey) |
1 | Yes | 255 |
terminalId | string | POS terminal ID | 1 | No | 255 |
trxRefNumber | string | by your side (could be terminal ID + timestamp) | 1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
errorCode | String | in case of error Response Code, refer to Response Codes | 0..1 | - | |
balance | double | POS site balance after performing purchase operation | 0..1 | 8 | |
currency | String | POS currency | 0..1 | 255 | |
secret | String | Item secret | 0..1 | 255 | |
serial | string | Item serial | 0..1 | 255 | |
username | string | Item username | 0..1 | 255 | |
productType | int | Purchased product type, refer to enum illustration in below table | 0..1 | 32 | |
amount | double | Paid amount in POS site currency | 0..1 | 8 | |
trxRefNumber | String | trxRefNumber sent in the request | 0..1 | 255 | |
ocTrxRefNumber | String | Bitaqaty Business Transaction Number | 0..1 | 255 | |
requestDate | Date | Date of Request Sending | 0..1 | 255 |
Note: In case of purchased product doesn’t include a username or serial the response of these fields will be “null”.
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSPurchaseProductRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:productCode>2626</web:productCode>
<web:signature>65scssacc651c1cregrwsa6c5sa1c6sa5</web:signature>
<!--Optional:-->
<web:terminalId>300</web:terminalId>
<!--Optional:-->
<web:trxRefNumber>TRF5161515</web:trxRefNumber>
</web:POSPurchaseProductRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) { alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSPurchaseProductRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:productCode>2626</web:productCode>
<web:signature>65scssacc651c1cregrwsa6c5sa1c6sa5</web:signature>
<!--Optional:-->
<web:terminalId>300</web:terminalId>
<!--Optional:-->
<web:trxRefNumber>TRF5161515</web:trxRefNumber>
</web:POSPurchaseProductRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$productCode ='451615';
$terminalId ='200';
$trxRefNumber ='651565';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'productCode'=>$productCode,
'signature'=>$signature,
'terminalId'=>$terminalId,
'trxRefNumber'=>$trxRefNumber
);
$myXMLData = $client->__soapCall('POSPurchaseProduct', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSPurchaseProductRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:productCode>2626</web:productCode>
<web:signature>65scssacc651c1cregrwsa6c5sa1c6sa5</web:signature>
<!--Optional:-->
<web:terminalId>300</web:terminalId>
<!--Optional:-->
<web:trxRefNumber>TRF5161515</web:trxRefNumber>
</web:POSPurchaseProductRequest>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
productCode | long | Bitaqaty Business product code | 1 | Yes | 8 |
signature | MD5 Hash |
MD5 (posUsername + productCode + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | 1 | |
productCode | Long | Bitaqaty Business product code | 0..1 | 8 | |
nameAr | String | Product name in Arabic | 0..1 | 255 | |
nameEn | String | Product name in English | 0..1 | 255 | |
vatValue | double | Value of VAT on product | 0..1 | 8 | |
vatType | string | Type of VAT on product | 0..1 | 255 | |
faceValue | double | Exact value of voucher | 0..1 | 8 | |
productPrice | double | Product original price | 0..1 | 8 | |
posCurrency | String | POS currency | 0..1 | 255 | |
Available | boolean |
|
0..1 | 1 | |
merchantID | String | ID of Merchant | 0..1 | 255 | |
merchantNameAr | String | Merchant name in Arabic | 0..1 | 255 | |
merchantNameEn | String | Merchant name in English | 0..1 | 255 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl', true);
// build SOAP request
var sr =
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductWithVATInfoPosPriceRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:productCode>1221</web:productCode>
<web:signature>ds15651s15s6511sadfsdsa5f6as1f</web:signature>
</web:POSGetProductWithVATInfoPosPriceRequest>
</soapenv:Body>
</soapenv:Envelope>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductWithVATInfoPosPriceRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:productCode>1221</web:productCode>
<web:signature>ds15651s15s6511sadfsdsa5f6as1f</web:signature>
</web:POSGetProductWithVATInfoPosPriceRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$posUsername =Test@gmail.com;
$signature ='5s1a65sa1casc1as5c11sc';
$productCode ='451615';
$client = new SoapClient('https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl');
$params = array(
'posUsername'=>$username,
'productCode'=>$productCode,
'signature'=>$signature
);
$myXMLData = $client->__soapCall('POSGetProductWithVATInfoPosPrice', array($params));
echo "<pre>";
echo var_dump($myXMLData);
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "https://www.ocstaging.net/webservice/OneCardPOSSystem.wsdl";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
String countryCode="Canada";
String xml = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductWithVATInfoPosPriceRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:productCode>1221</web:productCode>
<web:signature>ds15651s15s6511sadfsdsa5f6as1f</web:signature>
</web:POSGetProductWithVATInfoPosPriceRequest>
</soapenv:Body>
</soapenv:Envelope>
";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
posUsername | String | The POS username defined in Bitaqaty Business System | 1 | Yes | 255 |
signature | MD5 Hash |
MD5 (posUsername + secretKey) |
1 | Yes | 255 |
Parameter Name | Data Type | Description | Cardinality | Mandatory | Length |
---|---|---|---|---|---|
status | boolean |
|
1 | ||
productCode | Long | Bitaqaty Business product code | 0..1 | 8 | |
nameAr | String | Product name in Arabic | 0..1 | 255 | |
nameEn | String | Product name in English | 0..1 | 255 | |
vatValue | double | Value of VAT on product | 0..1 | 8 | |
vatType | string | Type of VAT on product | 0..1 | 255 | |
faceValue | double | Exact value of voucher | 0..1 | 8 | |
productPrice | double | Product original price | 0..1 | 8 | |
posCurrency | String | POS currency | 0..1 | 255 | |
Available | boolean |
|
0..1 | 1 | |
merchantID | String | ID of Merchant | 0..1 | 255 | |
merchantNameAr | String | Merchant name in Arabic | 0..1 | 255 | |
merchantNameEn | String | Merchant name in English | 0..1 | 255 |
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('GET', 'http://www.ocstaging.net/webservice/refillAccount.wsdl', true);
// build SOAP request
var sr ='
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductWithVATListRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductWithVATListRequest>
</soapenv:Body>
</soapenv:Envelope>
>';
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
alert('done. use firebug/console to see network response');
}
}
}
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
import requests
url="http://www.ocstaging.net/webservice/refillAccount.wsdl"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductWithVATListRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductWithVATListRequest>
</soapenv:Body>
</soapenv:Envelope>"""
response = requests.GET(url,data=body,headers=headers)
print response.content
<?php
$username = 'test@gmail.com';
$signature = 'a516s5dd5d4df1dfef4e5f42';
$client = new SoapClient('http://Bitaqaty Business.n2vsb.com/webservice/refillAccount.wsdl');
$params = array(
'username'=>$username
'signature'=>$signature,
);
$myXMLData = $client->__soapCall('RetrieveListofdetailedproductwithVAT', array($params));
echo "<pre>";
echo $myXMLData; echo "<br>";
echo "<pre>";
?>
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Send_XML_Post_Request_1 {
public static void main(String[] args) {
try {
String url = "http://www.ocstaging.net/webservice/refillAccount.wsdl";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Content-Type","application/soap+xml; charset=utf-8");
String countryCode="Canada";
String xml = "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="https://www.netader.com/webservice">
<soapenv:Header/>
<soapenv:Body>
<web:POSGetProductWithVATListRequest>
<web:posUsername>test@gmail.com</web:posUsername>
<web:signature>be24bb1a511d16ac45813366cadbf413</web:signature>
</web:POSGetProductWithVATListRequest>
</soapenv:Body>
</soapenv:Envelope>";
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(xml);
wr.flush();
wr.close();
String responseStatus = con.getResponseMessage();
System.out.println(responseStatus);
BufferedReader in = new BufferedReader(new InputStreamReader(
con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("response:" + response.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
Response | Description |
---|---|
200 | Success |
Response | Description |
---|---|
101 | MISSING_USERNAME |
103 | MISSING_SIGNATURE |
107 | MISSING_PRODUCT_CODE |
112 | MISSED_TERMINAL_ID |
113 | MISSED_REQUEST_ID |
114 | MISSED_DATE |
115 | MISSED_TRX_REF_SUCCESS_NUMS |
116 | MISSED_TRX_REF_NUMS_LIST |
117 | MISSED_TRX_REF_NUMS |
118 | MISSED_TRX_TOT_NUM |
119 | MISSED_TRX_TOT_AMT |
120 | MISSED_LAST_TRX_DATE |
Response | Description |
---|---|
201 | INVALID_SIGNATURE |
203 | INVALID_POS_USERNAME |
204 | INVALID_POS_INTERNAL_ACCOUNT |
208 | INVALID_PRODUCT_CODE |
209 | INVALID_SELLABLE_PRODUCT |
210 | INVALID_TRX_REF_NUM |
211 | MISMATCHED_TRX_REF_NUMS |
213 | TRX_REF_NUMS_EXCEED_MAX |
214 | INVALID_TERMINAL_ID |
215 | INVALID_TRX_TOT_NUM |
216 | INVALID_TRX_TOT_AMT |
217 | MISMATCH_TRX_TOT_NUM |
218 | MISMATCH_TRX_TOT_AMT |
Response | Description |
---|---|
301 | NO_SELLABLE_ITEMS |
302 | INSUFFICIENT_BALANCE |
303 | POS_REACHED_PURCHASING_LIMIT |
304 | SERVICE_NOT_AVAILABLE |
305 | INTERNAL_SYSTEM_ERROR |
306 | INVALID_PURCHASING_CHANNEL |
307 | DUPLICATE_REQUEST |
309 | NO_REQUESTS_FOUND |
310 | NO_INITIAL_REQUEST_FOUND |