I am using Laravel Omnipay and Omnipay/Stripe. I am trying to set an application fee (Stripe resource) to be collected but after I fill in card data and post to my controller I get this error:
InvalidRequestException in AbstractRequest.php line 213: The source parameter is required
According to Omnipay/Stripe I am allowed to pass the application_fee
(AbstractRequest reference) as a transactionFee
but it is not working
My controller:
$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();
How do I get it where I can charge an application fee?