updated
This commit is contained in:
@@ -30,7 +30,7 @@ class PaypalController extends Controller
|
|||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$paypal_env = "live";
|
$paypal_env = "sandbox";
|
||||||
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
$paypal_apiUrl = 'https://api.paypal.com'; // default
|
||||||
|
|
||||||
if ($paypal_env == 'live') {
|
if ($paypal_env == 'live') {
|
||||||
@@ -240,7 +240,7 @@ class PaypalController extends Controller
|
|||||||
$transaction->setInvoiceNumber(date('Ymd') . '-' . $invoice_num);
|
$transaction->setInvoiceNumber(date('Ymd') . '-' . $invoice_num);
|
||||||
|
|
||||||
$redirectUrls = PayPal::RedirectUrls();
|
$redirectUrls = PayPal::RedirectUrls();
|
||||||
$redirectUrls->setReturnUrl(route('getDone'));
|
$redirectUrls->setReturnUrl(route('thank-you-for-your-purchase'));
|
||||||
$redirectUrls->setCancelUrl(route('getCancel'));
|
$redirectUrls->setCancelUrl(route('getCancel'));
|
||||||
// var_dump($shippingAddress)
|
// var_dump($shippingAddress)
|
||||||
|
|
||||||
@@ -600,7 +600,7 @@ class PaypalController extends Controller
|
|||||||
$request->session()->forget('cartkey'); // clear session for cartkey
|
$request->session()->forget('cartkey'); // clear session for cartkey
|
||||||
|
|
||||||
// redirect to thank you page.
|
// redirect to thank you page.
|
||||||
return view('paypal.get_done')
|
return view('paypal.payment_success')
|
||||||
->with('currency', $currency)
|
->with('currency', $currency)
|
||||||
->with('total', $total);
|
->with('total', $total);
|
||||||
} else {
|
} else {
|
||||||
@@ -632,6 +632,11 @@ class PaypalController extends Controller
|
|||||||
// var_dump($obj->transactions[0]->item_list->shipping_address);
|
// var_dump($obj->transactions[0]->item_list->shipping_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function thankyou()
|
||||||
|
{
|
||||||
|
return view('paypal.payment_success');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function getCancel(Request $request)
|
public function getCancel(Request $request)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -156,11 +156,14 @@ Route::group(['middleware' => 'auth'], function () {
|
|||||||
|
|
||||||
Route::get('payPremium', ['as' => 'payPremium', 'uses' => 'paypal\PaypalController@payPremium']);
|
Route::get('payPremium', ['as' => 'payPremium', 'uses' => 'paypal\PaypalController@payPremium']);
|
||||||
Route::get('getCheckout', ['as' => 'getCheckout', 'uses' => 'paypal\PaypalController@getCheckout']);
|
Route::get('getCheckout', ['as' => 'getCheckout', 'uses' => 'paypal\PaypalController@getCheckout']);
|
||||||
Route::get('getDone', ['as' => 'getDone', 'uses' => 'paypal\PaypalController@getDone']);
|
// Route::get('getDone', ['as' => 'getDone', 'uses' => 'paypal\PaypalController@getDone']);
|
||||||
|
Route::get('thank-you-for-your-purchase', ['as' => 'thank-you-for-your-purchase', 'uses' => 'paypal\PaypalController@getDone']);
|
||||||
Route::get('getCancel', ['as' => 'getCancel', 'uses' => 'paypal\PaypalController@getCancel']);
|
Route::get('getCancel', ['as' => 'getCancel', 'uses' => 'paypal\PaypalController@getCancel']);
|
||||||
Route::get('getDoneTest', ['as' => 'getDoneTest', 'uses' => 'paypal\PaypalController@getDoneTest']);
|
Route::get('getDoneTest', ['as' => 'getDoneTest', 'uses' => 'paypal\PaypalController@getDoneTest']);
|
||||||
|
|
||||||
// END PAYPAL ROUTES
|
// END PAYPAL ROUTES
|
||||||
});
|
});
|
||||||
|
// Route::get('thank-you-for-your-purchase', 'paypal\PaypalController@thankyou');
|
||||||
|
|
||||||
Route::group(['middleware' => 'admin'], function () {
|
Route::group(['middleware' => 'admin'], function () {
|
||||||
Route::get('admin', function () {
|
Route::get('admin', function () {
|
||||||
|
|||||||
@@ -5,33 +5,20 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div
|
<div id="carouselExampleDark" class="carousel carousel-dark slide" data-bs-ride="carousel">
|
||||||
id="carouselExampleDark"
|
|
||||||
class="carousel carousel-dark slide"
|
|
||||||
data-bs-ride="carousel"
|
|
||||||
>
|
|
||||||
<ol class="carousel-indicators">
|
<ol class="carousel-indicators">
|
||||||
<li
|
<li data-bs-target="#carouselExampleDark" data-bs-slide-to="0" class="active"></li>
|
||||||
data-bs-target="#carouselExampleDark"
|
<li data-bs-target="#carouselExampleDark" data-bs-slide-to="1"></li>
|
||||||
data-bs-slide-to="0"
|
{{-- <li data-bs-target="#carouselExampleDark" data-bs-slide-to="2"></li>
|
||||||
class="active"
|
<li data-bs-target="#carouselExampleDark" data-bs-slide-to="3"></li> --}}
|
||||||
></li>
|
|
||||||
<li
|
|
||||||
data-bs-target="#carouselExampleDark"
|
|
||||||
data-bs-slide-to="1"
|
|
||||||
></li>
|
|
||||||
<li
|
|
||||||
data-bs-target="#carouselExampleDark"
|
|
||||||
data-bs-slide-to="2"
|
|
||||||
></li>
|
|
||||||
<li
|
|
||||||
data-bs-target="#carouselExampleDark"
|
|
||||||
data-bs-slide-to="3"
|
|
||||||
></li>
|
|
||||||
</ol>
|
</ol>
|
||||||
<div class="carousel-inner">
|
<div class="carousel-inner">
|
||||||
<div class="carousel-item active" data-bs-interval="10000">
|
<div class="carousel-item active" data-bs-interval="10000">
|
||||||
<img src="https://crewsportswear.app:5955/merchbay/slider/krut-merch.jpg" class="d-block w-100" alt="...">
|
<a href="">
|
||||||
|
<img src="https://crewsportswear.app:5955/merchbay/slider/krut-merch.jpg"
|
||||||
|
class="d-block w-100" alt="...">
|
||||||
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="carousel-item" data-bs-interval="10000">
|
<!-- <div class="carousel-item" data-bs-interval="10000">
|
||||||
<img src="https://crewsportswear.app:5955/WIPCAPS.jpg" class="d-block w-100" alt="...">
|
<img src="https://crewsportswear.app:5955/WIPCAPS.jpg" class="d-block w-100" alt="...">
|
||||||
@@ -40,31 +27,17 @@
|
|||||||
<img src="https://crewsportswear.app:5955/NINONG.jpg" class="d-block w-100" alt="...">
|
<img src="https://crewsportswear.app:5955/NINONG.jpg" class="d-block w-100" alt="...">
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="carousel-item" data-bs-interval="10000">
|
<div class="carousel-item" data-bs-interval="10000">
|
||||||
|
<a href="">
|
||||||
<img src="https://crewsportswear.app:5955/DRIVE.jpg" class="d-block w-100" alt="...">
|
<img src="https://crewsportswear.app:5955/DRIVE.jpg" class="d-block w-100" alt="...">
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a class="carousel-control-prev" href="#carouselExampleDark" role="button" data-bs-slide="prev">
|
||||||
class="carousel-control-prev"
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||||
href="#carouselExampleDark"
|
|
||||||
role="button"
|
|
||||||
data-bs-slide="prev"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="carousel-control-prev-icon"
|
|
||||||
aria-hidden="true"
|
|
||||||
></span>
|
|
||||||
<span class="visually-hidden">Previous</span>
|
<span class="visually-hidden">Previous</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a class="carousel-control-next" href="#carouselExampleDark" role="button" data-bs-slide="next">
|
||||||
class="carousel-control-next"
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||||
href="#carouselExampleDark"
|
|
||||||
role="button"
|
|
||||||
data-bs-slide="next"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="carousel-control-next-icon"
|
|
||||||
aria-hidden="true"
|
|
||||||
></span>
|
|
||||||
<span class="visually-hidden">Next</span>
|
<span class="visually-hidden">Next</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,13 +61,12 @@
|
|||||||
aria-label="Search Store"
|
aria-label="Search Store"
|
||||||
aria-describedby="basic-addon2"
|
aria-describedby="basic-addon2"
|
||||||
/> --}}
|
/> --}}
|
||||||
<input type="text" class="form-control border-end-0" placeholder="Search Store" value="{{ $keyword }}" name="q">
|
<input type="text" class="form-control border-end-0" placeholder="Search Store"
|
||||||
<input type="hidden" class="form-control border-end-0" placeholder="Search Store" value="latest" name="s">
|
value="{{ $keyword }}" name="q">
|
||||||
<button
|
<input type="hidden" class="form-control border-end-0" placeholder="Search Store"
|
||||||
class="input-group-text bg-white border-start-0"
|
value="latest" name="s">
|
||||||
id="basic-addon2"
|
<button class="input-group-text bg-white border-start-0" id="basic-addon2"><i
|
||||||
><i class="fa fa-search"></i
|
class="fa fa-search"></i></button>
|
||||||
></button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3 added-or">
|
<div class="col-lg-3 added-or">
|
||||||
@@ -117,15 +89,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@foreach ($featured_products as $product)
|
@foreach ($featured_products as $product)
|
||||||
<div
|
<div class="col-lg-2 col-md-3 col-6" v-for="index in 6" :key="index">
|
||||||
class="col-lg-2 col-md-3 col-6"
|
|
||||||
v-for="index in 6"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<div class="text-center p-3">
|
<div class="text-center p-3">
|
||||||
<a href="{{ url('store') . '/' . $product->StoreUrl . '/product/' . $product->ProductURL }}">
|
<a href="{{ url('store') . '/' . $product->StoreUrl . '/product/' . $product->ProductURL }}">
|
||||||
<div class="store-logo">
|
<div class="store-logo">
|
||||||
<img src="{{ config('site_config.images_url') . '/' . $product->Image }}" alt="{{ $product->ProductName }}" class="d-block border shadow-sm">
|
<img src="{{ config('site_config.images_url') . '/' . $product->Image }}"
|
||||||
|
alt="{{ $product->ProductName }}" class="d-block border shadow-sm">
|
||||||
</div>
|
</div>
|
||||||
<div class="store-name text-truncate">{{ $product->ProductName }}</div>
|
<div class="store-name text-truncate">{{ $product->ProductName }}</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
|
|
||||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||||
@@ -92,4 +94,5 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
129
resources/views/paypal/payment_success.blade.php
Normal file
129
resources/views/paypal/payment_success.blade.php
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<!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">
|
||||||
|
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||||
|
<meta name="description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear.">
|
||||||
|
<meta name="keywords" content="custom uniforms, footwear, athletic equipment, sporting goods">
|
||||||
|
<meta name="author" content="Frank John Begornia">
|
||||||
|
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||||
|
|
||||||
|
<meta property="og:url" content="https://merchbay.com" />
|
||||||
|
<meta property="og:type" content="article" />
|
||||||
|
<meta property="og:title" content="Merchbay" />
|
||||||
|
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
|
||||||
|
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||||
|
|
||||||
|
<!-- favicons
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||||
|
<link rel="icon" type="image/png" href="{{asset('public/favicons/favicon-32x32.png')}}" sizes="32x32">
|
||||||
|
<link rel="icon" type="image/png" href="{{asset('public/favicons/favicon-16x16.png')}}" sizes="16x16">
|
||||||
|
<link rel="manifest" href="{{asset('public/favicons/manifest.json')}}">
|
||||||
|
<link rel="mask-icon" href="{{asset('public/favicons/safari-pinned-tab.svg')}}" color="#5bbad5">
|
||||||
|
<meta name="theme-color" content="#ffffff">-->
|
||||||
|
<!-- end favicons -->
|
||||||
|
<title>Merchbay</title>
|
||||||
|
|
||||||
|
<!-- Bootstrap core CSS -->
|
||||||
|
<!-- <link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet"> -->
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||||
|
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Custom styles for this template -->
|
||||||
|
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||||
|
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||||
|
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||||
|
|
||||||
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||||
|
|
||||||
|
<![endif]-->
|
||||||
|
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Social Media Share button
|
||||||
|
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||||
|
|
||||||
|
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.btn-black {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #000000;
|
||||||
|
border-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-black:hover {
|
||||||
|
color: #000000;
|
||||||
|
background-color: transparent;
|
||||||
|
border-color: #000000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container h-100 py-5 text-center">
|
||||||
|
<div class="row align-items-center h-100">
|
||||||
|
<div class="col-6 mx-auto">
|
||||||
|
<div class="jumbotron">
|
||||||
|
<h2> <i class="fa fa-check text-success"></i> Thank you</h2>
|
||||||
|
<h6>
|
||||||
|
Your payment of {{ $total }} {{ $currency }} is complete.
|
||||||
|
</h6>
|
||||||
|
<div class="py-5">
|
||||||
|
<a href="{{ url('/') }}" class="btn btn-black px-5">Shop Again</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Copyright © {{ date('Y') }}, <b>MERCHBAY</b>. All right reserved.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||||
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
|
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> -->
|
||||||
|
<!-- <script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script> -->
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js" integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
<!-- <script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> -->
|
||||||
|
<!-- <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> -->
|
||||||
|
<!-- <script src="{{asset('public/assets/js/jquery.validate.js')}}"></script> -->
|
||||||
|
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> -->
|
||||||
|
<!-- <script src="{{asset('public/assets/js/crew-designer.js')}}"></script> -->
|
||||||
|
<!-- <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> -->
|
||||||
|
<script>
|
||||||
|
// $(document).ready(function() {
|
||||||
|
|
||||||
|
// swal({
|
||||||
|
// title: "Thank you",
|
||||||
|
// text: "Your payment of is completed.",
|
||||||
|
// icon: "success",
|
||||||
|
// buttons: "OK",
|
||||||
|
|
||||||
|
// })
|
||||||
|
// .then((willDelete) => {
|
||||||
|
// if (willDelete) {
|
||||||
|
// window.location = "{{ url('') }}"
|
||||||
|
// } else {
|
||||||
|
// console.log("asdad");
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
|
// });
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user