Skip to content

Commit

Permalink
docs: added comments into docs and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mustapayev committed Feb 1, 2025
1 parent 2f82098 commit c65e037
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
5 changes: 5 additions & 0 deletions docs/THREED-PAYMENT-EXAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ try {
$paymentModel,
$transactionType,
$card,
/**
* MODEL_3D_SECURE veya MODEL_3D_PAY ödemelerde kredi kart verileri olmadan
* form verisini oluşturmak için true yapabilirsiniz.
* Yine de bazı gatewaylerde kartsız form verisi oluşturulamıyor.
*/
false
);
} catch (\InvalidArgumentException $e) {
Expand Down
5 changes: 5 additions & 0 deletions docs/THREED-SECURE-AND-PAY-PAYMENT-IN-MODALBOX-EXAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ try {
$paymentModel,
$transactionType,
$card,
/**
* MODEL_3D_SECURE veya MODEL_3D_PAY ödemelerde kredi kart verileri olmadan
* form verisini oluşturmak için true yapabilirsiniz.
* Yine de bazı gatewaylerde kartsız form verisi oluşturulamıyor.
*/
false
);
} catch (\InvalidArgumentException $e) {
Expand Down
6 changes: 5 additions & 1 deletion examples/_common-codes/3d-host/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@
});

try {
$formData = $pos->get3DFormData($order, PosInterface::MODEL_3D_HOST, $transaction);
$formData = $pos->get3DFormData(
$order,
PosInterface::MODEL_3D_HOST,
$transaction
);
} catch (\LogicException $e) {
// ödeme modeli veya işlem tipi desteklenmiyorsa bu exception'i alırsınız.
dd($e);
Expand Down
13 changes: 12 additions & 1 deletion examples/_common-codes/3d/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,18 @@ function (RequestDataPreparedEvent $requestDataPreparedEvent): void {
// ============================================================================================

try {
$formData = $pos->get3DFormData($order, $paymentModel, $transaction, $card, false);
$formData = $pos->get3DFormData(
$order,
$paymentModel,
$transaction,
$card,
/**
* MODEL_3D_SECURE veya MODEL_3D_PAY ödemelerde kredi kart verileri olmadan
* form verisini oluşturmak için true yapabilirsiniz.
* Yine de bazı gatewaylerde kartsız form verisi oluşturulamıyor.
*/
false
);
} catch (\InvalidArgumentException $e) {
// örneğin kart bilgisi sağlanmadığında bu exception'i alırsınız.
dd($e);
Expand Down
2 changes: 1 addition & 1 deletion examples/_templates/_credit_card_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<label for="year">Expire Year</label>
<select name="year" id="year" class="form-select input-lg">
<option value="">Year</option>
<?php for ($i = date('Y'); $i <= date('Y') + 20; $i++) : ?>
<?php for ($i = date('Y'); $i <= date('Y') + 30; $i++) : ?>
<option value="<?= $i; ?>" <?= $i == $card->getExpireYear('Y') ? 'selected': null ?>><?= $i; ?></option>
<?php endfor; ?>
</select>
Expand Down
10 changes: 5 additions & 5 deletions examples/_templates/_render_payment_response.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
</dl>
<hr>
<dl class="row">
<dt class="col-sm-3">RetRefNum (iade, iptal, durum soruglama icin kullnilacak numara):</dt>
<dt class="col-sm-3">RetRefNum <small>(iade, iptal, durum sorgulama icin kullanilacak numara)</small>:</dt>
<dd class="col-sm-9"><?= $response['ref_ret_num'] ?: '-'; ?></dd>
</dl>
<hr>
<dl class="row">
<dt class="col-sm-3">ProcReturnCode:</dt>
<dd class="col-sm-9"><?= $response['proc_return_code'] ?: '-'; ?></dd>
<dt class="col-sm-3">Transaction ID <small>(iade, iptal, durum sorgulama icin kullanilacak numara)</small>:</dt>
<dd class="col-sm-9"><?= $response['transaction_id'] ?: '-'; ?></dd>
</dl>
<hr>
<dl class="row">
<dt class="col-sm-3">Transaction ID:</dt>
<dd class="col-sm-9"><?= $response['transaction_id'] ?: '-'; ?></dd>
<dt class="col-sm-3">ProcReturnCode:</dt>
<dd class="col-sm-9"><?= $response['proc_return_code'] ?: '-'; ?></dd>
</dl>
<hr>
<dl class="row">
Expand Down

0 comments on commit c65e037

Please sign in to comment.