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
FieldTypeDescription
merchantInteger - RequiredMerchant ID
tokenString - RequiredToken
>Parameters
FieldTypeDescription
codeString - RequiredService Code
orderString - RequiredMerchant Order

>Success
FieldTypeDescription
statusStringStatus Code: 000
messageStringMessage
orderStringPayguru Order
payoutStringFor Market Place
sub_merchant_idStringFor Market Place
feeAmountFor Market Place

>Error
FieldTypeDescription
statusStringStatus Code: #See
messageStringMessage

>Ö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
FieldTypeDescription
merchantInteger - RequiredMerchant ID
tokenString - RequiredToken
>Parameters
FieldTypeDescription
codeString - RequiredService Code
amountString - RequiredAmount
orderString - RequiredMerchant Order
payoutString - OptionallyRequired For Market Place
sub_merchant_idInteger - OptionallyRequired For Market Place
feeAmount - OptionallyRequired For Market Place
user_idString - OptionallyMax:32

>Success
FieldTypeDescription
statusStringStatus Code: 000
messageStringMessage
orderStringPayguru Order

>Error
FieldTypeDescription
statusStringStatus Code: #See
messageStringMessage

>Ö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
FieldTypeDescription
merchantInteger - RequiredMerchant ID
tokenString - RequiredToken
>Parameters
FieldTypeDescription
codeString - RequiredService Code
amountString - RequiredAmount
orderString - RequiredMerchant Order
payoutString - OptionallyRequired For Market Place
sub_merchant_idInteger - OptionallyRequired For Market Place
feeAmount - OptionallyRequired For Market Place
user_idString - OptionallyMax:32
PaymentNotificationArray[]PaymentNotification Fields
-tc_noStringTCKN
-nameStringName
-emailStringEmail
-phoneStringMobile Phone
-user_ipStringUser IP
-apply_timeDateApply Time Format:YYYY-MM-DD HH:II:SS
-descriptionStringDescription

>Success
FieldTypeDescription
statusStringStatus Code: 000
messageStringMessage
codeStringPayguru 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
FieldTypeDescription
statusStringStatus Code: #See
messageStringMessage

>Ö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
FieldTypeDescription
merchantInteger - RequiredMerchant ID
tokenString - RequiredToken
>Parameters
FieldTypeDescription
codeString - RequiredService Code
orderString - RequiredMerchant Order
amountString - RequiredAmount
payoutString - OptionallyRequired For Market Place
sub_merchant_idInteger - OptionallyRequired For Market Place
feeAmount - OptionallyRequired For Market Place

>Success
FieldTypeDescription
statusStringStatus Code: 000
messageStringMessage
orderStringPayguru Order

>Error
FieldTypeDescription
statusStringStatus Code: #See
messageStringMessage

>Ö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"