<?php /** * Created by PhpStorm. * User: ufuk Özarslan * Date: 02.08.2014 * Time: 16:56 * Email: phpyazilim@outlook.com */ require_once 'class.sanalpos.php'; $sanalpos = new SanalPOS(); $name = "XXXXXXXX"; //İş yeri kullanic adi $password = "******"; //İş yeri sifresi $storekey = "XXXX"; $url = "https://sunucu_adresi/apiserver_path"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="tr"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Sanal POS Dönen Değerler</title> </head> <body> <div style="background: lightblue;"> <?php $data = $sanalpos->estModelProces($storekey, $name, $password, $url); if ($data['Response'] == 'Approved') {
* $amount = Yapılan İşlem tutarı * $oid = Yapılan işlem numarası, sizdeki sisteme kaydetmek için düşünülmüş birşey * $okUrl = İşlem yapıldığında yönlenecek adres * $failUrl = İşlem yapılmadığında yönlenilecek adres * $storeKey = İş yeri ayiraci (is yeri anahtari) * $rand = İşlemin micro zamanı * */ $clientId = 111111111; $amount = 1.0; $oid = 'I' . rand(2, 99999); $okUrl = 'http://localhost/return.php'; $failUrl = 'http://localhost/return.php'; $storeKey = '5456456454564156563'; $rand = microtime(); $sanalpos = new SanalPOS(); $hash = $sanalpos->estModelHash($clientId, $amount, $oid, $okUrl, $failUrl, $storeKey, $rand); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="tr"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Sanal POS Entegrasyon</title> </head> <body> <h2 style="text-align: center">Sanal POS Entegrasyonu Nasıl Yapılır ?</h2> <div style="text-align: center; background: #f4f4f4; border-left: 8px solid #ddd; display: block; padding: 10px 10px"> <ul style="list-style-type: none">