How to understand Stripe implementation code
As far as I’ve got to vaguely understand the Stripe code (The code below). This code is registering in the Stripe dashboard as "incomplete" so I’ve got it partly working. I’m not fully sure what the code below is doing. Could you point me to where I can understand this code from a beginner’s perspective and eventually fully understand Stripe? I know the basics of HTML JS PHP
<?php //Just pass in a value ?v=4000 in URL for $40 charge for example: $amount = $_GET['v']; require 'stripe-php-7.40.0/init.php'; // Set secret test key. function do_payment($x){ \Stripe\Stripe::setApiKey(MY_SECRET_KEY); \Stripe\PaymentIntent::create([ 'amount' => $x, 'currency' => 'nzd', 'payment_method_types' => ['card'], 'receipt_email' => '[email protected]', ]); }; do_payment($amount); ?>