Im trying to integrate Stripe using php. When making some initial configurations like in the code below:
<?php
require_once('./elda.php');
$token = $_POST['stripeToken'];
$customer = \Stripe\Customer::create(array(
'email' => 'customer@example.com',
'source' => $token
));
$charge = \Stripe\Charge::create(array(
'customer' => $customer->id,
'amount' => 5000,
'currency' => 'usd'
));
echo '<h1>Successfully charged $50.00!</h1>';
?>
I take this error as output
Notice: Undefined index: stripeToken in C:\xampp\htdocs\laravel\stripe\public\2.php on line 4
Can someone show me how to deal with this error? Im new at Stripe and PHP.