1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php

45 lines
1.1 KiB
PHP
Raw Normal View History

2020-06-16 02:21:40 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\PaymentDrivers\Authorize;
2020-06-16 02:31:05 +02:00
use App\Models\ClientGatewayToken;
2020-06-16 02:21:40 +02:00
use App\PaymentDrivers\AuthorizePaymentDriver;
/**
* Class BaseDriver
* @package App\PaymentDrivers
*
*/
class AuthorizeCreditCard
{
public $authorize;
public function __construct(AuthorizePaymentDriver $authorize)
{
$this->authorize = $authorize;
}
public function processPaymentView($data)
{
2020-06-16 02:31:05 +02:00
$tokens = ClientGatewayToken::where('client_id', $this->authorize->client->id)
->where('company_gateway_key', $this->authorize->company_gateway->gateway_key)
->where('gateway_type_id', $this->authorize->payment_method_id)
->get();
$data['tokens'] = $tokens;
$data['gateway'] = $this->authorize->company_gateway;
return render('portal.ninja202.gateways.authorize.credit_card_payment', $data);
2020-06-16 02:21:40 +02:00
}
}