diff --git a/checkout.php b/checkout.php index 22bf1da..a3508d1 100644 --- a/checkout.php +++ b/checkout.php @@ -122,7 +122,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'cancel_url' => $cancelUrl, 'metadata' => [ 'subscription_id' => $id, - 'customer_email' => $form['email'] + 'customer_email' => $form['email'], + 'name' => $form['full_name'], + 'contact_number' => $form['whatsapp'], + 'email_id' => $form['email'] ] ]; @@ -141,7 +144,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $resData = json_decode($response, true); if (isset($resData['success']) && $resData['success'] && isset($resData['data']['session_id'])) { $sessionId = $resData['data']['session_id']; - db()->query("UPDATE subscriptions SET thawani_reference = " . db()->quote($sessionId) . " WHERE id = " . $id); + db()->query("UPDATE student_subscriptions SET thawani_reference = " . db()->quote($sessionId) . " WHERE id = " . $id); $thawaniRedirect = "$baseUrl/pay/$sessionId?key={$thawaniConfig['thawani_publishable_key']}"; } else { error_log('Thawani Session Error: ' . $response);