mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Fixes for stripe connect
This commit is contained in:
parent
bbaecb3c06
commit
d6bd19e6c0
@ -20,7 +20,7 @@ class PaymentWebhookController extends Controller
|
|||||||
{
|
{
|
||||||
public function __invoke(PaymentWebhookRequest $request, string $company_key, string $company_gateway_id)
|
public function __invoke(PaymentWebhookRequest $request, string $company_key, string $company_gateway_id)
|
||||||
{
|
{
|
||||||
dd('here');
|
|
||||||
MultiDB::findAndSetDbByCompanyKey($company_key);
|
MultiDB::findAndSetDbByCompanyKey($company_key);
|
||||||
|
|
||||||
$payment = $request->getPayment();
|
$payment = $request->getPayment();
|
||||||
|
@ -31,6 +31,9 @@ class StripeConnectController extends BaseController
|
|||||||
{
|
{
|
||||||
// Should we check if company has set country in the ap? Otherwise this will fail.
|
// Should we check if company has set country in the ap? Otherwise this will fail.
|
||||||
|
|
||||||
|
if(!is_array($request->getTokenContent()))
|
||||||
|
throw new \Exception('Invalid token');
|
||||||
|
|
||||||
MultiDB::findAndSetDbByCompanyKey($request->getTokenContent()['company_key']);
|
MultiDB::findAndSetDbByCompanyKey($request->getTokenContent()['company_key']);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
@ -50,12 +50,6 @@ class InitializeStripeConnectRequest extends FormRequest
|
|||||||
{
|
{
|
||||||
$data = Cache::get($this->token);
|
$data = Cache::get($this->token);
|
||||||
|
|
||||||
abort_if(!$data, 404);
|
|
||||||
|
|
||||||
abort_if(!array_key_exists('user_id', $data), 404);
|
|
||||||
|
|
||||||
abort_if(!array_key_exists('company_key', $data), 404);
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,8 +195,8 @@ Route::get('token_hash_router', 'OneTimeTokenController@router');
|
|||||||
Route::get('webcron', 'WebCronController@index');
|
Route::get('webcron', 'WebCronController@index');
|
||||||
|
|
||||||
Route::group(['middleware' => ['locale']], function () {
|
Route::group(['middleware' => ['locale']], function () {
|
||||||
Route::get('stripe_connect/completed', 'StripeConnectController@completed')->name('stripe_connect.return');
|
|
||||||
Route::get('stripe_connect/{token}', 'StripeConnectController@initialize')->name('stripe_connect.initialization');
|
Route::get('stripe_connect/{token}', 'StripeConnectController@initialize')->name('stripe_connect.initialization');
|
||||||
|
Route::get('stripe_connect/completed', 'StripeConnectController@completed')->name('stripe_connect.return');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::fallback('BaseController@notFound');
|
Route::fallback('BaseController@notFound');
|
||||||
|
Loading…
Reference in New Issue
Block a user