12. Ödeme Sorgulama

Ödeme Sorgulama

Ödeme Sorgulama

GET {{Private Base Address}}/api/paywall/private/query

Önemli: Ödeme Sorgulama servisini kullanabilmeniz için 'Header' alanında 'apikeyprivate' ve 'apiclientprivate' parametrelerini göndermeniz gerekmektedir. PaymentPrivateAPI Adresi

Örnek kodlar:

using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;

public class Program
{
    private static readonly HttpClient client = new HttpClient();

    private static async Task Main()
    {
        client.DefaultRequestHeaders.Add("apikeyprivate", "%PRIVATEKEY%");
        client.DefaultRequestHeaders.Add("apiclientprivate", "%PRIVATECLIENT%");
        client.DefaultRequestHeaders.Add("merchantuniquecode", "%MerchantUniqueCode%");
        var response = await client.GetAsync("{{Private Base Address}}/api/paywall/private/query");
        var responseString = await response.Content.ReadAsStringAsync();
        var responseObject = JsonConvert.DeserializeObject<Response>(responseString);
        Console.WriteLine(responseObject.Body.Paywall.StatusName);
    }

    public class Response
    {
        public int ErrorCode { get; set; }
        public bool Result { get; set; }
        public string Message { get; set; }
        public Body Body { get; set; }
    }

    public class Body
    {
        public Paywall Paywall { get; set; }
    }

    public class Paywall
    {
        public int PaymentId { get; set; }
        public int ActivityId { get; set; }
        public bool Status { get; set; }
        public string StatusName { get; set; }
        // Define other properties as needed...
    }
}

Servisten dönen cevap:

{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Paywall": {
            "PaymentId": 1903059,
            "ActivityId": 3773167,
            "PaymentGatewayId": 1445,
            "PaymentGatewayName": "ProviderConnectionName",
            "PaymentGatewayProviderName": "ProviderName",
            "AnySuccessPayment": true,
            "AnySuccessRefund": true,
            "AnySuccessPartialRefund": false,
            "AnySuccessCancel": false,
            "Status": true,
            "StatusName": "Başarılı",
            "StatusId": 4,
            "TypeName": "İade",
            "TypeId": 2,
            "Installment": 1,
            "CurrencyId": 1,
            "CurrencyName": "TRY",
            "PaymentMethodId": 2,
            "PaymentMethodName": null,
            "PaymentChannelId": 0,
            "PaymentChannelName": null,
            "PaymentTagId": 0,
            "PaymentTagName": null,
            "CardNumber": "415565******6111",
            "CardOwnerName": "Qnb Finansbank",
            "CardBankName": "FİNANS BANK A.Ş.",
            "CardBrandName": "Visa",
            "CardTypeName": "Credit",
            "CardFamilyName": "Cardfinans",
            "LastActivityDateTime": "2024-05-14T22:19:34.8822565",
            "PaymentAmount": 5.44,
            "ActivityAmount": 5.44,
            "IP": "::1",
            "AppliedInterest": false,
            "InterestRate": 0.00,
            "CommissionRate": 0.00,
            "OriginalAmount": 5.44,
            "InterestAmount": 0.00,
            "CommissionAmount": 0.00
        }
    }
}

Last updated