admin管理员组

文章数量:1123687

I am getting the error below from Stripe redirect to the checkout page:

Something went wrong. The page you were looking for could not be found. Please check the URL or contact the merchant.

Here is the code:

  $checkout_session =\Stripe\Checkout\Session::create([
      
      'customer_email' => $user,
      
      'line_items' => [[
        'price_data' => [
          'currency' => $_ENV['STRIPE_CURRENCY'],
          'product_data' => [
            'name' => $article->getCategory(),
          ],              
          'unit_amount' =>$total * 100,
        ],
        'quantity'=> $quantity
      ]],
      'mode' => 'payment',
      'success_url' => $domain .'/success',
      'cancel_url' => $domain .'/cancel',
    ]);      
  return $this->redirect($checkout_session->url);

本文标签: phpRedirect of Stripe payment doesn39t work in SymfonyStack Overflow