User penjual
This commit is contained in:
parent
548c74965d
commit
38619ca991
@ -83,7 +83,7 @@ class UserTransactionController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function invoiceTransaction($id)
|
||||
public function invoiceTransaction()
|
||||
{
|
||||
return view('user.transaction.pembeli.invoice-transaction', [
|
||||
'TransactionUser' => TransactionUser::HistoryTransaction(),
|
||||
@ -192,13 +192,11 @@ class UserTransactionController extends Controller
|
||||
'callbacks' => [
|
||||
'finish' => route('user-pembeli.index'),
|
||||
],
|
||||
'enabled_payments' => [
|
||||
'credit_card', 'shopeepay', 'gopay', 'other_qris'
|
||||
]
|
||||
'enabled_payments' => ['credit_card', 'shopeepay', 'gopay', 'other_qris'],
|
||||
];
|
||||
|
||||
$client = new Client([
|
||||
'verify' => false
|
||||
'verify' => false,
|
||||
]);
|
||||
|
||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||
@ -207,7 +205,7 @@ class UserTransactionController extends Controller
|
||||
'body' => json_encode($params),
|
||||
'headers' => [
|
||||
'accept' => 'application/json',
|
||||
'authorization' => 'Basic '.$auth,
|
||||
'authorization' => 'Basic ' . $auth,
|
||||
'content-type' => 'application/json',
|
||||
],
|
||||
]);
|
||||
@ -333,7 +331,7 @@ class UserTransactionController extends Controller
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
Transaction::where('id', $request->id)->update([
|
||||
Transaction::where('id', $request->transaction_id)->update([
|
||||
'status_transaksi' => 'sent',
|
||||
]);
|
||||
|
||||
@ -348,12 +346,12 @@ class UserTransactionController extends Controller
|
||||
}
|
||||
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'transaction_id' => $request->transaction_id,
|
||||
'status' => 'sent',
|
||||
'background' => 'bg-seller',
|
||||
'user' => Auth::user()->email,
|
||||
'judul' => 'fas fa-check',
|
||||
'deskripsi' => 'Pesanan telah sampai di tempat pembeli.',
|
||||
'deskripsi' => 'Pesanan telah sampai di tempat pembeli. Keterangan: '.$request->keterangan_bukti,
|
||||
'bukti_foto' => $bukti_foto,
|
||||
]);
|
||||
|
||||
@ -373,6 +371,12 @@ class UserTransactionController extends Controller
|
||||
'message' => 'Gagal update status karena kesalahan server.',
|
||||
]);
|
||||
}
|
||||
|
||||
return response([
|
||||
'status' => true,
|
||||
'message' => 'Sukses kirim data.',
|
||||
'data' => $request
|
||||
]);
|
||||
}
|
||||
|
||||
public function finishTransaction(Request $request)
|
||||
@ -414,20 +418,31 @@ class UserTransactionController extends Controller
|
||||
|
||||
public function payTransaction(Request $request)
|
||||
{
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||
|
||||
$response = Http::withOptions([
|
||||
'verify' => false
|
||||
])->withHeaders([
|
||||
'verify' => false,
|
||||
])
|
||||
->withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => "Basic $auth",
|
||||
])->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
|
||||
])
|
||||
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
|
||||
|
||||
$result = json_decode($response->body(), true);
|
||||
|
||||
$code = substr($result['status_code'], 0, 1);
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
if ($code == '4') {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Terjadi error di server.',
|
||||
'data' => $result,
|
||||
]);
|
||||
} else {
|
||||
if ($result['transaction_status'] == 'settlement') {
|
||||
$transaction = 'success';
|
||||
} elseif ($result['transaction_status'] == 'capture') {
|
||||
@ -440,7 +455,7 @@ class UserTransactionController extends Controller
|
||||
$transaction = 'failure';
|
||||
}
|
||||
|
||||
$query1 = Transaction::where('id', $request->id)->update([
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'metode_pembayaran' => $result['payment_type'],
|
||||
'tanggal_transaksi' => $result['transaction_time'],
|
||||
'status_transaksi' => $transaction,
|
||||
@ -464,7 +479,6 @@ class UserTransactionController extends Controller
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Pembayaran sukses',
|
||||
'data' => $query1,
|
||||
]);
|
||||
} elseif ($transaction == 'challenge') {
|
||||
TransactionDescription::create([
|
||||
@ -473,7 +487,7 @@ class UserTransactionController extends Controller
|
||||
'background' => 'bg-primary',
|
||||
'judul' => 'fas fa-clock',
|
||||
'deskripsi' => 'Transaksi ' . auth()->user()->email . ' terindikasi masalah, tunggu sesaat hingga admin menyetujui pembayaran.',
|
||||
'user' => auth()->user()->email,
|
||||
'user' => 'admin@example.net',
|
||||
'keterangan' => $result['status_message'],
|
||||
]);
|
||||
|
||||
@ -481,8 +495,7 @@ class UserTransactionController extends Controller
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Pembayaran ditunda hingga disetujui oleh admin',
|
||||
'data' => $query1,
|
||||
'message' => 'Pembayaran ditunda hingga disetujui oleh admin.',
|
||||
]);
|
||||
} else {
|
||||
TransactionDescription::create([
|
||||
@ -491,7 +504,7 @@ class UserTransactionController extends Controller
|
||||
'background' => 'bg-primary',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => 'Terjadi kegagalan pembayaran.',
|
||||
'user' => auth()->user()->email,
|
||||
'user' => 'admin@example.net',
|
||||
'keterangan' => $result['status_message'],
|
||||
]);
|
||||
|
||||
@ -500,9 +513,9 @@ class UserTransactionController extends Controller
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Transaksi pembayaran gagal',
|
||||
'data' => $query1,
|
||||
]);
|
||||
}
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
DB::rollBack();
|
||||
|
||||
@ -522,28 +535,30 @@ class UserTransactionController extends Controller
|
||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||
|
||||
$response = Http::withOptions([
|
||||
'verify' => false
|
||||
])->withHeaders([
|
||||
'verify' => false,
|
||||
])
|
||||
->withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => "Basic $auth",
|
||||
])->post('https://api.sandbox.midtrans.com/v2/' . $request->id . '/cancel');
|
||||
])
|
||||
->post('https://api.sandbox.midtrans.com/v2/' . $request->id . '/cancel');
|
||||
|
||||
$result = json_decode($response->body(), true);
|
||||
|
||||
$code = substr($result['status_code'], 0, 1);
|
||||
if ($code == '4') {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Transaksi gagal.',
|
||||
]);
|
||||
} else {
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
if(in_array($result['status_code'],['412','401'])){
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_transaksi' => 'failure',
|
||||
'status_pembayaran' => 'cancel',
|
||||
]);
|
||||
}else{
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_transaksi' => 'failure',
|
||||
'status_pembayaran' => $result['transaction_status'],
|
||||
]);
|
||||
}
|
||||
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
@ -568,19 +583,23 @@ class UserTransactionController extends Controller
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Transaksi gagal dibatalkan',
|
||||
'data' => $result
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function pendingTransaction(Request $request)
|
||||
{
|
||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||
|
||||
$response = Http::withHeaders([
|
||||
$response = Http::withOptions([
|
||||
'verify' => false,
|
||||
])
|
||||
->withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => "Basic $auth",
|
||||
])->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
|
||||
])
|
||||
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
|
||||
|
||||
$result = json_decode($response->body(), true);
|
||||
|
||||
@ -613,4 +632,193 @@ class UserTransactionController extends Controller
|
||||
{
|
||||
return view('user.refund.new-refund', compact('id'));
|
||||
}
|
||||
|
||||
public function onErrorTransaction(Request $request)
|
||||
{
|
||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||
|
||||
$response = Http::withOptions([
|
||||
'verify' => false,
|
||||
])
|
||||
->withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => "Basic $auth",
|
||||
])
|
||||
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
|
||||
|
||||
$result = json_decode($response->body(), true);
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_pembayaran' => $result['transaction_status'],
|
||||
]);
|
||||
|
||||
if ($result['transaction_status'] == 'expire') {
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'status' => 'cancel',
|
||||
'background' => 'bg-buyer',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => 'Pembayaran sudah expire',
|
||||
'user' => 'admin@example.net',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
|
||||
]);
|
||||
} elseif ($result['transaction'] == 'failure') {
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'status' => 'failure',
|
||||
'background' => 'bg-buyer',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => auth()->user()->nama_depan . ' telah membatalkan transaksi.',
|
||||
'user' => 'admin@example.net',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Terjadi kesalahan di server saat pembayaran.',
|
||||
'data' => $result,
|
||||
]);
|
||||
} else {
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'status' => $result['transaction_status'],
|
||||
'background' => 'bg-primary',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => 'Status tidak diketahui',
|
||||
'user' => 'admin@example.net',
|
||||
'keterangan' => $result['status_message'],
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Terjadi kesalahan di server',
|
||||
'data' => $result,
|
||||
]);
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
DB::rollBack();
|
||||
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Terjadi error di bagian server.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function onCloseTransaction(Request $request)
|
||||
{
|
||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||
|
||||
$response = Http::withOptions([
|
||||
'verify' => false,
|
||||
])
|
||||
->withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => "Basic $auth",
|
||||
])
|
||||
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
|
||||
|
||||
$result = json_decode($response->body(), true);
|
||||
|
||||
$status = $result['transaction_status'] == null ? '' : $result['transaction_status'];
|
||||
|
||||
if ($status == '') {
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'On Close',
|
||||
]);
|
||||
} else {
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
if ($result['transaction_status'] == 'expire') {
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_pembayaran' => $result['transaction_status'],
|
||||
'status_transaksi' => 'failure',
|
||||
]);
|
||||
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'status' => 'cancel',
|
||||
'background' => 'bg-buyer',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => 'Pembayaran sudah expire',
|
||||
'user' => 'admin@example.net',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
|
||||
]);
|
||||
} elseif ($result['transaction'] == 'failure') {
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_pembayaran' => $result['transaction_status'],
|
||||
'status_transaksi' => 'failure',
|
||||
]);
|
||||
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'status' => 'failure',
|
||||
'background' => 'bg-buyer',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => auth()->user()->nama_depan . ' telah membatalkan transaksi.',
|
||||
'user' => 'admin@example.net',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Terjadi kesalahan di server saat pembayaran.',
|
||||
]);
|
||||
} else {
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_pembayaran' => $result['transaction_status'],
|
||||
'status_transaksi' => 'failure',
|
||||
]);
|
||||
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $request->id,
|
||||
'status' => $result['transaction_status'],
|
||||
'background' => 'bg-primary',
|
||||
'judul' => 'fas fa-exclamation',
|
||||
'deskripsi' => 'Status tidak diketahui.',
|
||||
'user' => 'admin@example.net',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Terjadi kesalahan di server',
|
||||
]);
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
DB::rollBack();
|
||||
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Terjadi error di bagian server.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ select.form-control:not([size]):not([multiple]),
|
||||
}
|
||||
|
||||
textarea.form-control {
|
||||
min-height: 200px !important;
|
||||
min-height: 50px !important;
|
||||
}
|
||||
|
||||
.custom-control {
|
||||
|
@ -83,8 +83,6 @@
|
||||
dataDistrict) + ", " + capital(dataCity) + ", " + capital(dataProvince);
|
||||
teksNohp.innerHTML = dataId.nohp;
|
||||
teksEmail.innerHTML = dataId.email;
|
||||
|
||||
console.log(dataId);
|
||||
});
|
||||
|
||||
function capital(text) {
|
||||
@ -101,8 +99,8 @@
|
||||
text: 'Yakin hapus kontak ini?',
|
||||
icon: 'warning',
|
||||
confirmButtonText: 'Ya, Hapus!',
|
||||
showDenyButton: true,
|
||||
denyButtonText: 'Tidak, jangan hapus',
|
||||
showCancelButton: true,
|
||||
cancelButtonText: 'Tidak, jangan hapus',
|
||||
}).then((result) => {
|
||||
|
||||
if (result.isConfirmed) {
|
||||
@ -155,15 +153,6 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (result.isDenied) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Tidak ada kontak yang dihapus',
|
||||
icon: 'info',
|
||||
confirmButtonText: 'OK',
|
||||
}).then(function() {
|
||||
Swal.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -192,7 +181,6 @@
|
||||
url: "{{ route('user-contact.email', ':email') }}".replace(':email', email),
|
||||
type: 'GET',
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if (response.status) {
|
||||
let status = response.message.status
|
||||
Swal.fire({
|
||||
@ -234,7 +222,6 @@
|
||||
}).then(function() {
|
||||
Swal.close();
|
||||
});
|
||||
console.log(error.responseText)
|
||||
check = false;
|
||||
}
|
||||
});
|
||||
|
@ -28,9 +28,11 @@
|
||||
<label for="uploadBukti" class="form-label">Sertakan bukti seperti foto atau
|
||||
video
|
||||
barang</label>
|
||||
<input type="file" class="form-control" name="bukti[]" id="fileInput"
|
||||
<input type="file" class="form-control" name="files[]" id="fileInput"
|
||||
accept="image/*,video/*" required multiple>
|
||||
<div id="previewContainer">
|
||||
</div>
|
||||
<div class="container m-4">
|
||||
<div class="row" id="previewContainer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -96,11 +98,12 @@
|
||||
|
||||
reader.onload = function(e) {
|
||||
const preview = document.createElement('div');
|
||||
preview.classList.add('preview-item');
|
||||
|
||||
if (file.type.startsWith('image/')) {
|
||||
preview.innerHTML =
|
||||
`<img src="${e.target.result}" alt="${file.name}" class="preview-img">`;
|
||||
`<div class="col-md-4 m-2">
|
||||
<img src="${e.target.result}" alt="${file.name}" style="max-width:250px; max-height:200px;">
|
||||
</div>`;
|
||||
} else if (file.type.startsWith('video/')) {
|
||||
var video = document.createElement('video');
|
||||
var videoUrl = URL.createObjectURL(file);
|
||||
@ -111,28 +114,42 @@
|
||||
|
||||
if (duration > 60) {
|
||||
Swal.fire({
|
||||
title: 'Salah Inputan',
|
||||
text: 'Inputan anda bukan foto atau video',
|
||||
title: 'Kesalahan',
|
||||
text: 'Durasi video maksimal satu menit',
|
||||
icon: 'error',
|
||||
});
|
||||
console.log('INI COY 1');
|
||||
} else {
|
||||
preview.innerHTML = `
|
||||
<video controls class="preview-video">
|
||||
<source src="${e.target.result}" type="${file.type}">
|
||||
<div class="col-md-4">
|
||||
<video controls style="max-width:250px; max-height:200px;">
|
||||
<source src="${e.target.result}" type="${file.type}" >
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
previewContainer.appendChild(preview);
|
||||
|
||||
if (video.canPlayType('video/x-ms-wmv') === 'probably' || video.canPlayType(
|
||||
'video/x-ms-wmv') === 'maybe') {
|
||||
console.log('Browser mendukung format WMV.');
|
||||
} else {
|
||||
console.log('Browser tidak mendukung format WMV.');
|
||||
}
|
||||
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Salah Inputan',
|
||||
text: 'Inputan anda bukan foto atau video',
|
||||
icon: 'error',
|
||||
});
|
||||
console.log('INI COY 5');
|
||||
}
|
||||
|
||||
previewContainer.appendChild(preview);
|
||||
|
||||
|
||||
};
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
|
@ -45,6 +45,10 @@
|
||||
class="text-job text-primary">{{ date('F j, Y, g:i:s a', strtotime($tracking->created_at)) }}</span>
|
||||
</div>
|
||||
<p>{{ $tracking->deskripsi }}</p>
|
||||
@if ($tracking->bukti_foto != null)
|
||||
<img src="{{ asset('storage/bukti-foto/' . $tracking->bukti_foto) }}"
|
||||
alt="" style="max-height: 200px; max-width: 250px;">
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
|
@ -83,13 +83,13 @@
|
||||
</li>
|
||||
|
||||
{{-- di midtrans statusnya settlement --}}
|
||||
@if ($transaction->status_transaksi == 'sent')
|
||||
{{-- @if ($transaction->status_transaksi == 'sent') --}}
|
||||
<li><a class="dropdown-item" data-toggle="modal"
|
||||
data-target="#modalFinish" id="tracking"
|
||||
data-id="{{ $transaction->id }}"
|
||||
href="#">Selesaikan</a>
|
||||
</li>
|
||||
@endif
|
||||
{{-- @endif --}}
|
||||
|
||||
@if ($transaction->status_transaksi == 'created')
|
||||
<li><a class="dropdown-item" id="bayar"
|
||||
@ -175,7 +175,6 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
@ -183,88 +182,129 @@
|
||||
text: 'Pembayaran gagal',
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
console.log(result);
|
||||
},
|
||||
onPending: function(result) {
|
||||
// $.ajaxSetup({
|
||||
// headers: {
|
||||
// 'X-CSRF-TOKEN': csrfToken
|
||||
// }
|
||||
// });
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
// $.ajax({
|
||||
// url: "{{ route('user-pembeli.pay', ':id') }}"
|
||||
// .replace(':id', id),
|
||||
// type: "POST",
|
||||
// contentType: false,
|
||||
// processData: false,
|
||||
// success: function(response) {
|
||||
// Swal.fire({
|
||||
// title: 'Berhasil',
|
||||
// text: response.message,
|
||||
// icon: 'info',
|
||||
// confirmButtonText: 'OK'
|
||||
// });
|
||||
// console.log(response);
|
||||
// },
|
||||
// error: function(error) {
|
||||
// Swal.fire({
|
||||
// title: 'Gagal',
|
||||
// text: 'Gagal mengupdate pembayaran ke database',
|
||||
// icon: 'error'
|
||||
// });
|
||||
// console.log(error);
|
||||
// }
|
||||
// });
|
||||
console.log(result);
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('user-pembeli.pending') }}",
|
||||
type: "PUT",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ?
|
||||
'Pembayaran Ditunda' : 'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'info' :
|
||||
'error',
|
||||
confirmButtonText: 'OK'
|
||||
});
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Gagal mengupdate pembayaran ke database',
|
||||
icon: 'error'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onError: function(result) {
|
||||
// $.ajaxSetup({
|
||||
// headers: {
|
||||
// 'X-CSRF-TOKEN': csrfToken
|
||||
// }
|
||||
// });
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
// $.ajax({
|
||||
// url: "{{ route('user-pembeli.pay', ':id') }}"
|
||||
// .replace(':id', id),
|
||||
// type: "POST",
|
||||
// contentType: false,
|
||||
// processData: false,
|
||||
// success: function(response) {
|
||||
// Swal.fire({
|
||||
// title: 'Gagal',
|
||||
// text: response.message,
|
||||
// icon: 'error',
|
||||
// });
|
||||
// console.log(response);
|
||||
// },
|
||||
// error: function(error) {
|
||||
// Swal.fire({
|
||||
// title: 'Gagal',
|
||||
// text: 'Gagal mengupdate pembayaran ke database',
|
||||
// icon: 'error'
|
||||
// });
|
||||
// console.log(error);
|
||||
// }
|
||||
// });
|
||||
// Swal.fire({
|
||||
// title: 'Gagal',
|
||||
// text: 'Terjadi kesalahan karena ' + result,
|
||||
// icon: 'error'
|
||||
// });
|
||||
console.log(result);
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('user-pembeli.error') }}",
|
||||
type: "PUT",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ?
|
||||
'Pembayaran Gagal' : 'Gagal',
|
||||
text: response.message,
|
||||
icon: 'error',
|
||||
});
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Gagal mengupdate pembayaran ke database',
|
||||
icon: 'error'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onClose: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Ditunda',
|
||||
text: 'Kamu menutup halaman pembayaran. Silahkan lakukan pembayaran nanti',
|
||||
icon: 'info'
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('user-pembeli.close') }}",
|
||||
type: "PUT",
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ?
|
||||
'Pembayaran Ditunda' :
|
||||
'Pembayaran Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'info' :
|
||||
'error',
|
||||
});
|
||||
},
|
||||
error: function(fail) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Gagal mengupdate pembayaran ke database',
|
||||
icon: 'error'
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -315,7 +355,6 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
@ -323,7 +362,6 @@
|
||||
text: response.message,
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -394,22 +432,64 @@
|
||||
<a href="#" type="button" class="btn btn-danger" data-id="${id}" id="complain">Ajukan Komplain</a>
|
||||
`;
|
||||
modal.find('.modal-footer').html(activitiesHtml);
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
// selesai
|
||||
$('#modalFinish').on('click', '#finishTransaction', function() {
|
||||
var id = $(this).data('id');
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('user-pembeli.finish') }}",
|
||||
type: 'PUT',
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ? 'Berhasil' : 'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error',
|
||||
}).then(function() {
|
||||
if (response.status) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: response.message,
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
// complain
|
||||
$('#modalFinish').on('click', '#complain', function() {
|
||||
var id = $(this).data('id');
|
||||
location.href = "{{ route('user-refund.create', ':id') }}".replace(':id', id);
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -5,7 +5,34 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<h2 class="modal-title fs-5" id="staticBackdropLabel">Konfirmasi Pesanan</h2>
|
||||
<a type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></a>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="section-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="activities">
|
||||
<p>asdasdasdsad</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="activities">
|
||||
<div class="col-6 d-flex justify-content-center">
|
||||
<img src="{{ asset('assets/img/avatar/avatar-1.png') }}"
|
||||
style="max-width:200px; max-height: 150px;" alt="">
|
||||
</div>
|
||||
<div class="col-6 d-flex justify-content-center">
|
||||
<img src="{{ asset('assets/img/avatar/avatar-1.png') }}"
|
||||
style="max-width:200px; max-height: 150px;" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer d-flex justify-content-center">
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1"
|
||||
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
||||
@ -19,7 +18,10 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Capture</label>
|
||||
<p class="form-control">Transaksi berhasil dan saldo kartu berhasil diambil. Jika Anda tidak mengambil tindakan apa pun, transaksi akan berhasil diselesaikan dalam waktu 24 jam atau dalam waktu penyelesaian yang disepakati dengan bank mitra Anda dan status transaksi anda akan berubah menjadi settlement. Sehingga aman untuk mengasumsikan pembayaran berhasil.</p>
|
||||
<p class="form-control">Transaksi berhasil dan saldo kartu berhasil diambil. Jika Anda tidak
|
||||
mengambil tindakan apa pun, transaksi akan berhasil diselesaikan dalam waktu 24 jam atau dalam
|
||||
waktu penyelesaian yang disepakati dengan bank mitra Anda dan status transaksi anda akan berubah
|
||||
menjadi settlement. Sehingga aman untuk mengasumsikan pembayaran berhasil.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@ -29,12 +31,14 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Cancel</label>
|
||||
<p class="form-control">Transaksi dibatalkan. Hal ini bisa dipicu oleh Midtrans, bank partner atau pembeli.</p>
|
||||
<p class="form-control">Transaksi dibatalkan. Hal ini bisa dipicu oleh Midtrans, bank partner atau
|
||||
pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Expire</label>
|
||||
<p class="form-control">Transaksi tidak dapat diproses karena pembayaran tertunda atau melebihi batas pembayaran.</p>
|
||||
<p class="form-control">Transaksi tidak dapat diproses karena pembayaran tertunda atau melebihi
|
||||
batas pembayaran.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@ -64,7 +68,8 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Refund</label>
|
||||
<p class="form-control">Transaksi ditandai untuk dikembalikan. Status pengembalian dana dipicu oleh pembeli.</p>
|
||||
<p class="form-control">Transaksi ditandai untuk dikembalikan. Status pengembalian dana dipicu oleh
|
||||
pembeli.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -414,7 +414,6 @@
|
||||
"{{ route('user-pembeli.index') }}";
|
||||
}
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
@ -422,7 +421,6 @@
|
||||
text: "Gagal mengirimkan data karena " + error,
|
||||
icon: "error",
|
||||
});
|
||||
console.log(error);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -81,36 +81,35 @@
|
||||
</li>
|
||||
@endif
|
||||
{{-- Setelah dibayar --}}
|
||||
@if ($transaction->status_transaksi == 'success')
|
||||
{{-- @if ($transaction->status_transaksi == 'success') --}}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="processTransaction"
|
||||
data-id="{{ $transaction->id }}">Proses
|
||||
Transaksi</a>
|
||||
</li>
|
||||
@endif
|
||||
{{-- @endif --}}
|
||||
{{-- Pengiriman barang --}}
|
||||
@if ($transaction->status_transaksi == 'process')
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="sendOrder"
|
||||
{{-- @if ($transaction->status_transaksi == 'process') --}}
|
||||
<li><a class="dropdown-item" href="#" id="sendOrder"
|
||||
data-id="{{ $transaction->id }}">Kirim
|
||||
Barang</a>
|
||||
</li>
|
||||
@endif
|
||||
@if ($transaction->status_transaksi == 'sending')
|
||||
{{-- @endif --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'sending') --}}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
data-toggle="modal"
|
||||
data-target="#modalOrderSent" id="sentOrder"
|
||||
data-toggle="modal" data-target="#modalOrderSent"
|
||||
id="sentOrder"
|
||||
data-id="{{ $transaction->id }}">Barang sudah
|
||||
sampai</a>
|
||||
</li>
|
||||
@endif
|
||||
@if ($transaction->status_transaksi == 'finished')
|
||||
{{-- @endif --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'finished') --}}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="acceptResult"
|
||||
data-id="{{ $transaction->id }}">Terima
|
||||
Uang</a>
|
||||
</li>
|
||||
@endif
|
||||
{{-- @endif --}}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
@ -226,6 +225,155 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#table-3').on('click', '#sendOrder', function() {
|
||||
const id = $(this).data('id');
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
|
||||
Swal.fire({
|
||||
title: 'Pengiriman Barang/Jasa',
|
||||
text: 'Pastikan barang/jasa sudah siap untuk dikirim',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
cancelButtonText: 'Nanti dulu.',
|
||||
confirmButtonText: 'Kirim Barang/Jasa'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "route('user-penjual.sending')",
|
||||
type: 'PUT',
|
||||
data: {
|
||||
id: id,
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ? 'Berhasil' :
|
||||
'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error',
|
||||
confirmButtonText: 'OK',
|
||||
}).then((result) => {
|
||||
if (response.status) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Terjadi error di server',
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//file input
|
||||
$('#buktiFoto').change(function() {
|
||||
var file = this.files[0];
|
||||
if (file.type.startsWith('image/')) {
|
||||
const reader = new FileReader();
|
||||
|
||||
reader.onload = function(e) {
|
||||
// Mengganti src gambar dengan data URL dari berkas yang dipilih
|
||||
document.getElementById('buktiFotoPreview').src = e.target.result;
|
||||
};
|
||||
|
||||
// Membaca berkas sebagai data URL
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Salah Input',
|
||||
text: 'File yang anda upload bukan foto/gambar',
|
||||
icon: 'error',
|
||||
});
|
||||
$('#buktiFoto').val('');
|
||||
}
|
||||
});
|
||||
|
||||
$('#modalOrderSent').on('show.bs.modal', function(event) {
|
||||
var triggerLink = $(event.relatedTarget);
|
||||
var id = triggerLink.data('id');
|
||||
var activitiesHtml = '';
|
||||
|
||||
var modal = $(this);
|
||||
activitiesHtml += `
|
||||
<input type="hidden" name="transaction_id" id="transactionId" value="${id}">
|
||||
`;
|
||||
modal.find('.form-bukti-id').html(activitiesHtml);
|
||||
});
|
||||
|
||||
$('#formBukti').on('submit', function(e) {
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||
e.preventDefault();
|
||||
|
||||
let form = this;
|
||||
|
||||
if (!form.checkValidity()) {
|
||||
form.reportValidity();
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = new FormData(this);
|
||||
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('user-penjual.sent') }}",
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ? 'Berhasil' : 'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error'
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Terjadi kesalahan di server',
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -0,0 +1,130 @@
|
||||
@extends('layouts.main')
|
||||
@section('content')
|
||||
<div class="main-content">
|
||||
<section class="section">
|
||||
<div class="section-header">
|
||||
<h1>Invoice</h1>
|
||||
<div class="section-header-breadcrumb">
|
||||
<div class="breadcrumb-item active"><a href="{{ route('user.index') }}">Dashboard</a></div>
|
||||
<div class="breadcrumb-item"><a href="{{ route('user-pembeli.index') }}"> Transaction</a></div>
|
||||
<div class="breadcrumb-item">Invoice</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section-body">
|
||||
<div class="invoice">
|
||||
<div class="invoice-print">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="invoice-title">
|
||||
<h2>Invoice</h2>
|
||||
<div class="invoice-number">Order #NVI-1234</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<address>
|
||||
<strong>Billed To:</strong><br>
|
||||
npannisa<br>
|
||||
1234 Main<br>
|
||||
Apt. 4B<br>
|
||||
Depok City, Indonesia
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-md-6 text-md-right">
|
||||
<address>
|
||||
<strong>Shipped To:</strong><br>
|
||||
Jilhan Haura<br>
|
||||
12345 Main<br>
|
||||
Apt. 5B<br>
|
||||
Bogor Barat, Indonesia
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<address>
|
||||
<strong>Payment Method:</strong><br>
|
||||
Visa ending **** 4242<br>
|
||||
npannisa@gmail.com
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-md-6 text-md-right">
|
||||
<address>
|
||||
<strong>Order Date:</strong><br>
|
||||
September 19, 2023<br><br>
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-md-12">
|
||||
<div class="section-title">Order Summary</div>
|
||||
<p class="section-lead">All items here cannot be deleted.</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover table-md">
|
||||
<tr>
|
||||
<th data-width="40">#</th>
|
||||
<th>Item</th>
|
||||
<th class="text-center">Price</th>
|
||||
<th class="text-center">Quantity</th>
|
||||
<th class="text-right">Totals</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Ayam Warna Warni</td>
|
||||
<td class="text-center">Rp. 50.000.000</td>
|
||||
<td class="text-center">1</td>
|
||||
<td class="text-right">Rp. 50.000.000</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-lg-8">
|
||||
<div class="section-title">Payment Method</div>
|
||||
<p class="section-lead">The payment method that we provide is to make it easier for
|
||||
you to pay invoices.</p>
|
||||
<div class="images">
|
||||
<img src="assets/img/visa.png" alt="visa">
|
||||
<img src="assets/img/jcb.png" alt="jcb">
|
||||
<img src="assets/img/mastercard.png" alt="mastercard">
|
||||
<img src="assets/img/paypal.png" alt="paypal">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 text-right">
|
||||
<div class="invoice-detail-item">
|
||||
<div class="invoice-detail-name">Subtotal</div>
|
||||
<div class="invoice-detail-value">Rp.670.000.000</div>
|
||||
</div>
|
||||
<div class="invoice-detail-item">
|
||||
<div class="invoice-detail-name">Shipping</div>
|
||||
<div class="invoice-detail-value">Rp.15.000</div>
|
||||
</div>
|
||||
<hr class="mt-2 mb-2">
|
||||
<div class="invoice-detail-item">
|
||||
<div class="invoice-detail-name">Total</div>
|
||||
<div class="invoice-detail-value invoice-detail-value-lg">Rp.6715.000.000</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-md-right">
|
||||
<div class="float-lg-left mb-lg-0 mb-3">
|
||||
<a href="/pembeli" class="btn btn-primary btn-icon icon-left"><i class="fas fa-credit-card"
|
||||
id="payment"></i> Process
|
||||
Payment</a>
|
||||
<a href="/pembeli" class="btn btn-danger btn-icon icon-left"><i class="fas fa-times"></i>
|
||||
Cancel</a>
|
||||
</div>
|
||||
<button class="btn btn-warning btn-icon icon-left"><i class="fas fa-print"></i> Print</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@endsection
|
@ -1,10 +1,10 @@
|
||||
<div class="modal fade" id="modalKeteranganStatus" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
||||
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
||||
<a type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></a>
|
||||
<a type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">×</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
|
@ -1,21 +1,45 @@
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modalTracking" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
||||
<div class="modal fade" id="modalOrderSent" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title" id="exampleModalLongTitle">Tracking Information</h2>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h2 class="modal-title" id="exampleModalLongTitle">Pengiriman Barang/Jasa Selesai</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="section-body">
|
||||
<p>Pastikan barangnya sudah sampai dengan bukti foto dan keterangan (Jika ada)</p>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="activities">
|
||||
<form class="form-control form-bukti" action="javascript: void(0);" id="formBukti">
|
||||
<div class="row d-flex justify-content-center form-bukti-id hidden">
|
||||
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<img src="{{ asset('assets/img/avatar/avatar-1.png') }}" alt="bukti foto"
|
||||
style="max-width: 450px; max-height: 400px; margin: 0 3px 0 3px;"
|
||||
id="buktiFotoPreview">
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center mt-3">
|
||||
<label for="buktiFoto" class="btn btn-primary" style="font-size: 16px;">
|
||||
<i class="fas fa-upload"></i> Unggah
|
||||
<input type="file" name="bukti_foto" id="buktiFoto" accept="image/*"
|
||||
style="display: none;" required>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<label for="keteranganBukti">Keterangan (Optional)</label>
|
||||
<textarea class="form-control" name="keterangan_bukti" id="keteranganBukti" cols="3" rows="5"></textarea>
|
||||
<div class="text-md-right mt-3">
|
||||
<button type="submit" class="btn btn-primary"
|
||||
style="font-size: 16px;">Kirim</button>
|
||||
<button type="button" data-dismiss="modal" style="font-size: 16px;"
|
||||
class="btn btn-danger">Tutup</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title" id="exampleModalLongTitle">Tracking Information</h2>
|
||||
<h2 class="modal-title" id="exampleModalLongTitle">Lacak Transaksi</h2>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
@ -155,6 +155,9 @@ Route::middleware(['auth'])->group(function(){
|
||||
Route::post('user-pembeli','store')->name('user-pembeli.store');
|
||||
Route::put('user-pembeli/bayar-transaksi','payTransaction')->name('user-pembeli.pay');
|
||||
Route::put('user-pembeli/batal-transaksi','cancelTransaction')->name('user-pembeli.cancel');
|
||||
Route::put('user-pembeli/transaksi-pending', 'pendingTransaction')->name('user-pembeli.pending');
|
||||
Route::put('user-pembeli/transaksi-error','onErrorTransaction')->name('user-pembeli.error');
|
||||
Route::put('user-pembeli/transaksi-close','onCloseTransaction')->name('user-pembeli.close');
|
||||
Route::put('user-pembeli/transaksi-selesai','finishTransaction')->name('user-pembeli.finish');
|
||||
Route::put('user-pembeli/transaksi-komplain/{id}','complaintTransaction')->name('user-pembeli.complain');
|
||||
|
||||
@ -164,7 +167,9 @@ Route::middleware(['auth'])->group(function(){
|
||||
Route::get('user-penjual/tolak-transaksi','denyTransaction')->name('user-penjual.deny');
|
||||
Route::put('user-penjual/terima-transaksi','acceptTransaction')->name('user-penjual.accept');
|
||||
Route::put('user-penjual/kirim-pesanan','sendingOrder')->name('user-penjual.sending');
|
||||
Route::put('user-penjual/selesai-kirim-pesanan','sentOrder')->name('user-penjual.sent');
|
||||
Route::post('user-penjual/selesai-kirim-pesanan','sentOrder')->name('user-penjual.sent');
|
||||
|
||||
Route::get('user-pembeli/invoice','invoiceTransaction');
|
||||
});
|
||||
|
||||
// Tampilan refund
|
||||
|
Loading…
Reference in New Issue
Block a user