VakıfBank VPOS
VakıfBank, kendi geliştirdiği VPOS (Virtual POS) altyapısını kullanır. 3D Secure işlemler için MPI (Merchant Plug-In) tescil adımı ve ardından Provision (ödeme onaylama) adımı gerekir.
API Bilgileri
- 3D Tescil URL: https://3dsecuretest.vakifbank.com.tr/MPIAPI/MPI_Enrollment.aspx
- Provision URL: https://onlineodemetest.vakifbank.com.tr/VirtualPOS.Gateway/Home
1. MPI Tescil (3D Secure Başlatma)
$merchant_id = '000100000013506';
$merchant_pass = 'VP999999';
$pan = '4938460158754205';
$expiry = '2911';
$amount = '100.00';
$verify_url = 'https://siteniz.com/odeme/verify';
$mpi_data = [
'Pan' => $pan,
'ExpiryDate' => $expiry,
'PurchaseAmount' => $amount,
'Currency' => '949',
'BrandName' => '100',
'VerifyEnrollmentRequestId' => uniqid(),
'MerchantId' => $merchant_id,
'MerchantPassword' => $merchant_pass,
'SuccessUrl' => $verify_url,
'FailureUrl' => $verify_url,
];
$ch = curl_init('https://3dsecuretest.vakifbank.com.tr/MPIAPI/MPI_Enrollment.aspx');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($mpi_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
2. Provision (Ödeme Onaylama)
$provision = [
'MerchantId' => $merchant_id,
'Password' => $merchant_pass,
'TransactionType' => 'Sale',
'CurrencyAmount' => $amount,
'CurrencyCode' => '949',
'Pan' => $pan,
'Expiry' => $expiry,
'Cvv' => '000',
'ECI' => $_POST['Eci'],
'CAVV' => $_POST['Cavv'],
'TransactionId' => uniqid('VKF-'),
'ClientIp' => $_SERVER['REMOTE_ADDR'],
];
$ch = curl_init('https://onlineodemetest.vakifbank.com.tr/VirtualPOS.Gateway/Home');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($provision));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);