migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
@extends('Gateways::layouts.master')
@section('content')
<h1>Hello World</h1>
<p>
This view is loaded from module: {!! config('Gateways.name') !!}
</p>
@endsection

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Module Gateways</title>
</head>
<body>
@yield('content')
</body>
</html>

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Configuration</title>
@stack('css')
</head>
<body>
@yield('payment')
<script src="{{asset('public/assets/modules/select2/select2.min.js')}}"></script>
@stack('script_2')
</body>
</html>

View File

@@ -0,0 +1,227 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<title>
@yield('title')
</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css"
href="{{ asset('public/assets/modules/payment/mercado_pogo/css/bootstrap.min.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('public/assets/modules/payment/mercado_pogo/css/index.css') }}">
<script src="{{ asset('assets/admin-module/js/jquery-3.6.0.min.js') }}"></script>
<script src="https://sdk.mercadopago.com/js/v2"></script>
</head>
<body>
<main>
<!-- Hidden input to store your integration public key -->
<input type="hidden" id="mercado-pago-public-key" value="{{ $config->public_key }}">
<!-- Payment -->
<section class="payment-form dark">
<div class="container__payment">
<div class="block-heading">
<h2>Card Payment</h2>
<!-- <p>This is an example of a Mercado Pago integration</p> -->
</div>
<div class="form-payment">
<div class="products">
<p class="alert alert-danger d-none" role="alert" id="error_alert"></p>
<div class="total">Amount to be paid {{ $data->currency_code }}<span
class="price">{{ $data->payment_amount }}</span></div>
</div>
<div class="payment-details">
<form id="form-checkout">
<h3 class="title">Buyer Details</h3>
<div class="row">
<div class="form-group col">
<input id="form-checkout__cardholderEmail" name="cardholderEmail" type="email"
class="form-control" />
</div>
</div>
<div class="row">
<div class="form-group col-sm-5">
<select id="form-checkout__identificationType" name="identificationType"
class="form-control"></select>
</div>
<div class="form-group col-sm-7">
<input id="form-checkout__identificationNumber" name="docNumber" type="text"
class="form-control" />
</div>
</div>
<br>
<h3 class="title">Card Details</h3>
<div class="row">
<div class="form-group col-sm-8">
<input id="form-checkout__cardholderName" name="cardholderName" type="text"
class="form-control" />
</div>
<div class="form-group col-sm-4">
<div class="input-group expiration-date">
<input id="form-checkout__cardExpirationMonth" name="cardExpirationMonth"
type="text" class="form-control" />
<span class="date-separator">/</span>
<input id="form-checkout__cardExpirationYear" name="cardExpirationYear"
type="text" class="form-control" />
</div>
</div>
<div class="form-group col-sm-8">
<input id="form-checkout__cardNumber" name="cardNumber" type="text"
class="form-control" />
</div>
<div class="form-group col-sm-4">
<input id="form-checkout__securityCode" name="securityCode" type="text"
class="form-control" />
</div>
<div id="issuerInput" class="form-group col-sm-12 hidden">
<select id="form-checkout__issuer" name="issuer" class="form-control"></select>
</div>
<div class="form-group col-sm-12">
<select id="form-checkout__installments" name="installments" type="text"
class="form-control"></select>
</div>
<div class="form-group col-sm-12">
<br>
<button id="form-checkout__submit" type="submit"
class="btn btn--primary btn-block">Pay</button>
<br>
<p id="loading-message">Loading, please wait...</p>
<br>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
</main>
</body>
<script>
"use strict";
const publicKey = document.getElementById("mercado-pago-public-key").value;
const mercadopago = new MercadoPago(publicKey);
loadCardForm();
function loadCardForm() {
const productCost = '{{ $data->payment_amount }}';
const cardForm = mercadopago.cardForm({
amount: productCost,
autoMount: true,
form: {
id: "form-checkout",
cardholderName: {
id: "form-checkout__cardholderName",
placeholder: "Card holder name",
},
cardholderEmail: {
id: "form-checkout__cardholderEmail",
placeholder: "Card holder email",
},
cardNumber: {
id: "form-checkout__cardNumber",
placeholder: "Card number",
},
cardExpirationMonth: {
id: "form-checkout__cardExpirationMonth",
placeholder: "MM",
},
cardExpirationYear: {
id: "form-checkout__cardExpirationYear",
placeholder: "YY",
},
securityCode: {
id: "form-checkout__securityCode",
placeholder: "Security code",
},
installments: {
id: "form-checkout__installments",
placeholder: "Installments",
},
identificationType: {
id: "form-checkout__identificationType",
},
identificationNumber: {
id: "form-checkout__identificationNumber",
placeholder: "Identification number",
},
issuer: {
id: "form-checkout__issuer",
placeholder: "Issuer",
},
},
callbacks: {
onFormMounted: error => {
if (error)
return console.warn("Form Mounted handling error: ", error);
},
onSubmit: event => {
event.preventDefault();
document.getElementById("loading-message").style.display = "block";
const {
paymentMethodId,
issuerId,
cardholderEmail: email,
amount,
token,
installments,
identificationNumber,
identificationType,
} = cardForm.getCardFormData();
fetch("{{ route('mercadopago.make_payment', ['payment_id' => $data->id]) }}", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-TOKEN": "{{ csrf_token() }}"
},
body: JSON.stringify({
token,
issuerId,
paymentMethodId,
transactionAmount: Number(amount),
installments: Number(installments),
payer: {
email,
identification: {
type: identificationType,
number: identificationNumber,
},
},
}),
})
.then(response => {
return response.json();
})
.then(result => {
if (result.error) {
document.getElementById("loading-message").style.display = "none";
document.getElementById("error_alert").innerText = result.error;
document.getElementById("error_alert").style.display = "block";
return false;
}
location.href = '{{ route('payment-success') }}';
})
.catch(error => {
document.getElementById("loading-message").style.display = "none";
document.getElementById("error_alert").innerHtml = error;
document.getElementById("error_alert").style.display = "block";
});
},
onFetching: (resource) => {
const payButton = document.getElementById("form-checkout__submit");
payButton.setAttribute('disabled', true);
return () => {
payButton.removeAttribute("disabled");
};
},
},
});
}
</script>
</html>

View File

@@ -0,0 +1,38 @@
@extends('payment.layouts.master')
@push('script')
@endpush
@section('content')
<center>
<div class="loader"></div>
</center>
<form method="POST" action="{!! route('paystack.payment', ['token' => $data->id]) !!}" accept-charset="UTF-8" class="form-horizontal" role="form">
@csrf
<div class="row">
<div class="col-md-8 col-md-offset-2">
<input type="hidden" name="email"
value="{{ $payer->email != null ? $payer->email : 'required@email.com' }}">
{{-- required --}}
<input type="hidden" name="orderID" value="{{ $data->attribute_id }}">
<input type="hidden" name="amount" value="{{ $data->payment_amount * 100 }}"> {{-- required in kobo --}}
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="currency" value="{{ $data->currency_code }}">
<input type="hidden" name="metadata" value="{{ json_encode($array = ['key_name' => 'value']) }}">
{{-- For other necessary things you want to add to your payload. it is optional though --}}
<input type="hidden" name="reference" value="{{ $reference }}"> {{-- required --}}
<button class="btn btn-block d-none" id="pay-button" type="submit"></button>
</div>
</div>
</form>
<script type="text/javascript">
"use strict";
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("pay-button").click();
});
</script>
@endsection

View File

@@ -0,0 +1,28 @@
@extends('payment.layouts.master')
@push('script')
@endpush
@section('content')
<center>
<div class="loader"></div>
</center>
<form method="post" action="<?php echo \Illuminate\Support\Facades\Config::get('paytm_config.PAYTM_TXN_URL'); ?>" id="form">
<table border="1">
<tbody>
@foreach ($paramList as $name => $value)
<input type="hidden" name="{{ $name }}" value="{{ $value }}">
@endforeach
<input type="hidden" name="CHECKSUMHASH" value="{{ $checkSum }}">
</tbody>
</table>
</form>
<script type="text/javascript">
"use strict";
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("form").submit();
});
</script>
@endsection

View File

@@ -0,0 +1,51 @@
@extends('payment.layouts.master')
@push('script')
<style>
.razorpay-cancel-button {
border: 1px solid #0000008c;
border-radius: 2px;
margin: 0;
font-size: 14px;
padding: .125rem 1rem;
}
.d-none {
display: none;
}
</style>
@endpush
@section('content')
<center>
<div class="loader"></div>
</center>
<form action="{!! route('razor-pay.payment', ['payment_id' => $data->id]) !!}" id="form" method="POST">
@csrf
<script src="https://checkout.razorpay.com/v1/checkout.js" data-key="{{ config()->get('razor_config.api_key') }}"
data-amount="{{ round($data->payment_amount, 2) * 100 }}"
data-buttontext="Pay {{ round($data->payment_amount, 2) . ' ' . $data->currency_code }}"
data-name="{{ $business_name ?? '' }}" data-description="{{ $data->payment_amount }}"
data-image="{{ $business_logo ?? '' }}" data-prefill.name="{{ $payer->name ?? '' }}"
data-prefill.email="{{ $payer->email ?? '' }}" data-prefill.contact="{{ $payer->phone ?? '' }}"
data-callback_url="{{ route('razor-pay.callback', ['payment_data' => base64_encode($data->id)]) }}"
data-theme.color="#ff7529"></script>
<button class="btn btn-block d-none" id="pay-button" type="submit"></button>
<button class="razorpay-cancel-button" type="button" id="cancel-button" onclick="handleCancel()">Cancel</button>
</form>
@push('script')
<script type="text/javascript">
"use strict";
document.addEventListener("DOMContentLoaded", function() {
document.getElementById("pay-button").click();
});
function handleCancel() {
window.location.href = '{{ route('razor-pay.cancel', ['payment_id' => $data->id]) }}';
}
</script>
@endpush
@endsection

View File

@@ -0,0 +1,35 @@
@extends('payment.layouts.master')
@push('script')
<script src="https://polyfill.io/v3/polyfill.min.js?version=3.52.1&features=fetch"></script>
<script src="https://js.stripe.com/v3/"></script>
@endpush
@section('content')
<center>
<div class="loader"></div>
</center>
<script type="text/javascript">
"use strict";
// Create an instance of the Stripe object with your publishable API key
let stripe = Stripe('{{ $config->published_key }}');
document.addEventListener("DOMContentLoaded", function() {
fetch("{{ url("payment/stripe/token/?payment_id={$data->id}") }}", {
method: "GET",
}).then(function(response) {
return response.text();
}).then(function(session) {
return stripe.redirectToCheckout({
sessionId: JSON.parse(session).id
});
}).then(function(result) {
if (result.error) {
alert(result.error.message);
}
}).catch(function(error) {
console.error("error:", error);
});
});
</script>
@endsection