Omnipay Stripe payment validation error with default example

124 views Asked by At

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:

Omnipay stripe error

How can I solve this?

0

There are 0 answers