HELP: SCA - migrating SQPaymentForm to Web Payments SDK - PHP

the php I’ve been trying from their SDK has a square/index.php (creates card to charge form) and it goes to the payment_process_php which does the charge and displays the result ‘payment successful’ . It’s crazy that no code I write from there will take control. I’m lost. Here’s the code from the end of payment_process.php. Logically I wait for the result so I’ve tried code after but it’s dead…Maybe you have an idea I hope. 4 days and Square has no idea yet either (and they wrote this)

try {
$create_payment_request = new CreatePaymentRequest($token, Uuid::uuid4(), $money);

$response = $payments_api->createPayment($create_payment_request);

if ($response->isSuccess()) {
echo json_encode($response->getResult());
} else {
echo json_encode(array(‘errors’ => $response->getErrors()));
}
} catch (ApiException $e) {
echo json_encode(array(‘errors’ => $e));
}

I’ve tried code after and in the middle but nothing gives it back to me it remains a dead page