Last active
July 7, 2022 14:12
-
-
Save umutyerebakmaz/19c32fd17d40e4329f8e8fb395c7ce7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="POST" action="https://vpos.qnbfinansbank.com/Gateway/Default.aspx" | |
class="space-y-6"> | |
<input type="hidden" name="MbrId" value="{{ $payfor3D->MbrId }}"> | |
<input type="hidden" name="MerchantID" value="{{ $payfor3D->MerchantID }}"> | |
<input type="hidden" name="UserCode" value="{{ $payfor3D->UserCode }}"> | |
<input type="hidden" name="UserPass" value="{{ $payfor3D->UserPass }}"> | |
<input type="hidden" name="SecureType" value="{{ $payfor3D->SecureType }}"> | |
<input type="hidden" name="TxnType" value="{{ $payfor3D->TxnType }}"> | |
<input type="hidden" name="InstallmentCount" value="{{ $payfor3D->InstallmentCount }}"> | |
<input type="hidden" name="Currency" value="{{ $payfor3D->Currency }}"> | |
<input type="hidden" name="OkUrl" value="{{ $payfor3D->OkUrl }}"> | |
<input type="hidden" name="FailUrl" value="{{ $payfor3D->FailUrl }}"> | |
<input type="hidden" name="OrderId" value="{{ $payfor3D->OrderId }}"> | |
<input type="hidden" name="PurchAmount" value="{{ $payfor3D->PurchAmount }}"> | |
<input type="hidden" name="Lang" value="{{ $payfor3D->Lang }}"> | |
<input type="hidden" name="Rnd" value="{{ $payfor3D->rnd }}"> | |
<input type="hidden" name="Hash" value="{{ $payfor3D->hash }}"> | |
<div> | |
<label for="card-number" class="block text-sm font-medium text-gray-700"> | |
KART NUMARASI | |
</label> | |
<div class="mt-1"> | |
<x-input id="pan" name="Pan" type="text" value="{{ old('Pan', '4155650100416111') }}" | |
required></x-input> | |
</div> | |
</div> | |
<div> | |
<label for="card-holder-name" class="block text-sm font-medium text-gray-700"> | |
KART SAHİBİ | |
</label> | |
<div class="mt-1"> | |
<x-input id="card-holder-name" name="CardHolderName" type="text" | |
value="{{ old('CardHolderName', 'UMUT YEREBAKMAZ') }}" required></x-input> | |
</div> | |
</div> | |
<div class="grid grid-cols-2 gap-4"> | |
<div> | |
<label for="expiry" class="block text-sm font-medium text-gray-700"> | |
SON KULLANMA TARİHİ (AAYY) | |
</label> | |
<div class="mt-1"> | |
<x-input id="expiry" name="Expiry" type="text" value="{{ old('Expiry', '0125') }}" | |
required></x-input> | |
</div> | |
</div> | |
<div> | |
<label for="cvv2" class="block text-sm font-medium text-gray-700"> | |
GÜVENLİK KODU (CVV) | |
</label> | |
<div class="mt-1"> | |
<x-input id="cvv2" name="Cvv2" maxlength="4" type="text" | |
value="{{ old('Cvv2', '123') }}" required></x-input> | |
</div> | |
</div> | |
</div> | |
<div class="flex items-center justify-between"> | |
<x-buttons.secondary-md> | |
Ödeme Yap | |
</x-buttons.secondary-md> | |
</div> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Classes; | |
class Payfor3D | |
{ | |
public string $MbrId = '5'; | |
public string $MerchantID = '085300000009704'; | |
public string $MerchantPass = '12345678'; | |
public string $UserCode = 'QNB_API_KULLANICI_3DPAY'; | |
public string $UserPass = 'UcBN0'; | |
public string $SecureType = '3DPay'; | |
public string $TxnType = 'Auth'; | |
public string $InstallmentCount = '0'; | |
public string $PurchAmount = '1'; // must be .00 | |
public string $Currency = '949'; | |
public string $OkUrl = 'https://vpostest.qnbfinansbank.com/Gateway/3DHost.aspx'; | |
public string $FailUrl = 'https://vpostest.qnbfinansbank.com/Gateway/3DHost.aspx '; | |
public string $OrderId = 'PP1'; | |
public string $Lang = 'TR'; | |
public string $rnd = ''; | |
public string $hash = ''; | |
public function __construct() | |
{ | |
$this->hash(); | |
} | |
private function hash() | |
{ | |
$microtime = microtime(); | |
$this->rnd = preg_replace('/(0)\.(\d+) (\d+)/', '$3$1$2', $microtime); | |
$hashtr = $this->MbrId . $this->OrderId . $this->PurchAmount . $this->OkUrl . $this->FailUrl . | |
$this->TxnType . $this->InstallmentCount . $this->rnd . $this->MerchantPass; | |
$this->hash = base64_encode(pack('H*', sha1($hashtr))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment