Update Saqel Platform: 2026-09-08 13:43:36
This commit is contained in:
@@ -24,7 +24,7 @@ class CliqPaymentController
|
||||
public function initiatePayment(Request $request, Response $response): void
|
||||
{
|
||||
$body = $request->getBody();
|
||||
$studentId = (int)($body['student_id'] ?? $request->user_id ?? 0);
|
||||
$studentId = (int)($request->user_id ?? 0);
|
||||
$courseId = (int)($body['course_id'] ?? 0);
|
||||
|
||||
if (!$studentId || !$courseId) {
|
||||
@@ -47,7 +47,7 @@ class CliqPaymentController
|
||||
public function submitReceipt(Request $request, Response $response): void
|
||||
{
|
||||
$body = $request->getBody();
|
||||
$studentId = (int)($body['student_id'] ?? $request->user_id ?? 0);
|
||||
$studentId = (int)($request->user_id ?? 0);
|
||||
$referenceCode = trim((string)($body['reference_code'] ?? ''));
|
||||
$receiptBase64 = (string)($body['receipt_image'] ?? '');
|
||||
$manualTxId = isset($body['bank_transaction_id']) ? (string)$body['bank_transaction_id'] : null;
|
||||
@@ -72,7 +72,7 @@ class CliqPaymentController
|
||||
public function requestTeacherPayout(Request $request, Response $response): void
|
||||
{
|
||||
$body = $request->getBody();
|
||||
$teacherId = (int)($body['teacher_id'] ?? $request->user_id ?? 1);
|
||||
$teacherId = (int)($request->user_id ?? 0);
|
||||
$amountJod = (float)($body['amount_jod'] ?? 0.0);
|
||||
$cliqAlias = trim((string)($body['cliq_alias'] ?? ''));
|
||||
|
||||
@@ -95,7 +95,7 @@ class CliqPaymentController
|
||||
*/
|
||||
public function getTeacherPayoutStatus(Request $request, Response $response): void
|
||||
{
|
||||
$teacherId = (int)($request->user_id ?? $_GET['teacher_id'] ?? 1);
|
||||
$teacherId = (int)($request->user_id ?? 0);
|
||||
$payouts = CliqPaymentService::getTeacherPayouts($teacherId);
|
||||
|
||||
$response->json([
|
||||
|
||||
Reference in New Issue
Block a user