mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Payment hooks
This commit is contained in:
parent
85de581fac
commit
b8aaa8c082
30
app/Http/Controllers/ClientPortal/PaymentHookController.php
Normal file
30
app/Http/Controllers/ClientPortal/PaymentHookController.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers\ClientPortal;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Gateway;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PaymentHookController extends Controller
|
||||
{
|
||||
|
||||
public function process($company_gateway_id, $gateway_type_id)
|
||||
{
|
||||
|
||||
$gateway = Gateway::find($company_gateway_id);
|
||||
|
||||
dd(request()->input());
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -53,7 +53,7 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
|
||||
*/
|
||||
public function processPaymentView(array $data)
|
||||
{
|
||||
|
||||
$this->purchase();
|
||||
}
|
||||
|
||||
public function processPaymentResponse($request)
|
||||
@ -77,4 +77,9 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function buildReturnUrl()
|
||||
{
|
||||
$url = $this->client->company->domain . "/payment_hook/{$this->company_gateway->id}/{GatewayType::PAYPAL}";
|
||||
}
|
||||
}
|
@ -46,6 +46,7 @@ Route::group(['middleware' => ['domain_db'], 'prefix' => 'client', 'as' => 'clie
|
||||
|
||||
/*Invitation catches*/
|
||||
Route::get('invoice/{invitation_id}','ClientPortal\InvitationController@invoiceRouter');
|
||||
Route::get('payment_hook/{invitation_id}','ClientPortal\PaymentHookController@process');
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user