Non-Automatic Order Matching Services
Payguru Platformlarında eşleşmeyen İşlem Koduna sahip ödemeler için, Payguru'nun üye iş yerine açmış olduğu "manuel ödeme bildirimi" süreçlerinin metodlarıdır. Üye iş yeri kendi sitesinde açmış olduğu arayüz aracılığı ile müşteriden ödeme bilgisini toplar ve aşağıdaki bilgilendirmeler aracılığı ile Payguru Platformunu sorgular ve ödeme bilgisini iletir.
Get
Üye iş yeri tarafından müşterinin verdiği bilgiler aracılığı ile oluşuturulmuş olan bildirime ait bir bildirim kodu ile üye iş yeri'nin Payguru platformunu sorgulamasını sağlayan servistir.
>URL
https://api.payguru.com/phs/paymentNotification/get
>HTTP Method
GET yada POST
>Headers
Field | Type | Description |
---|
merchant | Integer - Required | Merchant ID |
token | String - Required | Token |
>Parameters
Field | Type | Description |
---|
id | Integer - Required | Payment Notification ID |
>Success
Field | Type | Description |
---|
status | String | Status Code: 000 |
message | String | Message |
paymentNotification | Array[] | PaymentNotification Detail |
-id | String | ID |
-code | String | Code |
-bank_id | String | Bank ID |
-bank_code | String | Bank Code |
-bank_name | String | Bank Name |
-merchant | String | Merchant ID |
-merchant_name | String | Merchant Name |
-service_id | String | Service ID |
-service_code | String | Service Code |
-service_name | String | Service Name |
-transaction_id | String | Transaction ID |
-order_refno | String | Order RefNo |
-tc_no | String | TCNO |
-name | String | Name |
-email | String | Email |
-phone | String | Phone |
-amount | String | Amount |
-description | String | Description |
-user_ip | String | User IP |
-create_time | String | Create Time Format:YYYY-MM-DD HH:II:SS |
-apply_time | String | Apply Time Format:YYYY-MM-DD HH:II:SS |
-status | String | Payment Notification Status #See |
>Error
Field | Type | Description |
---|
status | String | Status Code: #See |
message | String | Message |
>Örnek Cevaplar
{
"status": "000",
"message": "Success",
"paymentNotification": {
"id": 15,
"code": "12345678",
"bank_id": 3,
"bank_code": "yapikredibank",
"merchant": 123,
"merchant_name": "XXXX",
"service_id": 1,
"service_name": "XXXXX",
"service_code": "xxxxx",
"transaction_id": 12345,
"order_refno": "123456789",
"tc_no": "12345678911",
"name": "Hello",
"email": "test@payguru.com",
"phone": "5123456789",
"amount": "2.00",
"user_ip": "000.000.000.000",
"create_time": "2017-03-06 17:47:54",
"apply_time": "2017-02-20 13:41:42",
"description": "test 123456",
"status": 10
}
}
{
"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/paymentNotification/get/12345678"
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/paymentNotification/get";
$data = [
"id"=>"123456789",
];
$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 $response;
}
var client = new RestClient("https://api.payguru.com/phs/paymentNotification/get?id=12345678");
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["paymentNotification"]["id"]);
} else {
MessageBox.Show((string)o["message"]);
}
import requests,json
url = "https://api.payguru.com/phs/paymentNotification/create"
querystring = {"id":"12345678"}
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["paymentNotification"]["code"]
else:
print o["message"]
else:
print "Request Error"
Create
Üye iş yeri tarafından müşterinin verdiği bilgiler aracılığı ile manuel ödeme bildiriminin başlatıldığı servistir.
>URL
https://api.payguru.com/phs/paymentNotification/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 |
bank | String - Required | Bank Code |
order | String - Required | Merchant Order |
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 | PaymentNotification Code |
Please forward to "https://cp.payguru.com/phs/yonlendir/{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": "1234567890"
}
{
"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/paymentNotification/create?amount=123.12&bank=000&order=XXXXXXX&code=XXX&PaymentNotification[name]=Hello&PaymentNotification[tc]=123456789"
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/paymentNotification/create";
$id = "72824979";
$data = [
"amount" => "123.12",
"bank" => "000",
"order" => "XXXXXXX",
"code" => "XXX",
"PaymentNotification" => [
"name" => "Hello",
"tc" => 123456789,
]
];
$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 {
$o = json_decode($response,true);
if($o["status"] == "000"){
echo $o["code"];
}else{
echo $o["message"];
}
}
var client = new RestClient("https://api.payguru.com/phs/paymentNotification/create
?amount=123.12&bank=000&order=XXXXXXX&code=XXX&PaymentNotification%5Bname%5D=Hello&PaymentNotification%5Btc%5D=123456789");
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/paymentNotification/create"
querystring = {"amount":"123.12","bank":"000","order":"XXXXXXX","code":"XXX","PaymentNotification[name]":"Hello","PaymentNotification[tc]":"123456789"}
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"