Order Lookup
Üye iş yerinin işlemlerde kendi kodunu kullandığı durumlarda, ilgili kodun Payguru Platformunda İşlem Kodu olarak kullanılmasını sağlayan, ya da üye iş yerinin kendi sistemlerinde kullanmış olduğu sipariş kodu ile eşleşecek İşlem Kodunun Payguru platfromunda yaratılması sürecini tetikleyen metodlardır. Söz konusu metodlar üye iş yerinin Payguru Platformunda kullanılan işlem kodu'nu kullanmak istemediği süreçlerde kullanılır.
Check
Belirli bir işlem kodunun Payguru Platformunda kayıtlı olup olmadığını sorgulayan servistir.
>URL
https://api.payguru.com/phs/orderToReference/check
>HTTP Method
GET yada POST
>Headers
Field | Type | Description |
---|
merchant | Integer - Required | Merchant ID |
token | String - Required | Token |
>Parameters
Field | Type | Description |
---|
code | String - Required | Service Code |
order | String - Required | Merchant Order |
>Success
Field | Type | Description |
---|
status | String | Status Code: 000 |
message | String | Message |
order | String | Payguru Order |
payout | String | For Market Place |
sub_merchant_id | String | For Market Place |
fee | Amount | For Market Place |
>Error
Field | Type | Description |
---|
status | String | Status Code: #See |
message | String | Message |
>Örnek Cevaplar
{
"status": "000",
"message": "Success",
"order": "123412345678"
}
{
"status": "ERR_005",
"message": "Invalid Service"
}
>Örnek Kodlar
curl -X GET -H "token: {3E53E639-5173-D1B6-9368-68FCBCF72342}" -H "merchant: 123" --globoff "https://api.payguru.com/phs/orderToReference/check?code=XXX&order=ORDER"
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/orderToReference/check";
$data = [
"code" => "XXX",
"order" => "ORDER",
];
$headers = [
"token: {3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant: 123"
];
curl_setopt_array($curl, array(
CURLOPT_URL => $url."?".http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => $headers,
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo json_decode($response,true)["order"];
}
var client = new RestClient("https://api.payguru.com/phs/orderToReference/check?code=XXX&order=ORDER");
var request = new RestRequest(Method.GET);
request.AddHeader("merchant", "123");
request.AddHeader("token", "{3E53E639-5173-D1B6-9368-68FCBCF72342}");
IRestResponse response = client.Execute(request);
var o = JObject.Parse(response);
if (o["status"] == "000") {
MessageBox.Show((string)o["order"]);
} else {
MessageBox.Show((string)o["message"]);
}
import requests,json
url = "https://api.payguru.com/phs/orderToReference/check"
querystring = {"code":"XXX","order":"ORDER"}
headers = {
"token": "{3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant": "123"
}
response = requests.request("GET", url, headers=headers, params=querystring)
if response.status_code == 200:
o = json.loads(response.text)
if o["status"] == "000":
print o["order"]
else:
print o["message"]
else:
print "Request Error"
Create
Üye iş yeri'nin talebi üzerine Payguru platofrmlarında bir İşlem Kodu yaratılmasını sağlayan web servisidir. Üye iş yeri'nin kendi sistemlerindeki sipariş kodunu kullanması durumunda da bu servis çağırılarak Payguru sistemlerinde referans olarak kullanılacak işlem kodu yaratılır.
>URL
https://api.payguru.com/phs/orderToReference/create
>HTTP Method
GET yada POST
>Headers
Field | Type | Description |
---|
merchant | Integer - Required | Merchant ID |
token | String - Required | Token |
>Parameters
Field | Type | Description |
---|
code | String - Required | Service Code |
amount | String - Required | Amount |
order | String - Required | Merchant Order |
payout | String - Optionally | Required For Market Place |
sub_merchant_id | Integer - Optionally | Required For Market Place |
fee | Amount - Optionally | Required For Market Place |
user_id | String - Optionally | Max:32 |
>Success
Field | Type | Description |
---|
status | String | Status Code: 000 |
message | String | Message |
order | String | Payguru Order |
>Error
Field | Type | Description |
---|
status | String | Status Code: #See |
message | String | Message |
>Örnek Cevaplar
{
"status": "000",
"message": "Success",
"order": "123412345678",
}
{
"status": "ERR_005",
"message": "Invalid Service"
}
>Örnek Kodlar
curl -X GET -H "token: {3E53E639-5173-D1B6-9368-68FCBCF72342}" -H "merchant: 123" --globoff "https://api.payguru.com/phs/orderToReference/create?code=XXX&order=ORDER&amount=1.00"
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/orderToReference/create";
$data = [
"code"=>"XXX",
"order"=>"ORDER",
"amount"=>"1.00",
];
$headers = [
"token: {3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant: 123"
];
curl_setopt_array($curl, array(
CURLOPT_URL => $url."?".http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => $headers,
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo json_decode($response,true)["order"];
}
var client = new RestClient("https://api.payguru.com/phs/orderToReference/create?code=XXX&order=ORDER&amount=1.00");
var request = new RestRequest(Method.GET);
request.AddHeader("merchant", "123");
request.AddHeader("token", "{3E53E639-5173-D1B6-9368-68FCBCF72342}");
IRestResponse response = client.Execute(request);
var o = JObject.Parse(response);
if (o["status"] == "000") {
MessageBox.Show((string)o["order"]);
} else {
MessageBox.Show((string)o["message"]);
}
import requests,json
url = "https://api.payguru.com/phs/orderToReference/create"
querystring = {"code":"XXX", "order":"ORDER", "amount":"1.00"}
headers = {
"token": "{3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant": "123"
}
response = requests.request("GET", url, headers=headers, params=querystring)
if response.status_code == 200:
o = json.loads(response.text)
if o["status"] == "000":
print o["order"]
else:
print o["message"]
else:
print "Request Error"
Direct
Tüm Nakit Ödeme ve Banka Transfer hizmetinin Payguru Ödeme sayfasında verilmesi durumunda, üye iş yeri'nin Payguru sayfasını çağırdığı web servistir. Müşteri ilgili İşlem Kodunu bu sayfada görür.
>URL
https://api.payguru.com/phs/orderToReference/direct
>HTTP Method
GET yada POST
>Headers
Field | Type | Description |
---|
merchant | Integer - Required | Merchant ID |
token | String - Required | Token |
>Parameters
Field | Type | Description |
---|
code | String - Required | Service Code |
amount | String - Required | Amount |
order | String - Required | Merchant Order |
payout | String - Optionally | Required For Market Place |
sub_merchant_id | Integer - Optionally | Required For Market Place |
fee | Amount - Optionally | Required For Market Place |
user_id | String - Optionally | Max:32 |
PaymentNotification | Array[] | PaymentNotification Fields |
-tc_no | String | TCKN |
-name | String | Name |
-email | String | Email |
-phone | String | Mobile Phone |
-user_ip | String | User IP |
-apply_time | Date | Apply Time Format:YYYY-MM-DD HH:II:SS |
-description | String | Description |
>Success
Field | Type | Description |
---|
status | String | Status Code: 000 |
message | String | Message |
code | String | Payguru Order |
Please forward to "https://cp.payguru.com/phs/banks/{CODE}?redirect=SUCCESS_URL&backUrl=BACK_URL" with the code in response.
Redirect parameters are optional
>Error
Field | Type | Description |
---|
status | String | Status Code: #See |
message | String | Message |
>Örnek Cevaplar
{
"status": "000",
"message": "Success",
"code": "123412345678",
}
{
"status": "ERR_005",
"message": "Invalid Service"
}
>Örnek Kodlar
curl -X GET -H "token: {3E53E639-5173-D1B6-9368-68FCBCF72342}" -H "merchant: 123" --globoff "https://api.payguru.com/phs/orderToReference/direct?code=XXX&order=ORDER&amount=1.00"
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/orderToReference/direct";
$data = [
"code"=>"XXX",
"order"=>"ORDER",
"amount"=>"1.00",
];
$headers = [
"token: {3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant: 123"
];
curl_setopt_array($curl, array(
CURLOPT_URL => $url."?".http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => $headers,
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo json_decode($response,true)["code"];
}
var client = new RestClient("https://api.payguru.com/phs/orderToReference/direct?code=XXX&order=ORDER&amount=1.00");
var request = new RestRequest(Method.GET);
request.AddHeader("merchant", "123");
request.AddHeader("token", "{3E53E639-5173-D1B6-9368-68FCBCF72342}");
IRestResponse response = client.Execute(request);
var o = JObject.Parse(response);
if (o["status"] == "000") {
MessageBox.Show((string)o["code"]);
} else {
MessageBox.Show((string)o["message"]);
}
import requests,json
url = "https://api.payguru.com/phs/orderToReference/direct"
querystring = {"code":"XXX", "order":"ORDER", "amount"=>"1.00"}
headers = {
"token": "{3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant": "123"
}
response = requests.request("GET", url, headers=headers, params=querystring)
if response.status_code == 200:
o = json.loads(response.text)
if o["status"] == "000":
print o["code"]
else:
print o["message"]
else:
print "Request Error"
Update
>URL
https://api.payguru.com/phs/orderToReference/update
>HTTP Method
GET yada POST
>Headers
Field | Type | Description |
---|
merchant | Integer - Required | Merchant ID |
token | String - Required | Token |
>Parameters
Field | Type | Description |
---|
code | String - Required | Service Code |
order | String - Required | Merchant Order |
amount | String - Required | Amount |
payout | String - Optionally | Required For Market Place |
sub_merchant_id | Integer - Optionally | Required For Market Place |
fee | Amount - Optionally | Required For Market Place |
>Success
Field | Type | Description |
---|
status | String | Status Code: 000 |
message | String | Message |
order | String | Payguru Order |
>Error
Field | Type | Description |
---|
status | String | Status Code: #See |
message | String | Message |
>Örnek Cevaplar
{
"status": "000",
"message": "Success",
"order": "123412345678"
}
{
"status": "ERR_005",
"message": "Invalid Service"
}
{
"status": "000",
"message": "Success",
"order": "123412345678"
}
{
"status": "ERR_005",
"message": "Invalid Service"
}
>Örnek Kodlar
curl -X GET -H "token: {3E53E639-5173-D1B6-9368-68FCBCF72342}" -H "merchant: 123" --globoff "https://api.payguru.com/phs/orderToReference/update?code=XXX&order=ORDER&amount=1.00"
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/orderToReference/update";
$data = [
"code" => "XXX",
"order" => "ORDER",
"amount" => "1.00",
];
$headers = [
"token: {3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant: 123"
];
curl_setopt_array($curl, array(
CURLOPT_URL => $url."?".http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => $headers,
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo json_decode($response,true)["order"];
}
var client = new RestClient("https://api.payguru.com/phs/orderToReference/update?code=XXX&order=ORDER&amount=1.00");
var request = new RestRequest(Method.GET);
request.AddHeader("merchant", "123");
request.AddHeader("token", "{3E53E639-5173-D1B6-9368-68FCBCF72342}");
IRestResponse response = client.Execute(request);
var o = JObject.Parse(response);
if (o["status"] == "000") {
MessageBox.Show((string)o["order"]);
} else {
MessageBox.Show((string)o["message"]);
}
import requests,json
url = "https://api.payguru.com/phs/orderToReference/update"
querystring = {"code":"XXX","order":"ORDER","amount":"1.00"}
headers = {
"token": "{3E53E639-5173-D1B6-9368-68FCBCF72342}",
"merchant": "123"
}
response = requests.request("GET", url, headers=headers, params=querystring)
if response.status_code == 200:
o = json.loads(response.text)
if o["status"] == "000":
print o["order"]
else:
print o["message"]
else:
print "Request Error"