Sending data to Nanokassa.ru
For sending data you need to have curl extension. (php-curl)
@curl_setopt($curl, CURLOPT_URL, $url_nanokassa_ru); @curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json")); @curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); @curl_setopt($curl, CURLOPT_TIMEOUT, 10); @curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); @curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); @curl_setopt($curl, CURLOPT_POST, true); @curl_setopt($curl, CURLOPT_POSTFIELDS, $request); // Answer of Server $response = @curl_exec($curl);
Our server will decrypt your request and will check authentication data (kassaid, kassatoken). If everything okay so, on server of nanokassa.ru will add encrypted data of packets ab and de. And we will store data like this. So your data will be safe.
If you will have answer like this:
{ "status":"success", "success":"added this test record to nanokassa.ru", "nuid":"111111111111111111", "qnuid":"22222222222222222" }
So your data successfully added to your nanokassa account. If there will be some mistake - you will see this.
So thats all. You know everything that you need for integration with Nanokassa.ru. And thats easy :)
Parameters nuid and qnuid will help you to get data about transactions after sending. For example you can get fiscal sign, number of fiscal drive and other details of receipt. If you want to have an access to this API - so you need to send an email to us: [email protected] - we will send to you more details.