2020-06-09 13:17:26 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2020-06-09 13:17:26 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2021-01-03 22:54:54 +01:00
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
2020-06-09 13:17:26 +02:00
|
|
|
*
|
2021-06-16 08:58:16 +02:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2020-06-09 13:17:26 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\PaymentDrivers;
|
|
|
|
|
2020-11-25 22:07:09 +01:00
|
|
|
use App\Models\ClientGatewayToken;
|
2020-06-24 07:20:33 +02:00
|
|
|
use App\Models\Payment;
|
2020-11-25 22:07:09 +01:00
|
|
|
use App\Models\PaymentHash;
|
|
|
|
use Illuminate\Http\Request;
|
2020-06-24 07:20:33 +02:00
|
|
|
|
2020-06-09 13:17:26 +02:00
|
|
|
abstract class AbstractPaymentDriver
|
|
|
|
{
|
2020-11-25 22:07:09 +01:00
|
|
|
abstract public function authorizeView(array $data);
|
2020-09-06 11:38:10 +02:00
|
|
|
|
2020-11-25 22:07:09 +01:00
|
|
|
abstract public function authorizeResponse(Request $request);
|
|
|
|
|
|
|
|
abstract public function processPaymentView(array $data);
|
|
|
|
|
|
|
|
abstract public function processPaymentResponse(Request $request);
|
2020-09-06 11:38:10 +02:00
|
|
|
|
2020-06-24 07:20:33 +02:00
|
|
|
abstract public function refund(Payment $payment, $refund_amount, $return_client_response = false);
|
2020-06-09 13:17:26 +02:00
|
|
|
|
2020-11-25 22:07:09 +01:00
|
|
|
abstract public function tokenBilling(ClientGatewayToken $cgt, PaymentHash $payment_hash);
|
|
|
|
|
2020-06-16 14:41:56 +02:00
|
|
|
abstract public function setPaymentMethod($payment_method_id);
|
2020-09-06 11:38:10 +02:00
|
|
|
}
|