Change webhook order

This commit is contained in:
Benjamin Beganović 2020-12-17 12:47:46 +01:00
parent 79c6cc474a
commit 6fa90c7060
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class PaymentWebhookController extends Controller
$this->middleware('guest');
}
public function __invoke(PaymentWebhookRequest $request, string $company_gateway_id, string $company_key)
public function __invoke(PaymentWebhookRequest $request, string $company_key, string $company_gateway_id)
{
$payment = $request->getPayment();
$client = is_null($payment) ? $request->getClient() : $payment->client;

View File

@ -129,8 +129,8 @@ class CreditCard
$payment->{'3ds'} = ['enabled' => true];
$payment->{'success_url'} = route('payment_webhook', [
'company_gateway_id' => $this->checkout->company_gateway->hashed_id,
'company_key' => $this->checkout->client->company->company_key,
'company_gateway_id' => $this->checkout->company_gateway->hashed_id,
'hash' => $this->checkout->payment_hash->hash,
]);
}

View File

@ -185,6 +185,6 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
Route::post('support/messages/send', 'Support\Messages\SendingController');
});
Route::match(['get', 'post'], 'payment_webhook/{company_gateway_id}/{company_key}', 'PaymentWebhookController')->name('payment_webhook');
Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', 'PaymentWebhookController')->name('payment_webhook');
Route::fallback('BaseController@notFound');