mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 11:27:34 -04:00 
			
		
		
		
	Fixes for routes file"
This commit is contained in:
		
							parent
							
								
									b3f6ff10fb
								
							
						
					
					
						commit
						bbaecb3c06
					
				| @ -1 +1 @@ | |||||||
| 5.1.50 | 5.1.51 | ||||||
| @ -13,14 +13,22 @@ | |||||||
| namespace App\Http\Controllers; | namespace App\Http\Controllers; | ||||||
| 
 | 
 | ||||||
| use App\Http\Requests\Payments\PaymentWebhookRequest; | use App\Http\Requests\Payments\PaymentWebhookRequest; | ||||||
|  | use App\Libraries\MultiDB; | ||||||
|  | use Auth; | ||||||
| 
 | 
 | ||||||
| class PaymentWebhookController extends Controller | 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); | ||||||
|  | 
 | ||||||
|         $payment = $request->getPayment(); |         $payment = $request->getPayment(); | ||||||
|         $client = is_null($payment) ? $request->getClient() : $payment->client; |         $client = is_null($payment) ? $request->getClient() : $payment->client; | ||||||
| 
 | 
 | ||||||
|  |         // $contact= $client->primary_contact()->first();
 | ||||||
|  |         // Auth::guard('contact')->login($contact, true);
 | ||||||
|  | 
 | ||||||
|         return $request->getCompanyGateway() |         return $request->getCompanyGateway() | ||||||
|             ->driver($client) |             ->driver($client) | ||||||
|             ->processWebhookRequest($request, $payment); |             ->processWebhookRequest($request, $payment); | ||||||
|  | |||||||
| @ -141,7 +141,7 @@ class CreditCard | |||||||
|         $this->checkout->payment_hash->data = array_merge((array)$this->checkout->payment_hash->data, ['checkout_payment_ref' => $payment]); |         $this->checkout->payment_hash->data = array_merge((array)$this->checkout->payment_hash->data, ['checkout_payment_ref' => $payment]); | ||||||
|         $this->checkout->payment_hash->save(); |         $this->checkout->payment_hash->save(); | ||||||
| 
 | 
 | ||||||
|         if ($this->checkout->client->currency()->code == 'EUR') { |         if ($this->checkout->client->currency()->code == 'EUR' || $this->checkout->company_gateway->getConfigField('threeds')) { | ||||||
|             $payment->{'3ds'} = ['enabled' => true]; |             $payment->{'3ds'} = ['enabled' => true]; | ||||||
| 
 | 
 | ||||||
|             $payment->{'success_url'} = route('payment_webhook', [ |             $payment->{'success_url'} = route('payment_webhook', [ | ||||||
|  | |||||||
| @ -14,8 +14,8 @@ return [ | |||||||
|     'require_https' => env('REQUIRE_HTTPS', true), |     'require_https' => env('REQUIRE_HTTPS', true), | ||||||
|     'app_url' => rtrim(env('APP_URL', ''), '/'), |     'app_url' => rtrim(env('APP_URL', ''), '/'), | ||||||
|     'app_domain' => env('APP_DOMAIN', ''), |     'app_domain' => env('APP_DOMAIN', ''), | ||||||
|     'app_version' => '5.1.50', |     'app_version' => '5.1.51', | ||||||
|     'app_tag' => '5.1.50-release', |     'app_tag' => '5.1.51-release', | ||||||
|     'minimum_client_version' => '5.0.16', |     'minimum_client_version' => '5.0.16', | ||||||
|     'terms_version' => '1.0.1', |     'terms_version' => '1.0.1', | ||||||
|     'api_secret' => env('API_SECRET', false), |     'api_secret' => env('API_SECRET', false), | ||||||
|  | |||||||
| @ -182,11 +182,10 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a | |||||||
|     Route::resource('subscriptions', 'SubscriptionController'); |     Route::resource('subscriptions', 'SubscriptionController'); | ||||||
|     Route::post('subscriptions/bulk', 'SubscriptionController@bulk')->name('subscriptions.bulk'); |     Route::post('subscriptions/bulk', 'SubscriptionController@bulk')->name('subscriptions.bulk'); | ||||||
| 
 | 
 | ||||||
|     Route::resource('cliente_subscriptions', 'ClientSubscriptionController'); |  | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', 'PaymentWebhookController') | Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', 'PaymentWebhookController') | ||||||
|     ->middleware(['guest', 'api_db']) |     ->middleware(['guest']) | ||||||
|     ->name('payment_webhook'); |     ->name('payment_webhook'); | ||||||
| 
 | 
 | ||||||
| Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook'); | Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook'); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user