Stripe payments “条带支付系统不返回”;名称“;webhooks中的字段

Stripe payments “条带支付系统不返回”;名称“;webhooks中的字段,stripe-payments,Stripe Payments,我试图通过webhook获取2020/08 stripe API版本中的行_项,但它不会在webhook中返回。我的代码是: $session = \Stripe\Checkout\Session::create([ 'customer' => $user, 'payment_method_types' => ['card'], //'metadata' => ['item_id' => '6735'], 'line_items' => [[

我试图通过webhook获取2020/08 stripe API版本中的行_项,但它不会在webhook中返回。我的代码是:

$session = \Stripe\Checkout\Session::create([
    'customer' => $user,
  'payment_method_types' => ['card'],
  //'metadata' => ['item_id' => '6735'],
  'line_items' => [[
    'name' => 'cows',//$name,
    'description' => $description,
    'images' => ['https://www.mathtutortime.com/account/add_time/selected/tutoring.jpg'],
    'amount' => 0050.00,
    'currency' => 'usd',
    'quantity' => 1,
    ],
  ],
  'mode' => 'payment',

  'success_url' =>'https://www.mathtutortime.com/account/add_time/selected/success2?session_id={CHECKOUT_SESSION_ID}&bought='.urlencode($description).'',
  'cancel_url' => 'https://www.mathtutortime.com/account/add_time/selected/failure',
]);
,并且在签出会话事件中返回的内容是:

{
  "id": "evt_1IuOvpBaP49eHvWwXFoFZzsB",
  "object": "event",
  "api_version": "2020-08-27",
  "created": 1621805637,
  "data": {
    "object": {
      "id": "cs_test_a1U80BcqqjXeudvxrYDCUr34w5YZBUCKRN8qCdCMx7wGWnGMhtrP7I3xFk",
      "object": "checkout.session",
      "allow_promotion_codes": null,
      "amount_subtotal": 50,
      "amount_total": 50,
      "billing_address_collection": null,
      "cancel_url": "https://www.mathtutortime.com/account/add_time/selected/failure",
      "client_reference_id": null,
      "currency": "usd",
      "customer": "rickster26ter4",
      "customer_details": {
        "email": "rick.giovanini1@gmail.com",
        "tax_exempt": "none",
        "tax_ids": [
        ]
      },
      "customer_email": null,
      "livemode": false,
      "locale": null,
      "metadata": {
      },
      "mode": "payment",
      "payment_intent": "pi_1IuOvFBaP49eHvWw9jkdH1nb",
      "payment_method_options": {
      },
      "payment_method_types": [
        "card"
      ],
      "payment_status": "paid",
      "setup_intent": null,
      "shipping": null,
      "shipping_address_collection": null,
      "submit_type": null,
      "subscription": null,
      "success_url": "https://www.mathtutortime.com/account/add_time/selected/success2?session_id={CHECKOUT_SESSION_ID}&bought=1+Hour+of+Tutoring+%2B+Premium+Dashboard+Features",
      "total_details": {
        "amount_discount": 0,
        "amount_shipping": 0,
        "amount_tax": 0
      }
    }
  },
  "livemode": false,
  "pending_webhooks": 1,
  "request": {
    "id": null,
    "idempotency_key": null
  },
  "type": "checkout.session.completed"
}
没有行项目,甚至没有“名称”。此外,我还从我的webhook返回了一个错误:

                <br />
<b>Notice</b>:  Trying to get property 'custom' of non-object in <b>/var/www/html/account/add_time/selected/success/webhook.php</b> on line <b>30</b><br />
<br />
<b>Notice</b>:  Trying to get property 'name' of non-object in <b>/var/www/html/account/add_time/selected/success/webhook.php</b> on line <b>30</b><br />

注意:试图在第30行的/var/www/html/account/add_time/selected/success/webhook.php中获取非对象的属性“custom”

注意:试图在第30行的/var/www/html/account/add_time/selected/success/webhook.php中获取非对象的属性“name”

谢谢你的帮助。到目前为止,Stripe没有什么帮助…

line\u项目是。您需要重新检索结帐会话和。

您能详细解释一下这是什么意思吗?我想我是这样扩展行项目的:“行项目”=>[[['name'=>'cows',//$name,…”您通过这样做来创建它们;您还需要添加一个参数来扩展它们: