-
-
+
+
+
+ + {{ __('All purchases you make on this site are protected with 256 bit SSL..') }} +
+
+
+
+
+
diff --git a/src/Http/Controllers/PayTrController.php b/src/Http/Controllers/PayTrController.php
index f5d4bba..9a555c2 100644
--- a/src/Http/Controllers/PayTrController.php
+++ b/src/Http/Controllers/PayTrController.php
@@ -66,9 +66,11 @@ public function webhook(Request $request)
//# 3) 1. ADIM'da gönderilen payment_amount sipariş tutarı taksitli alışveriş yapılması durumunda
//# değişebilir. Güncel tutarı $post['total_amount'] değerinden alarak muhasebe işlemlerinizde kullanabilirsiniz.
+ $currency = $request['currency'] == 'TL' ? 'TRY' : $request['currency'];
+
do_action(PAYMENT_ACTION_PAYMENT_PROCESSED, [
'amount' => $request['total_amount'] / 100,
- 'currency' => $request['currency'],
+ 'currency' => $currency,
'charge_id' => $chargeId = $request['merchant_oid'],
'payment_channel' => PAYTR_PAYMENT_METHOD_NAME,
'status' => PaymentStatusEnum::COMPLETED,
diff --git a/src/Models/Currency.php b/src/Models/Currency.php
index 5596397..8271fef 100644
--- a/src/Models/Currency.php
+++ b/src/Models/Currency.php
@@ -5,6 +5,7 @@
class Currency
{
public const TL = 'TL';
+ public const TRY = 'TRY';
public const EUR = 'EUR';
public const USD = 'USD';
public const GBP = 'GBP';
diff --git a/src/Providers/HookServiceProvider.php b/src/Providers/HookServiceProvider.php
index bb3778c..8a91fae 100644
--- a/src/Providers/HookServiceProvider.php
+++ b/src/Providers/HookServiceProvider.php
@@ -111,7 +111,7 @@ public function boot(): void
$testMode = get_payment_setting('sandbox', PAYTR_PAYMENT_METHOD_NAME) ? 1 : 0;
$noInstallment = 0;
$maxInstallment = 0;
- $currency = $paymentData['currency'];
+ $currency = ($paymentData['currency'] == 'TRY' ? 'TL' : $paymentData['currency']);
$hash = sprintf(
'%s%s%s%s%d%s%d%d%s%d',
@@ -137,7 +137,7 @@ public function boot(): void
'payment_amount' => $amount,
'paytr_token' => $token,
'user_basket' => $basket,
- 'debug_on' => 1,
+ 'debug_on' => $testMode,
'no_installment' => $noInstallment,
'max_installment' => $maxInstallment,
'currency' => $currency,
@@ -157,9 +157,9 @@ public function boot(): void
$data['message'] = $response['reason'];
return $data;
- }
-
- echo view('plugins/paytr::paytr', [
+ }
+
+ echo view('plugins/paytr::paytr', [
'token' => $response['token'],
]);
diff --git a/src/Services/Gateways/PayTrPaymentService.php b/src/Services/Gateways/PayTrPaymentService.php
index aba79f4..77e1f72 100644
--- a/src/Services/Gateways/PayTrPaymentService.php
+++ b/src/Services/Gateways/PayTrPaymentService.php
@@ -20,6 +20,7 @@ public function supportedCurrencyCodes(): array
{
return [
Currency::TL,
+ Currency::TRY,
Currency::EUR,
Currency::USD,
Currency::GBP,
+
-
@php
$logo = theme_option('logo_in_the_checkout_page') ?: theme_option('logo');
@endphp
-
+
@if ($logo)
-
+
-
-
-
-
-
- +
+
+
@endif
-
-
-
- - Bu sitede yapacağınız tüm alışverişler 256 bit SSL ile korunmaktadır. -
+
+
-
+