簡體   English   中英

申請費錯誤 - 條紋

[英]Application Fee Error - Stripe

當我嘗試使用以下代碼以條帶形式收取申請費時

$charge = \Stripe\Charge::create(array(
    'amount' => $amtincents,
    'currency' => 'usd',
    'source' => $stripetoken,
    'application_fee' => $appfee,
    'description' => 'Campaign Donation',
    'metadata' => array("Campaign Id" => $id)
    ), array('stripe_account' => $stripe_connected_user_id)
);

我收到以下錯誤

Array
(
    [error] => Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter).
)

我之前和上次都在 Stripe 工作過,我沒有遇到這個問題。 我的捐贈表格(用於收取我使用條紋的捐款)和我正在執行條紋操作的頁面在同一個站點中。 我目前只是在測試。

您可能正在使用不支持Stripe-Account標頭的舊版Stripe PHP 庫 理想情況下,您應該使用最新版本(此時為 4.4.0)。

如果這不是問題,則$stripe_connected_user_id變量可能具有空值。 確保變量包含有效的帳戶 ID ( "acct_..." )。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM