Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaa
This commit is contained in:
commit
9b009a57fe
@ -83,7 +83,7 @@ class UserTransactionController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Store a newly created resource in storage.
|
* Store a newly created resource in storage.
|
||||||
*/
|
*/
|
||||||
public function invoiceTransaction($id)
|
public function invoiceTransaction()
|
||||||
{
|
{
|
||||||
return view('user.transaction.pembeli.invoice-transaction', [
|
return view('user.transaction.pembeli.invoice-transaction', [
|
||||||
'TransactionUser' => TransactionUser::HistoryTransaction(),
|
'TransactionUser' => TransactionUser::HistoryTransaction(),
|
||||||
@ -192,13 +192,11 @@ class UserTransactionController extends Controller
|
|||||||
'callbacks' => [
|
'callbacks' => [
|
||||||
'finish' => route('user-pembeli.index'),
|
'finish' => route('user-pembeli.index'),
|
||||||
],
|
],
|
||||||
'enabled_payments' => [
|
'enabled_payments' => ['credit_card', 'shopeepay', 'gopay', 'other_qris'],
|
||||||
'credit_card', 'shopeepay', 'gopay', 'other_qris'
|
|
||||||
]
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$client = new Client([
|
$client = new Client([
|
||||||
'verify' => false
|
'verify' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||||
@ -207,7 +205,7 @@ class UserTransactionController extends Controller
|
|||||||
'body' => json_encode($params),
|
'body' => json_encode($params),
|
||||||
'headers' => [
|
'headers' => [
|
||||||
'accept' => 'application/json',
|
'accept' => 'application/json',
|
||||||
'authorization' => 'Basic '.$auth,
|
'authorization' => 'Basic ' . $auth,
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
@ -333,7 +331,7 @@ class UserTransactionController extends Controller
|
|||||||
try {
|
try {
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
Transaction::where('id', $request->id)->update([
|
Transaction::where('id', $request->transaction_id)->update([
|
||||||
'status_transaksi' => 'sent',
|
'status_transaksi' => 'sent',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -348,12 +346,12 @@ class UserTransactionController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
TransactionDescription::create([
|
TransactionDescription::create([
|
||||||
'transaction_id' => $request->id,
|
'transaction_id' => $request->transaction_id,
|
||||||
'status' => 'sent',
|
'status' => 'sent',
|
||||||
'background' => 'bg-seller',
|
'background' => 'bg-seller',
|
||||||
'user' => Auth::user()->email,
|
'user' => Auth::user()->email,
|
||||||
'judul' => 'fas fa-check',
|
'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,
|
'bukti_foto' => $bukti_foto,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -373,6 +371,12 @@ class UserTransactionController extends Controller
|
|||||||
'message' => 'Gagal update status karena kesalahan server.',
|
'message' => 'Gagal update status karena kesalahan server.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return response([
|
||||||
|
'status' => true,
|
||||||
|
'message' => 'Sukses kirim data.',
|
||||||
|
'data' => $request
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function finishTransaction(Request $request)
|
public function finishTransaction(Request $request)
|
||||||
@ -414,20 +418,31 @@ class UserTransactionController extends Controller
|
|||||||
|
|
||||||
public function payTransaction(Request $request)
|
public function payTransaction(Request $request)
|
||||||
{
|
{
|
||||||
try {
|
|
||||||
DB::beginTransaction();
|
|
||||||
|
|
||||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||||
|
|
||||||
$response = Http::withOptions([
|
$response = Http::withOptions([
|
||||||
'verify' => false
|
'verify' => false,
|
||||||
])->withHeaders([
|
])
|
||||||
|
->withHeaders([
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Authorization' => "Basic $auth",
|
'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);
|
$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') {
|
if ($result['transaction_status'] == 'settlement') {
|
||||||
$transaction = 'success';
|
$transaction = 'success';
|
||||||
} elseif ($result['transaction_status'] == 'capture') {
|
} elseif ($result['transaction_status'] == 'capture') {
|
||||||
@ -440,7 +455,7 @@ class UserTransactionController extends Controller
|
|||||||
$transaction = 'failure';
|
$transaction = 'failure';
|
||||||
}
|
}
|
||||||
|
|
||||||
$query1 = Transaction::where('id', $request->id)->update([
|
Transaction::where('id', $request->id)->update([
|
||||||
'metode_pembayaran' => $result['payment_type'],
|
'metode_pembayaran' => $result['payment_type'],
|
||||||
'tanggal_transaksi' => $result['transaction_time'],
|
'tanggal_transaksi' => $result['transaction_time'],
|
||||||
'status_transaksi' => $transaction,
|
'status_transaksi' => $transaction,
|
||||||
@ -464,7 +479,6 @@ class UserTransactionController extends Controller
|
|||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'message' => 'Pembayaran sukses',
|
'message' => 'Pembayaran sukses',
|
||||||
'data' => $query1,
|
|
||||||
]);
|
]);
|
||||||
} elseif ($transaction == 'challenge') {
|
} elseif ($transaction == 'challenge') {
|
||||||
TransactionDescription::create([
|
TransactionDescription::create([
|
||||||
@ -473,7 +487,7 @@ class UserTransactionController extends Controller
|
|||||||
'background' => 'bg-primary',
|
'background' => 'bg-primary',
|
||||||
'judul' => 'fas fa-clock',
|
'judul' => 'fas fa-clock',
|
||||||
'deskripsi' => 'Transaksi ' . auth()->user()->email . ' terindikasi masalah, tunggu sesaat hingga admin menyetujui pembayaran.',
|
'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'],
|
'keterangan' => $result['status_message'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -481,8 +495,7 @@ class UserTransactionController extends Controller
|
|||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => false,
|
'status' => false,
|
||||||
'message' => 'Pembayaran ditunda hingga disetujui oleh admin',
|
'message' => 'Pembayaran ditunda hingga disetujui oleh admin.',
|
||||||
'data' => $query1,
|
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
TransactionDescription::create([
|
TransactionDescription::create([
|
||||||
@ -491,7 +504,7 @@ class UserTransactionController extends Controller
|
|||||||
'background' => 'bg-primary',
|
'background' => 'bg-primary',
|
||||||
'judul' => 'fas fa-exclamation',
|
'judul' => 'fas fa-exclamation',
|
||||||
'deskripsi' => 'Terjadi kegagalan pembayaran.',
|
'deskripsi' => 'Terjadi kegagalan pembayaran.',
|
||||||
'user' => auth()->user()->email,
|
'user' => 'admin@example.net',
|
||||||
'keterangan' => $result['status_message'],
|
'keterangan' => $result['status_message'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -500,9 +513,9 @@ class UserTransactionController extends Controller
|
|||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => false,
|
'status' => false,
|
||||||
'message' => 'Transaksi pembayaran gagal',
|
'message' => 'Transaksi pembayaran gagal',
|
||||||
'data' => $query1,
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
|
|
||||||
@ -522,28 +535,30 @@ class UserTransactionController extends Controller
|
|||||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||||
|
|
||||||
$response = Http::withOptions([
|
$response = Http::withOptions([
|
||||||
'verify' => false
|
'verify' => false,
|
||||||
])->withHeaders([
|
])
|
||||||
|
->withHeaders([
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Authorization' => "Basic $auth",
|
'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);
|
$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 {
|
try {
|
||||||
DB::beginTransaction();
|
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([
|
Transaction::where('id', $request->id)->update([
|
||||||
'status_transaksi' => 'failure',
|
'status_transaksi' => 'failure',
|
||||||
'status_pembayaran' => $result['transaction_status'],
|
'status_pembayaran' => $result['transaction_status'],
|
||||||
]);
|
]);
|
||||||
}
|
|
||||||
|
|
||||||
TransactionDescription::create([
|
TransactionDescription::create([
|
||||||
'transaction_id' => $request->id,
|
'transaction_id' => $request->id,
|
||||||
@ -568,19 +583,23 @@ class UserTransactionController extends Controller
|
|||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => false,
|
'status' => false,
|
||||||
'message' => 'Transaksi gagal dibatalkan',
|
'message' => 'Transaksi gagal dibatalkan',
|
||||||
'data' => $result
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function pendingTransaction(Request $request)
|
public function pendingTransaction(Request $request)
|
||||||
{
|
{
|
||||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||||
|
|
||||||
$response = Http::withHeaders([
|
$response = Http::withOptions([
|
||||||
|
'verify' => false,
|
||||||
|
])
|
||||||
|
->withHeaders([
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'Authorization' => "Basic $auth",
|
'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);
|
$result = json_decode($response->body(), true);
|
||||||
|
|
||||||
@ -613,4 +632,193 @@ class UserTransactionController extends Controller
|
|||||||
{
|
{
|
||||||
return view('user.refund.new-refund', compact('id'));
|
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 {
|
textarea.form-control {
|
||||||
min-height: 200px !important;
|
min-height: 50px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-control {
|
.custom-control {
|
||||||
|
@ -83,8 +83,6 @@
|
|||||||
dataDistrict) + ", " + capital(dataCity) + ", " + capital(dataProvince);
|
dataDistrict) + ", " + capital(dataCity) + ", " + capital(dataProvince);
|
||||||
teksNohp.innerHTML = dataId.nohp;
|
teksNohp.innerHTML = dataId.nohp;
|
||||||
teksEmail.innerHTML = dataId.email;
|
teksEmail.innerHTML = dataId.email;
|
||||||
|
|
||||||
console.log(dataId);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function capital(text) {
|
function capital(text) {
|
||||||
@ -101,8 +99,8 @@
|
|||||||
text: 'Yakin hapus kontak ini?',
|
text: 'Yakin hapus kontak ini?',
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
confirmButtonText: 'Ya, Hapus!',
|
confirmButtonText: 'Ya, Hapus!',
|
||||||
showDenyButton: true,
|
showCancelButton: true,
|
||||||
denyButtonText: 'Tidak, jangan hapus',
|
cancelButtonText: 'Tidak, jangan hapus',
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
|
|
||||||
if (result.isConfirmed) {
|
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),
|
url: "{{ route('user-contact.email', ':email') }}".replace(':email', email),
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log(response);
|
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
let status = response.message.status
|
let status = response.message.status
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -234,7 +222,6 @@
|
|||||||
}).then(function() {
|
}).then(function() {
|
||||||
Swal.close();
|
Swal.close();
|
||||||
});
|
});
|
||||||
console.log(error.responseText)
|
|
||||||
check = false;
|
check = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -28,9 +28,11 @@
|
|||||||
<label for="uploadBukti" class="form-label">Sertakan bukti seperti foto atau
|
<label for="uploadBukti" class="form-label">Sertakan bukti seperti foto atau
|
||||||
video
|
video
|
||||||
barang</label>
|
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>
|
accept="image/*,video/*" required multiple>
|
||||||
<div id="previewContainer">
|
</div>
|
||||||
|
<div class="container m-4">
|
||||||
|
<div class="row" id="previewContainer">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -96,11 +98,12 @@
|
|||||||
|
|
||||||
reader.onload = function(e) {
|
reader.onload = function(e) {
|
||||||
const preview = document.createElement('div');
|
const preview = document.createElement('div');
|
||||||
preview.classList.add('preview-item');
|
|
||||||
|
|
||||||
if (file.type.startsWith('image/')) {
|
if (file.type.startsWith('image/')) {
|
||||||
preview.innerHTML =
|
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/')) {
|
} else if (file.type.startsWith('video/')) {
|
||||||
var video = document.createElement('video');
|
var video = document.createElement('video');
|
||||||
var videoUrl = URL.createObjectURL(file);
|
var videoUrl = URL.createObjectURL(file);
|
||||||
@ -111,28 +114,42 @@
|
|||||||
|
|
||||||
if (duration > 60) {
|
if (duration > 60) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Salah Inputan',
|
title: 'Kesalahan',
|
||||||
text: 'Inputan anda bukan foto atau video',
|
text: 'Durasi video maksimal satu menit',
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
});
|
});
|
||||||
|
console.log('INI COY 1');
|
||||||
} else {
|
} else {
|
||||||
preview.innerHTML = `
|
preview.innerHTML = `
|
||||||
<video controls class="preview-video">
|
<div class="col-md-4">
|
||||||
<source src="${e.target.result}" type="${file.type}">
|
<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.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</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 {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Salah Inputan',
|
title: 'Salah Inputan',
|
||||||
text: 'Inputan anda bukan foto atau video',
|
text: 'Inputan anda bukan foto atau video',
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
});
|
});
|
||||||
|
console.log('INI COY 5');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
previewContainer.appendChild(preview);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
reader.readAsDataURL(file);
|
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>
|
class="text-job text-primary">{{ date('F j, Y, g:i:s a', strtotime($tracking->created_at)) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<p>{{ $tracking->deskripsi }}</p>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
@empty
|
@empty
|
||||||
|
@ -83,13 +83,13 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{-- di midtrans statusnya settlement --}}
|
{{-- di midtrans statusnya settlement --}}
|
||||||
@if ($transaction->status_transaksi == 'sent')
|
{{-- @if ($transaction->status_transaksi == 'sent') --}}
|
||||||
<li><a class="dropdown-item" data-toggle="modal"
|
<li><a class="dropdown-item" data-toggle="modal"
|
||||||
data-target="#modalFinish" id="tracking"
|
data-target="#modalFinish" id="tracking"
|
||||||
data-id="{{ $transaction->id }}"
|
data-id="{{ $transaction->id }}"
|
||||||
href="#">Selesaikan</a>
|
href="#">Selesaikan</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
{{-- @endif --}}
|
||||||
|
|
||||||
@if ($transaction->status_transaksi == 'created')
|
@if ($transaction->status_transaksi == 'created')
|
||||||
<li><a class="dropdown-item" id="bayar"
|
<li><a class="dropdown-item" id="bayar"
|
||||||
@ -175,7 +175,6 @@
|
|||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(response);
|
|
||||||
},
|
},
|
||||||
error: function(error) {
|
error: function(error) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -183,88 +182,129 @@
|
|||||||
text: 'Pembayaran gagal',
|
text: 'Pembayaran gagal',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
});
|
});
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(result);
|
|
||||||
},
|
},
|
||||||
onPending: function(result) {
|
onPending: function(result) {
|
||||||
// $.ajaxSetup({
|
Swal.fire({
|
||||||
// headers: {
|
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>',
|
||||||
// 'X-CSRF-TOKEN': csrfToken
|
allowEscapeKey: false,
|
||||||
// }
|
allowOutsideClick: false,
|
||||||
// });
|
didOpen: () => {
|
||||||
|
Swal.showLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// $.ajax({
|
$.ajaxSetup({
|
||||||
// url: "{{ route('user-pembeli.pay', ':id') }}"
|
headers: {
|
||||||
// .replace(':id', id),
|
'X-CSRF-TOKEN': csrfToken
|
||||||
// type: "POST",
|
}
|
||||||
// contentType: false,
|
});
|
||||||
// processData: false,
|
|
||||||
// success: function(response) {
|
$.ajax({
|
||||||
// Swal.fire({
|
url: "{{ route('user-pembeli.pending') }}",
|
||||||
// title: 'Berhasil',
|
type: "PUT",
|
||||||
// text: response.message,
|
data: {
|
||||||
// icon: 'info',
|
id: id
|
||||||
// confirmButtonText: 'OK'
|
},
|
||||||
// });
|
success: function(response) {
|
||||||
// console.log(response);
|
Swal.fire({
|
||||||
// },
|
title: response.status ?
|
||||||
// error: function(error) {
|
'Pembayaran Ditunda' : 'Gagal',
|
||||||
// Swal.fire({
|
text: response.message,
|
||||||
// title: 'Gagal',
|
icon: response.status ? 'info' :
|
||||||
// text: 'Gagal mengupdate pembayaran ke database',
|
'error',
|
||||||
// icon: 'error'
|
confirmButtonText: 'OK'
|
||||||
// });
|
});
|
||||||
// console.log(error);
|
},
|
||||||
// }
|
error: function(error) {
|
||||||
// });
|
Swal.fire({
|
||||||
console.log(result);
|
title: 'Gagal',
|
||||||
|
text: 'Gagal mengupdate pembayaran ke database',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onError: function(result) {
|
onError: function(result) {
|
||||||
// $.ajaxSetup({
|
Swal.fire({
|
||||||
// headers: {
|
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>',
|
||||||
// 'X-CSRF-TOKEN': csrfToken
|
allowEscapeKey: false,
|
||||||
// }
|
allowOutsideClick: false,
|
||||||
// });
|
didOpen: () => {
|
||||||
|
Swal.showLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// $.ajax({
|
$.ajaxSetup({
|
||||||
// url: "{{ route('user-pembeli.pay', ':id') }}"
|
headers: {
|
||||||
// .replace(':id', id),
|
'X-CSRF-TOKEN': csrfToken
|
||||||
// type: "POST",
|
}
|
||||||
// contentType: false,
|
});
|
||||||
// processData: false,
|
|
||||||
// success: function(response) {
|
$.ajax({
|
||||||
// Swal.fire({
|
url: "{{ route('user-pembeli.error') }}",
|
||||||
// title: 'Gagal',
|
type: "PUT",
|
||||||
// text: response.message,
|
data: {
|
||||||
// icon: 'error',
|
id: id
|
||||||
// });
|
},
|
||||||
// console.log(response);
|
success: function(response) {
|
||||||
// },
|
Swal.fire({
|
||||||
// error: function(error) {
|
title: response.status ?
|
||||||
// Swal.fire({
|
'Pembayaran Gagal' : 'Gagal',
|
||||||
// title: 'Gagal',
|
text: response.message,
|
||||||
// text: 'Gagal mengupdate pembayaran ke database',
|
icon: 'error',
|
||||||
// icon: 'error'
|
});
|
||||||
// });
|
},
|
||||||
// console.log(error);
|
error: function(error) {
|
||||||
// }
|
Swal.fire({
|
||||||
// });
|
title: 'Gagal',
|
||||||
// Swal.fire({
|
text: 'Gagal mengupdate pembayaran ke database',
|
||||||
// title: 'Gagal',
|
icon: 'error'
|
||||||
// text: 'Terjadi kesalahan karena ' + result,
|
});
|
||||||
// icon: 'error'
|
}
|
||||||
// });
|
});
|
||||||
console.log(result);
|
|
||||||
},
|
},
|
||||||
onClose: function(error) {
|
onClose: function(error) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Ditunda',
|
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>',
|
||||||
text: 'Kamu menutup halaman pembayaran. Silahkan lakukan pembayaran nanti',
|
allowEscapeKey: false,
|
||||||
icon: 'info'
|
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();
|
location.reload();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(response);
|
|
||||||
},
|
},
|
||||||
error: function(error) {
|
error: function(error) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -323,7 +362,6 @@
|
|||||||
text: response.message,
|
text: response.message,
|
||||||
icon: 'error'
|
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>
|
<a href="#" type="button" class="btn btn-danger" data-id="${id}" id="complain">Ajukan Komplain</a>
|
||||||
`;
|
`;
|
||||||
modal.find('.modal-footer').html(activitiesHtml);
|
modal.find('.modal-footer').html(activitiesHtml);
|
||||||
console.log(id);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// selesai
|
// selesai
|
||||||
$('#modalFinish').on('click', '#finishTransaction', function() {
|
$('#modalFinish').on('click', '#finishTransaction', function() {
|
||||||
var id = $(this).data('id');
|
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);
|
console.log(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
// complain
|
// complain
|
||||||
$('#modalFinish').on('click', '#complain', function() {
|
$('#modalFinish').on('click', '#complain', function() {
|
||||||
var id = $(this).data('id');
|
var id = $(this).data('id');
|
||||||
|
location.href = "{{ route('user-refund.create', ':id') }}".replace(':id', id);
|
||||||
console.log(id);
|
console.log(id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -5,7 +5,34 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header d-flex justify-content-center">
|
<div class="modal-header d-flex justify-content-center">
|
||||||
<h2 class="modal-title fs-5" id="staticBackdropLabel">Konfirmasi Pesanan</h2>
|
<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>
|
||||||
<div class="modal-footer d-flex justify-content-center">
|
<div class="modal-footer d-flex justify-content-center">
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1"
|
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||||
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header d-flex justify-content-center">
|
<div class="modal-header d-flex justify-content-center">
|
||||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
||||||
@ -19,7 +18,10 @@
|
|||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Capture</label>
|
<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>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -29,12 +31,14 @@
|
|||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Cancel</label>
|
<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>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Expire</label>
|
<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>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -64,7 +68,8 @@
|
|||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Refund</label>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -414,7 +414,6 @@
|
|||||||
"{{ route('user-pembeli.index') }}";
|
"{{ route('user-pembeli.index') }}";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(response);
|
|
||||||
},
|
},
|
||||||
error: function(error) {
|
error: function(error) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -422,7 +421,6 @@
|
|||||||
text: "Gagal mengirimkan data karena " + error,
|
text: "Gagal mengirimkan data karena " + error,
|
||||||
icon: "error",
|
icon: "error",
|
||||||
});
|
});
|
||||||
console.log(error);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -81,36 +81,35 @@
|
|||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
{{-- Setelah dibayar --}}
|
{{-- Setelah dibayar --}}
|
||||||
@if ($transaction->status_transaksi == 'success')
|
{{-- @if ($transaction->status_transaksi == 'success') --}}
|
||||||
<li><a class="dropdown-item" href="#"
|
<li><a class="dropdown-item" href="#"
|
||||||
id="processTransaction"
|
id="processTransaction"
|
||||||
data-id="{{ $transaction->id }}">Proses
|
data-id="{{ $transaction->id }}">Proses
|
||||||
Transaksi</a>
|
Transaksi</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
{{-- @endif --}}
|
||||||
{{-- Pengiriman barang --}}
|
{{-- Pengiriman barang --}}
|
||||||
@if ($transaction->status_transaksi == 'process')
|
{{-- @if ($transaction->status_transaksi == 'process') --}}
|
||||||
<li><a class="dropdown-item" href="#"
|
<li><a class="dropdown-item" href="#" id="sendOrder"
|
||||||
id="sendOrder"
|
|
||||||
data-id="{{ $transaction->id }}">Kirim
|
data-id="{{ $transaction->id }}">Kirim
|
||||||
Barang</a>
|
Barang</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
{{-- @endif --}}
|
||||||
@if ($transaction->status_transaksi == 'sending')
|
{{-- @if ($transaction->status_transaksi == 'sending') --}}
|
||||||
<li><a class="dropdown-item" href="#"
|
<li><a class="dropdown-item" href="#"
|
||||||
data-toggle="modal"
|
data-toggle="modal" data-target="#modalOrderSent"
|
||||||
data-target="#modalOrderSent" id="sentOrder"
|
id="sentOrder"
|
||||||
data-id="{{ $transaction->id }}">Barang sudah
|
data-id="{{ $transaction->id }}">Barang sudah
|
||||||
sampai</a>
|
sampai</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
{{-- @endif --}}
|
||||||
@if ($transaction->status_transaksi == 'finished')
|
{{-- @if ($transaction->status_transaksi == 'finished') --}}
|
||||||
<li><a class="dropdown-item" href="#"
|
<li><a class="dropdown-item" href="#"
|
||||||
id="acceptResult"
|
id="acceptResult"
|
||||||
data-id="{{ $transaction->id }}">Terima
|
data-id="{{ $transaction->id }}">Terima
|
||||||
Uang</a>
|
Uang</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
{{-- @endif --}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</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>
|
</script>
|
||||||
@endsection
|
@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"
|
<div class="modal fade" id="modalKeteranganStatus" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
||||||
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header d-flex justify-content-center">
|
<div class="modal-header d-flex justify-content-center">
|
||||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
<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>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
@ -1,21 +1,45 @@
|
|||||||
<!-- Modal -->
|
<!-- 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">
|
aria-hidden="true">
|
||||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h2 class="modal-title" id="exampleModalLongTitle">Tracking Information</h2>
|
<h2 class="modal-title" id="exampleModalLongTitle">Pengiriman Barang/Jasa Selesai</h2>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="section-body">
|
<div class="section-body">
|
||||||
|
<p>Pastikan barangnya sudah sampai dengan bukti foto dan keterangan (Jika ada)</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="activities">
|
<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>
|
||||||
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<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">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -155,6 +155,9 @@ Route::middleware(['auth'])->group(function(){
|
|||||||
Route::post('user-pembeli','store')->name('user-pembeli.store');
|
Route::post('user-pembeli','store')->name('user-pembeli.store');
|
||||||
Route::put('user-pembeli/bayar-transaksi','payTransaction')->name('user-pembeli.pay');
|
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/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-selesai','finishTransaction')->name('user-pembeli.finish');
|
||||||
Route::put('user-pembeli/transaksi-komplain/{id}','complaintTransaction')->name('user-pembeli.complain');
|
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::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/terima-transaksi','acceptTransaction')->name('user-penjual.accept');
|
||||||
Route::put('user-penjual/kirim-pesanan','sendingOrder')->name('user-penjual.sending');
|
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
|
// Tampilan refund
|
||||||
|
Loading…
Reference in New Issue
Block a user