OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
assets
/
payment
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
04/17/2025 09:15:05 AM
rwxrwxr-x
📄
bpayment_success.php
8.75 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
bverify_payment.php
2.99 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
checkout.php
1.02 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
composer.json
62 bytes
01/04/2025 02:43:28 PM
rw-r--r--
📄
composer.lock
5.6 KB
01/04/2025 02:43:28 PM
rw-r--r--
📄
payment_success.html
6.5 KB
01/04/2025 02:13:29 PM
rw-r--r--
📄
payment_success.php
8.44 KB
05/19/2025 10:07:15 AM
rw-r--r--
📄
test.html
257 bytes
01/04/2025 02:43:28 PM
rw-r--r--
📁
vendor
-
05/19/2025 10:07:15 AM
rwxr-xr-x
📄
verify_payment.php
5.85 KB
05/19/2025 10:07:15 AM
rw-r--r--
Editing: checkout.php
Close
<?php header('Content-Type: application/json'); include 'assets/php/validate.logged.php'; require 'vendor/autoload.php'; // Include Razorpay PHP SDK use Razorpay\Api\Api; $api = new Api('rzp_live_7jewjPRtdjNjnA', 'Rql3nFUJRlKLuHBtxbLVoweo'); $data = json_decode(file_get_contents("php://input"), true); $amount = $data['amount'] ?? null; 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()]); }