使用Omnipay / Stripe设置申请费

时间:2017-06-24 04:06:54

标签: php laravel stripe-connect omnipay

我正在使用Laravel Omnipay和Omnipay / Stripe。我正在尝试设置要收取的申请费(Stripe resource),但在我填写卡片数据并发布到我的控制器后,我收到此错误:

  

AbstractRequest.php第213行中的InvalidRequestException:源代码   参数是必需的

根据Omnipay/Stripe我可以将application_fee (AbstractRequest reference)作为transactionFee传递,但它无效

我的控制器:

$payment = $request->amount;
$gateway = Omnipay::create('Stripe');
$gateway->setApiKey($company->settings()->get('gateway_keys')['Stripe']['test_secret']);

// Send purchase request
$response = $gateway->purchase(
    [
        'amount' => $payment,
        'currency' => 'USD',
        'token' => $request->stripeToken,
        'transactionFee' => 100,
        'stripe_account' => $company->settings()->get('gateway_keys')['Stripe']['account_id']
        //'card' => $formData
    ]
)->send();

我如何才能收取申请费?

0 个答案:

没有答案