Akbank Sanal Pos
Akbank, Asseco Nestpay altyapısını kullanır. İş Bankası ile aynı entegrasyon yapısına sahiptir, sadece client_id ve store_key değerleri farklıdır.
API Bilgileri
- Test URL: https://entegrasyon.asseco-see.com.tr/fim/est3Dgate
- Canlı URL: https://www.sanalakpos.com/fim/est3Dgate
1. Akbank Yapılandırması
$config = [
'client_id' => 'AKXXXXXXX',
'username' => 'AKXXXXXXX',
'password' => 'AKBANK123',
'store_key' => 'AKXXXXXXXXXXXXXXX',
'store_type' => '3d_pay',
'base_url' => 'https://www.sanalakpos.com/fim/est3Dgate',
'api_url' => 'https://www.sanalakpos.com/fim/api',
];
2. Ödeme Sınıfı
class AkbankPayment {
private $config;
public function __construct($config) {
$this->config = $config;
}
public function createHash($order_id, $amount, $urls) {
$str = $this->config['client_id']
. $order_id . $amount
. $urls['ok'] . $urls['fail']
. 'Auth' . microtime()
. $this->config['store_key'];
return base64_encode(
sha1($str, true)
);
}
public function refund($order_id, $amount) {
$xml = '<CC5Request>
<Name>' . $this->config['username'] . '</Name>
<Password>' . $this->config['password'] . '</Password>
<ClientId>' . $this->config['client_id'] . '</ClientId>
<Type>Credit</Type>
<OrderId>' . $order_id . '</OrderId>
<Total>' . $amount . '</Total>
<Currency>949</Currency>
</CC5Request>';
return $this->sendXml($xml);
}
}