Credit card issue

That’s what I’m trying to figure out.
The link you gave me is what I’ve used to get the $token, please view Question 2 above at the bottom (where it ends with: print_r($data); // = gives empty result )

Question 1:
Can you advise if that code above is all I need to get the token?
If it is, the error must be from the html/js side.
Although after running “file_get_contents(‘php://input’);”, I do see there is a variable called “nds-pmd” it has bunch of jibberish in it not sure if that means something

Question 2:
By the way, “const paymentResponse = await fetch(‘/payment’, {
does this refer to a FOLDER “payment” on the webserver by any chance?
Because I do have a “payment.php” in the sdk /src/Models. Should it not be instead:
const paymentResponse = await fetch(‘/src/Models/payment’, { ?

Question 3:
Can you kindly advise if this HTML/JS is enough to make a payment? web-payments-quickstart/card.html at main · square/web-payments-quickstart · GitHub
I’m trying to see if there’s anything missing from this code. If it’s not I’ll just use this and the rest will be up to the PHP I just want to make sure my HTML+JS (That’s same as this link) is without issues.