{"info":{"_postman_id":"d02ffaf4-920c-4fa9-9e19-205037f8c46f","name":"tahsildarVirtualPos","description":"<html><head></head><body><h4 id=\"request-hash-\">Request Hash :</h4>\n<p><strong>hashStr</strong> =  price + currency + installment + order_no + transaction_no + private_key;<br>\n<strong>hash</strong> = strtoupper(sha1(hashStr))</p>\n<hr>\n<h4 id=\"response-hash-\">Response Hash :</h4>\n<p><strong>hashStr</strong> =  result + date + private_key<br><strong>hash</strong> = strtoupper(sha1(hashStr))</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"6672714","collectionId":"d02ffaf4-920c-4fa9-9e19-205037f8c46f","publishedId":"TVCe1U1v","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-01T07:16:27.000Z"},"item":[{"name":"virtual-pos/payment-create","id":"3033fd44-979f-439e-b86a-6ba09fa7b2a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"public_key\": \"353PPCQHYATPVSEZZWFRWVJQHXMUUIPYBLM123\",\r\n    \"price\": 67,\r\n    \"currency\": \"TRY\",\r\n    \"installment\": null,\r\n    \"installment_id\": 455,\r\n    \"installmentCampaign\": 296,\r\n    \"order_no\": \"order_1\",\r\n    \"secure3d\": 0,\r\n    \"hash\": \"35F4C398BD212C4C4B3D981CE63F4311BDD3D67\",\r\n    \"ip\": null,\r\n    \"return_url\": null,\r\n    \"notify\" : true,\r\n    \"provision_type\": \"sales\",\r\n    \"orderItems\":[\r\n\t{\r\n\t\t\"id\":1,\r\n\t\t\"attributeId\":null,\r\n\t\t\"type\":\"product\",\r\n\t\t\"name\":\"Example\",\r\n\t\t\"attributeName\":\"black - large\",\r\n\t\t\"attributes\":\"\",\r\n\t\t\"barcode\":\"\",\r\n\t\t\"tax\":20,\r\n\t\t\"quantity\":3,\r\n\t\t\"quantityType\":\"ADET\",\r\n\t\t\"costPrice\":20,\r\n\t\t\"salePrice\":30,\r\n\t\t\"totalSalePrice\":36\r\n\t}],\r\n    \"card\": {\r\n        \"holder_name\": \"Sheldon Cooper\",\r\n        \"number\": \"4508034508034509\",\r\n        \"expire_month\": \"12\",\r\n        \"expire_year\": \"26\",\r\n        \"cvc\": \"000\"\r\n    },\r\n    \"purchaser\": {\r\n        \"email\": null,\r\n        \"first_name\": null,\r\n        \"last_name\": null,\r\n        \"mobile_phone\": null,\r\n        \"company\": null,\r\n        \"description\": null\r\n    },\r\n    \"user\" : {\r\n      \"id\": null,\r\n      \"customer_id\": null,\r\n      \"parent_id\": null,\r\n      \"ws_code\" : null,\r\n      \"customer_ws_code\" : null,\r\n      \"parent_ws_code\" : null,\r\n      \"email\": null,\r\n      \"password\": null,\r\n      \"first_name\": null,\r\n      \"last_name\": null,\r\n      \"company\": null,\r\n      \"tax_office\": null,\r\n      \"tax_number\": null,\r\n      \"mobile_phone\": null,\r\n      \"phone\": null,\r\n      \"fax\": null,\r\n      \"country_code\": null,\r\n      \"city\": null,\r\n      \"address\": null,\r\n      \"zip\": null,\r\n      \"credibility\": null,\r\n      \"is_corporate\": false,\r\n      \"identity_no\": null,\r\n      \"plasiyer_admin_id\": null,\r\n      \"group_id\": null\r\n    }\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{SITE}}/rest1/virtual-pos/payment-create","description":"<ul><li><p><b>installment</b> : peşin için 0</p></li><li><p><b>order_no</b> : benzersiz olmalı</p></li><li><p><b>user</b> : zorunlu değil, gönderildiğinde üye oluşturur</p></li><li><p><b>hash</b> :</p></li></ul>\n\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>hashStr = price + currency + installment + order_no + private_key;\nhash = strtoupper(sha1(hashStr))\n\n</code></pre><hr />\n<p><code>response.result alabileceği değerler :</code></p>\n<ul><li><p><b>fault</b> : başarısız demektir. response içerisine başarısız detayları yer alır.</p></li><li><p><b>redirect</b> : alınması durumunda, browser response da gelen \"redirect_url\" ye yönlendirilmeli. 3d adımından sonra requestte belirttiğiniz return_url ye post edilecektir.</p></li><li><p><b>complete</b> : işlem başarılı şekilde sonuçlandı</p></li><li><p><b>incomplete</b> : süreç devam ediyor</p></li></ul>\n\n<hr />\n<ul>\n<li><code>orderItems alabileceği değerler : (required none)</code><ul>\n<li><code>id</code>: Ürünün benzersiz bir kimliği veya kodu.</li>\n<li><code>attributeId</code>: Ürünün özelliklerine ilişkin benzersiz bir kimlik veya kod.</li>\n<li><code>type</code>: Ürün tipi, genellikle \"product\" olarak belirtilir.</li>\n<li><code>name</code>: Ürünün adı veya açıklaması.</li>\n<li><code>attributeName</code>: Ürünün özellikleri veya varyasyonları.</li>\n<li><code>attributes</code>: Ürünün diğer özellikleri veya ayrıntıları.</li>\n<li><code>barcode</code>: Ürünün barkodu veya SKU numarası.</li>\n<li><code>tax</code>: Ürün üzerindeki vergi oranı.</li>\n<li><code>quantity</code>: Siparişteki bu ürünün miktarı.</li>\n<li><code>quantityType</code>: Miktar birimi (örneğin, \"ADET\" veya \"KİLOGRAM\").</li>\n<li><code>costPrice</code>: Ürünün maliyet fiyatı.</li>\n<li><code>salePrice</code>: Ürünün satış fiyatı.</li>\n<li><code>totalSalePrice</code>: Belirli bir ürün miktarının toplam satış fiyatı.</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["rest1","virtual-pos","payment-create"],"host":["{{SITE}}"],"query":[],"variable":[]}},"response":[{"id":"8b2ff5b4-3eb5-4609-9976-00a7a7d5c20b","name":"virtual-pos/payment-create","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"public_key\": \"\",\r\n    \"price\": 15,\r\n    \"currency\": \"TRY\",\r\n    \"installment\": 3,\r\n    \"order_no\": null,\r\n    \"secure3d\": null,\r\n    \"hash\": null,\r\n    \"ip\": null,\r\n    \"return_url\": null,\r\n    \"provision_type\": \"sales\",\r\n    \"orderItems\":[\r\n\t{\r\n\t\t\"id\":1,\r\n\t\t\"attributeId\":null,\r\n\t\t\"type\":\"product\",\r\n\t\t\"name\":\"Example\",\r\n\t\t\"attributeName\":\"black - large\",\r\n\t\t\"attributes\":\"\",\r\n\t\t\"barcode\":\"\",\r\n\t\t\"tax\":20,\r\n\t\t\"quantity\":3,\r\n\t\t\"quantityType\":\"ADET\",\r\n\t\t\"costPrice\":20,\r\n\t\t\"salePrice\":30,\r\n\t\t\"totalSalePrice\":36\r\n\t}],\r\n    \"card\": {\r\n        \"holder_name\": \"ali veli\",\r\n        \"number\": \"5526080000000006\",\r\n        \"expire_month\": \"12\",\r\n        \"expire_year\": \"21\",\r\n        \"cvc\": \"000\"\r\n    },\r\n    \"purchaser\": {\r\n        \"email\": null,\r\n        \"first_name\": null,\r\n        \"last_name\": null,\r\n        \"mobile_phone\": null,\r\n        \"company\": null,\r\n        \"description\": null\r\n    },\r\n    \"user\" : {\r\n      \"id\": null,\r\n      \"customer_id\": null,\r\n      \"parent_id\": null,\r\n      \"ws_code\" : null,\r\n      \"customer_ws_code\" : null,\r\n      \"parent_ws_code\" : null,\r\n      \"email\": null,\r\n      \"password\": null,\r\n      \"first_name\": null,\r\n      \"last_name\": null,\r\n      \"company\": null,\r\n      \"tax_office\": null,\r\n      \"tax_number\": null,\r\n      \"mobile_phone\": null,\r\n      \"phone\": null,\r\n      \"fax\": null,\r\n      \"country_code\": null,\r\n      \"city\": null,\r\n      \"address\": null,\r\n      \"zip\": null,\r\n      \"credibility\": null,\r\n      \"is_corporate\": false,\r\n      \"identity_no\": null,\r\n      \"plasiyer_admin_id\": null,\r\n      \"group_id\": null\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{SITE}}/rest1/virtual-pos/payment-create"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\r\n\t\"result\": \"redirect\",\r\n\t\"success\": true,\r\n\t\"message\": null,\r\n\t\"summary\": null,\r\n\t\"pagingData\": null,\r\n\t\"errCode\": \"E0\",\r\n\t\"date\": \"2021-08-02 17:07:36\",\r\n\t\"request\": {\r\n\t\t\"price\": \"179.9000\",\r\n\t\t\"currency\": \"TRY\",\r\n\t\t\"installment\": 0,\r\n\t\t\"order_no\": \"TS02081046004MM5\",\r\n\t\t\"secure3d\": 1,\r\n\t\t\"ip\": \"192.168.3.5\",\r\n\t\t\"return_url\": \"https://m.meticaret.com/Order/OrderAPI/tahsildarCheckout/f25517d11de231dbe7d6ba9338f919f7.TS02081046004MM5.919a6a7bb6c45d3b1ff1a8c12d1e3506\",\r\n\t\t\"purchaser\": {\r\n\t\t\t\"email\": \"ts29@tsoft.com.tr\",\r\n\t\t\t\"first_name\": \"duran\",\r\n\t\t\t\"last_name\": \"durdu\",\r\n\t\t\t\"mobile_phone\": \"905366144342\",\r\n\t\t\t\"company\": \"myfirm\",\r\n\t\t\t\"description\": \"TS02081046004\"\r\n\t\t},\r\n\t\t\"user\": {\r\n\t\t\t\"email\": \"ts29@tsoft.com.tr\",\r\n\t\t\t\"first_name\": \"duran\",\r\n\t\t\t\"last_name\": \"durdu\",\r\n\t\t\t\"mobile_phone\": \"905366144342\",\r\n\t\t\t\"company\": \"myfirm\"\r\n\t\t}\r\n\t},\r\n\t\"transaction_no\": \"CO20210825584MM1\",\r\n\t\"redirect_url\": \"http://m.tsoftpos.com/rest1/virtual-pos/payment-redirect/eb1660q7v5va4c4jui1bk2ni630tm11e61\",\r\n\t\"hash\": \"E383F78A493D48371C73458D4849D8E607CBB638\"\r\n}"},{"id":"f720a90a-3aa9-43ee-b3b0-bf6746cca43b","name":"status fault","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"public_key\": \"\",\r\n    \"price\": 15,\r\n    \"currency\": \"TRY\",\r\n    \"installment\": 3,\r\n    \"order_no\": null,\r\n    \"secure3d\": null,\r\n    \"hash\": null,\r\n    \"ip\": null,\r\n    \"return_url\": null,\r\n    \"provision_type\": \"sales\",\r\n    \"card\": {\r\n        \"holder_name\": \"ali veli\",\r\n        \"number\": \"5526080000000006\",\r\n        \"expire_month\": \"12\",\r\n        \"expire_year\": \"21\",\r\n        \"cvc\": \"000\"\r\n    },\r\n    \"purchaser\": {\r\n        \"email\": null,\r\n        \"first_name\": null,\r\n        \"last_name\": null,\r\n        \"mobile_phone\": null,\r\n        \"company\": null,\r\n        \"description\": null\r\n    },\r\n    \"user\" : {\r\n      \"id\": null,\r\n      \"customer_id\": null,\r\n      \"parent_id\": null,\r\n      \"ws_code\" : null,\r\n      \"customer_ws_code\" : null,\r\n      \"parent_ws_code\" : null,\r\n      \"email\": null,\r\n      \"password\": null,\r\n      \"first_name\": null,\r\n      \"last_name\": null,\r\n      \"company\": null,\r\n      \"tax_office\": null,\r\n      \"tax_number\": null,\r\n      \"mobile_phone\": null,\r\n      \"phone\": null,\r\n      \"fax\": null,\r\n      \"country_code\": null,\r\n      \"city\": null,\r\n      \"address\": null,\r\n      \"zip\": null,\r\n      \"credibility\": null,\r\n      \"is_corporate\": false,\r\n      \"identity_no\": null,\r\n      \"plasiyer_admin_id\": null,\r\n      \"group_id\": null\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{SITE}}/rest1/virtual-pos/payment-create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx"},{"key":"Date","value":"Mon, 09 Aug 2021 14:42:28 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Set-Cookie","value":"PHPSESSID=82cd195ajuaeabuthn2dd18kq6; path=/"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, post-check=0, pre-check=0"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": \"fault\",\n    \"success\": false,\n    \"message\": \"Merchant not found\",\n    \"errCode\": \"ED002\",\n    \"data\": null\n}"}],"_postman_id":"3033fd44-979f-439e-b86a-6ba09fa7b2a2"},{"name":"virtual-pos/payment-create-aes","id":"ea0aae0a-9c0d-49f0-943e-39e09f80451b","protocolProfileBehavior":{"disableBodyPruning":true,"disableUrlEncoding":false},"request":{"method":"POST","header":[{"key":"Public-Key","value":"33PPCZCOJLLIPYDUTXNUOKZHANIYVXKJNWSFC","type":"text"}],"body":{"mode":"raw","raw":"G8yyQcgaGBAnysOhWFQhShnbWruUFUWyAKTE83ufE3PrQUw9fECdsOgyJZy0cw3USJ58xCGLNSKsB2wrruNRLJ1RJ4XjC8M/FqjW0iEIcN/2QpMMhTn3Rr5G9UGBnAVPfuwgi49tiWdT+POPlJbTiglMmluz58FMq6aNOtICMWBJqqurT4Iejahe2OjWBDuAh0hphIsK/0UvH195rYNUbw3UF9ZSNS4FJcM5+O0HE+tsyhHVhW0aJ1/wTLrKcA52+i/g2gtOVCLptMDiNkK7RL4LedgbBq4R3uxO5iKxfhR+1uvHkOwIFKVfBHfby9pSdqUGE7lfJ90dcaB2hYXd0ToKLkyf//BWujaSiEQge3Fwat5mXFCuHUTTaUumOsA+fhVScJ96GHcQowG0ZX8tg+/8KS1PK4A/scICVivOhWTZvJN2PgVldIAi/3n3RxGLH1S0JeQDZmEiteC+43mtDagDRxQ9BY1Vo0zqrt6LLMnJrdtsvNDa/Aklw+pOp9ILofYdvN3NfH4cB2Hp+rlyq3+BD94AtB8n8BnI5u2BScTmJRATYxuuO8acL8YasMSGXT1FyEyL0eZ2HasboDkqnPLeSjXUpa4kPvPcvv7bcQv0aw+5g8YLosU0ijGrDnb6lKnbWyA/sCwXkPPK2WocUzQ6U8slWcRvIAPDM9T3okw="},"url":"{{SITE}}/rest1/virtual-pos/payment-create-aes","description":"<p>payment-create metodundaki requestin şifrelenmiş şeklidir.</p>\n<p><code>Algoritma : AES-128-CBC</code></p>\n<p><code>iv : 0000000000000000</code></p>\n<p>Örnek:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$publicKey = \"33PPCZCOJLLIPYDUTXNUOKZHANIYVXKJNWSFC\";\n$privateKey = \"C8cf9629443d59902ba50b15cc4d9b1c6\";\n$data = array(\n    \"public_key\" =&gt; $publicKey,\n    \"price\" =&gt; 19,\n    \"currency\" =&gt; \"TRY\",\n    \"installment\" =&gt; 0,\n    \"order_no\" =&gt; \"sxx2x8\",\n    \"secure3d\" =&gt; 0,\n    \"hash\" =&gt; null,\n    \"ip\" =&gt; \"1.2.3.4\",\n    \"return_url\" =&gt; \"http://localhost/pos/tahsildar/response.php\",\n    \"card\" =&gt; array(\n        \"holder_name\" =&gt; \"ali veli\",\n        \"number\" =&gt; \"5526080000000006\",\n        \"expire_month\" =&gt; \"12\",\n        \"expire_year\" =&gt; \"21\",\n        \"cvc\" =&gt; \"000\"\n    ),\n    \"purchaser\" =&gt; array(\n        \"email\" =&gt; \"ali@veli.co\",\n        \"first_name\" =&gt; \"ali\",\n        \"last_name\" =&gt; \"veli\",\n        \"mobile_phone\" =&gt; null,\n        \"company\" =&gt; \"av ltd\",\n        \"description\" =&gt; \"vpos\"\n    )\n);\n$hashStr = $data[\"price\"] . $data[\"currency\"] . $data[\"installment\"] . $data[\"order_no\"] . $privateKey;\n$data[\"hash\"] = strtoupper(sha1($hashStr));\n$postData = json_encode($data);\n$header = array(\n    \"Content-Type: plain-text\",\n    \"Public-Key: \" . $publicKey\n);\n$key       = $privateKey;\n$cipher    = \"AES-128-CBC\";\n$iv        = \"0000000000000000\";\n$encData   = openssl_encrypt($postData, $cipher, $key, OPENSSL_RAW_DATA, $iv);\n$postData  = base64_encode($encData);\n$url = \"http://m.tsoftpos.com/rest1/virtual-pos/payment-create-aes\";\n$ch = curl_init($url);\ncurl_setopt_array($ch, array(\n    CURLOPT_POST =&gt; 1,\n    CURLOPT_POSTFIELDS =&gt; $postData,\n    CURLOPT_HTTPHEADER =&gt; $header\n));\n$response = curl_exec($ch);\n?&gt;\n\n</code></pre>\n","urlObject":{"path":["rest1","virtual-pos","payment-create-aes"],"host":["{{SITE}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ea0aae0a-9c0d-49f0-943e-39e09f80451b"},{"name":"virtual-pos/payment-info","id":"c39b3231-143f-4476-8afc-b81560a69e77","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"public_key\": null,\r\n    \"order_no\": null,\r\n    \"transaction_no\": null,\r\n    \"hash\": null\r\n}"},"url":"{{SITE}}/rest1/virtual-pos/payment-info","description":"<p>order_no veya transaction_no ikisinden biri kullanılmalı</p>\n<p>hash : </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>hashStr =  order_no + transaction_no + private_key;\nhash = strtoupper(sha1(hashStr))\n</code></pre>","urlObject":{"path":["rest1","virtual-pos","payment-info"],"host":["{{SITE}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c39b3231-143f-4476-8afc-b81560a69e77"},{"name":"virtual-pos/payment-cancel","id":"9c164699-92b5-4ed4-8691-43f15262fd01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"public_key\": \"\",\r\n    \"transaction_no\": null,\r\n    \"price\": null,\r\n    \"description\" : null,\r\n    \"refund_no\": null,\r\n    \"hash\": null\r\n}"},"url":"{{SITE}}/rest1/virtual-pos/payment-cancel","description":"<p>hash : </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>hashStr =  price + transaction_no + private_key;\nhash = strtoupper(sha1(hashStr))\n</code></pre>","urlObject":{"path":["rest1","virtual-pos","payment-cancel"],"host":["{{SITE}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c164699-92b5-4ed4-8691-43f15262fd01"}],"event":[{"listen":"prerequest","script":{"id":"f5e6e382-9f3a-467f-8334-2f60bbf04a00","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a046432a-fca2-4bfb-a5bc-0ea0be8ea320","type":"text/javascript","exec":[""]}}]}