-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from nuryagdym/master
Vakifbank VPOS eklendi
- Loading branch information
Showing
86 changed files
with
4,326 additions
and
2,268 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ YapıKredi Posnet sistemi 3D ödeme çalışmaktadır, fakat `cancel`, `refund` | |
|
||
Finansbank'ın PayFor sanal pos sistemini desteklemektedir, Finansbank'ın IP kısıtlaması olmadığı için localhost'ta test `examples` klasöründeki örnek kodları çalıştırabilirsiniz. | ||
|
||
VakifBank GET 7/24 MPI ve VPOS 7/24 eklendi ama test ortami olmadigi icin test edilemedi, gelen geri donuslere gore hatalar giderilecek. | ||
> EST altyapısında olan Akbank, TEB ve Ziraat bankası test edilmiştir. | ||
### Özellikler | ||
|
@@ -82,7 +83,7 @@ $order = [ | |
'name' => 'John Doe', // zorunlu değil | ||
'email' => '[email protected]', // zorunlu değil | ||
'user_id' => '12', // zorunlu değil | ||
'amount' => (double) 20, // Sipariş tutarı | ||
'amount' => (float) 20, // Sipariş tutarı | ||
'installment' => '0', | ||
'currency' => 'TRY', | ||
'ip' => $ip, | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,46 @@ | ||
<?php | ||
|
||
use Mews\Pos\Entity\Card\CreditCardEstPos; | ||
use Mews\Pos\Gateways\AbstractGateway; | ||
use Mews\Pos\Gateways\EstPos; | ||
use Symfony\Component\HttpFoundation\RedirectResponse; | ||
|
||
require '_config.php'; | ||
|
||
require '../../template/_header.php'; | ||
|
||
if ($request->getMethod() !== 'POST') { | ||
echo new \Symfony\Component\HttpFoundation\RedirectResponse($baseUrl); | ||
echo new RedirectResponse($baseUrl); | ||
exit(); | ||
} | ||
|
||
$orderId = date('Ymd') . strtoupper(substr(uniqid(sha1(time())),0,4)); | ||
$orderId = date('Ymd').strtoupper(substr(uniqid(sha1(time())), 0, 4)); | ||
|
||
$amount = (double) 32.0; | ||
$instalment = '0'; | ||
$amount = (float) 32.0; | ||
$installment = '0'; | ||
|
||
$success_url = $baseUrl . 'response.php'; | ||
$fail_url = $baseUrl . 'response.php'; | ||
$successUrl = $baseUrl.'response.php'; | ||
$failUrl = $baseUrl.'response.php'; | ||
|
||
$rand = microtime(); | ||
|
||
$order = [ | ||
'id' => $orderId, | ||
'email' => '[email protected]', // optional | ||
'name' => 'John Doe', // optional | ||
'amount' => $amount, | ||
'installment' => $instalment, | ||
'currency' => 'TRY', | ||
'ip' => $ip, | ||
'success_url' => $success_url, | ||
'fail_url' => $fail_url, | ||
'lang' => \Mews\Pos\Gateways\EstPos::LANG_TR, | ||
'rand' => $rand, | ||
'id' => $orderId, | ||
'email' => '[email protected]', // optional | ||
'name' => 'John Doe', // optional | ||
'amount' => $amount, | ||
'installment' => $installment, | ||
'currency' => 'TRY', | ||
'ip' => $ip, | ||
'success_url' => $successUrl, | ||
'fail_url' => $failUrl, | ||
'lang' => EstPos::LANG_TR, | ||
'rand' => $rand, | ||
]; | ||
|
||
$redis->lPush('order', json_encode($order)); | ||
|
||
$card = new \Mews\Pos\Entity\Card\CreditCardEstPos( | ||
$card = new CreditCardEstPos( | ||
$request->get('number'), | ||
$request->get('year'), | ||
$request->get('month'), | ||
|
@@ -44,20 +49,20 @@ | |
$request->get('type') | ||
); | ||
|
||
$pos->prepare($order, \Mews\Pos\Gateways\AbstractGateway::TX_PAY, $card); | ||
$pos->prepare($order, AbstractGateway::TX_PAY, $card); | ||
|
||
$form_data = $pos->get3DFormData(); | ||
$formData = $pos->get3DFormData(); | ||
?> | ||
|
||
<form method="post" action="<?php echo $form_data['gateway']; ?>" class="redirect-form" role="form"> | ||
<?php foreach ($form_data['inputs'] as $key => $value): ?> | ||
<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>"> | ||
<?php endforeach; ?> | ||
<div class="text-center">Redirecting...</div> | ||
<hr> | ||
<div class="form-group text-center"> | ||
<button type="submit" class="btn btn-lg btn-block btn-success">Submit</button> | ||
</div> | ||
</form> | ||
|
||
<?php require '../../template/_footer.php'; ?> | ||
<form method="post" action="<?= $formData['gateway']; ?>" class="redirect-form" role="form"> | ||
<?php foreach ($formData['inputs'] as $key => $value) : ?> | ||
<input type="hidden" name="<?= $key; ?>" value="<?= $value; ?>"> | ||
<?php endforeach; ?> | ||
<div class="text-center">Redirecting...</div> | ||
<hr> | ||
<div class="form-group text-center"> | ||
<button type="submit" class="btn btn-lg btn-block btn-success">Submit</button> | ||
</div> | ||
</form> | ||
|
||
<?php require '../../template/_footer.php'; |
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
Oops, something went wrong.