Payturk entegrasyonu yapılacaktır
2
●116
- 01-05-2023, 04:40:37Bu örneği incelemenizi öneririm.
<% ' Payturk API bilgileri Dim api_key, api_secret, amount, order_id api_key = "API_ANAHTARINIZ" api_secret = "API_ŞİFRENİZ" ' Ödeme bilgileri amount = "100.00" order_id = "12345" ' Payturk API URL url = "https://api.payturk.com.tr/v2/transactions" ' İstek için gerekli verileri hazırla data = "api_key=" & api_key & "&api_secret=" & api_secret & "&amount=" & amount & "&order_id=" & order_id ' POST isteği gönder Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP") xmlHttp.Open "POST", url, False xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlHttp.Send data ' Yanıtı işle responseText = xmlHttp.responseText Set xmlHttp = Nothing ' Yanıtı parse etmek için örneğin bir JSON kütüphanesi kullanabilirsiniz. ' Yanıtta ödeme işleminin başarılı olup olmadığı, işlem numarası ve diğer detaylar yer alır. %>