1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Payment hooks

This commit is contained in:
David Bomba 2019-09-30 07:49:43 +10:00
parent 85de581fac
commit b8aaa8c082
3 changed files with 37 additions and 1 deletions

View 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());
}
}

View File

@ -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}";
}
}

View File

@ -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');
});