fix payment bug
This commit is contained in:
parent
1d1e8b121d
commit
79dfbd79a3
@ -282,20 +282,20 @@ class VAPaymentController extends Controller
|
|||||||
$finalAmount - $history['instructor_revenue'];
|
$finalAmount - $history['instructor_revenue'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment_history::insert($history);
|
Payment_history::insert($history);
|
||||||
|
|
||||||
// // 3️⃣ Enrollment
|
// 3️⃣ Enrollment
|
||||||
// Enrollment::insert([
|
Enrollment::insert([
|
||||||
// 'user_id' => $payment->user_id,
|
'user_id' => $payment->user_id,
|
||||||
// 'course_id' => $course->id,
|
'course_id' => $course->id,
|
||||||
// 'enrollment_type' => 'paid',
|
'enrollment_type' => 'paid',
|
||||||
// 'entry_date' => time(),
|
'entry_date' => time(),
|
||||||
// 'expiry_date' => $course->expiry_period > 0
|
'expiry_date' => $course->expiry_period > 0
|
||||||
// ? strtotime('+' . ($course->expiry_period * 30) . ' days')
|
? strtotime('+' . ($course->expiry_period * 30) . ' days')
|
||||||
// : null,
|
: null,
|
||||||
// 'created_at' => now(),
|
'created_at' => now(),
|
||||||
// 'updated_at' => now(),
|
'updated_at' => now(),
|
||||||
// ]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,18 +145,18 @@ Route::middleware(['auth'])->group(function () {
|
|||||||
Route::post('tutor-review', 'tutor_review')->name('tutor_review');
|
Route::post('tutor-review', 'tutor_review')->name('tutor_review');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
// offline payment
|
||||||
|
|
||||||
Route::middleware('auth')->group(function () {
|
|
||||||
//Certificate download
|
|
||||||
Route::get('certificate/{identifier}', [HomeController::class, 'download_certificate'])->name('certificate');
|
|
||||||
// offline payment
|
|
||||||
Route::post('payment/offline/store', [OfflinePaymentController::class, 'store'])->name('payment.offline.store');
|
Route::post('payment/offline/store', [OfflinePaymentController::class, 'store'])->name('payment.offline.store');
|
||||||
// offline payment
|
// offline payment
|
||||||
Route::post('payment/va/store', [VAPaymentController::class, 'store'])->name('payment.va.store');
|
Route::post('payment/va/store', [VAPaymentController::class, 'store'])->name('payment.va.store');
|
||||||
Route::get('payment/va/{id}', [VAPaymentController::class, 'show'])->name('payment.va.show');
|
Route::get('payment/va/{id}', [VAPaymentController::class, 'show'])->name('payment.va.show');
|
||||||
Route::get('/payment/va/{id}/status', [VAPaymentController::class, 'checkPaymentApi'])->name('payment.va.status');
|
Route::get('/payment/va/{id}/status', [VAPaymentController::class, 'checkPaymentApi'])->name('payment.va.status');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Certificate download
|
||||||
|
Route::get('certificate/{identifier}', [HomeController::class, 'download_certificate'])->name('certificate')->withoutMiddleware(['verified']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user