设置 Stripe 结帐会话的描述

Cha*_*tis 1 php stripe-payments

我按照他们的要求开发了年底的最后一个 Stripe 模块,但自从我提出之后,我就没有再在 Stripe 中提供任何描述和客户姓名。

你知道我怎样才能把它再放一次吗?

这是我的 PHP 代码:

 try { 
    $session = \Stripe\Checkout\Session::create([ 
        'payment_method_types' => ['card'],
        'customer_email' => $email,
        'line_items' => [[ 
            'price_data' => [ 
                'product_data' => [ 
                    'name' => $custom['item_name'], 
                    'metadata' => [ 
                        'pro_id' => $custom['item_name'] 
                    ] 
                ], 
                'unit_amount' => (isset($custom['amountTotal']) ? $custom['amountTotal'] : $custom['amount'])*100, 
                'currency' => $custom['currency_code'], 
            ], 
            'quantity' => 1, 
            'description' => $custom['item_name'], 
        ]], 
        'mode' => 'payment', 
        'success_url' => $url, 
        'cancel_url' => $request->cancel,
        ], ['stripe_account' => $_SESSION['param']->stripeUID]); 
}catch(Exception $e) {  
    $api_error = $e->getMessage();  
} 
 
if(empty($api_error) && $session){ 
    $response = array( 
        'status' => 1, 
        'message' => 'Checkout Session created successfully!', 
        'sessionId' => $session['id'] 
    ); 
}else{ 
    $response = array( 
        'status' => 0, 
        'error' => array( 
            'message' => 'Checkout Session creation failed! '.$api_error    
        ) 
    ); 
} 
Run Code Online (Sandbox Code Playgroud)

这就是我现在所拥有的在此输入图像描述