%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/www/website_93b53270/ |
Upload File : |
<?php
require 'vendor/autoload.php'; // composer require stripe/stripe-php
\Stripe\Stripe::setApiKey('sk_test_51RFZdPI57IBHDEDrnm5ApwntiLpcSGQ6Gq2pmWuydeYCAyJ0xAoE24l9MreujHEgcxW4hImNScbxaD6c9ERNIO1K00XE8kGLTi'); // apna secret key yahan lagayein
header('Content-Type: application/json');
try {
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => 184000,
'currency' => 'aed',
'payment_method_types' => ['card'],
]);
echo json_encode(['clientSecret' => $paymentIntent->client_secret]);
} catch (Exception $e) {
http_response_code(500);
echo json_encode(['error' => $e->getMessage()]);
}
?>