According to the documentation, this is the example code I used to make the payment.
$paymentMethod = $_POST['paymentMethodId'];
$response = $gateway->authorize([
'amount' => '10.00',
'currency' => 'USD',
'description' => 'This is a test purchase transaction.',
'paymentMethod' => $paymentMethod,
'returnUrl' => $completePaymentUrl,
'confirm' => true,
])->send();
But it gives me a validation error:
How can I solve this?