OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
quiz
/
assets
/
payment
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/15/2025 11:20:33 AM
rwxr-xr-x
📄
checkout.php
1.04 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
composer.json
62 bytes
02/15/2025 11:21:46 AM
rw-r--r--
📄
composer.lock
5.6 KB
02/15/2025 11:21:46 AM
rw-r--r--
📄
payment_success.php
7.77 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
test.html
257 bytes
02/15/2025 11:21:46 AM
rw-r--r--
📁
vendor
-
05/19/2025 10:07:16 AM
rwxr-xr-x
📄
verify_payment.php
3.91 KB
05/19/2025 10:07:16 AM
rw-r--r--
Editing: checkout.php
Close
<?php header('Content-Type: application/json'); include '../php/validate.logged.php'; require 'vendor/autoload.php'; // Include Razorpay PHP SDK use Razorpay\Api\Api; $api = new Api('rzp_live_7lW7YYdRevsBbo', 'ZSdtQlvmcLp7a2U4CQYoLH5s'); $data = json_decode(file_get_contents("php://input"), true); // $amount = $data['amount'] ?? null; $amount = 100; if (!$amount) { http_response_code(400); echo json_encode(['error' => 'Invalid request: Amount is required']); exit; } try { // Create a new order with Razorpay $order = $api->order->create([ 'receipt' => 'order_rcptid_11', 'amount' => $amount, // amount in smallest currency unit (paise) 'currency' => 'INR', 'payment_capture' => 1 // auto capture ]); // Send the order ID and amount back as JSON echo json_encode(['order_id' => $order['id'], 'amount' => $amount]); } catch (\Exception $e) { http_response_code(500); echo json_encode(['error' => 'Failed to create order: ' . $e->getMessage()]); }