mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
eway (#69)
This commit is contained in:
parent
e7f41c1dba
commit
339a92fa6f
@ -17,10 +17,11 @@ use App\Jobs\Util\SystemLogger;
|
|||||||
use App\Models\GatewayType;
|
use App\Models\GatewayType;
|
||||||
use App\Models\PaymentType;
|
use App\Models\PaymentType;
|
||||||
use App\Models\SystemLog;
|
use App\Models\SystemLog;
|
||||||
|
use App\PaymentDrivers\Common\LivewireMethodInterface;
|
||||||
use App\PaymentDrivers\EwayPaymentDriver;
|
use App\PaymentDrivers\EwayPaymentDriver;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
class CreditCard
|
class CreditCard implements LivewireMethodInterface
|
||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
|
|
||||||
@ -102,11 +103,18 @@ class CreditCard
|
|||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function paymentView($data)
|
public function paymentData(array $data): array
|
||||||
{
|
{
|
||||||
$data['gateway'] = $this->eway_driver;
|
$data['gateway'] = $this->eway_driver;
|
||||||
$data['public_api_key'] = $this->eway_driver->company_gateway->getConfigField('publicApiKey');
|
$data['public_api_key'] = $this->eway_driver->company_gateway->getConfigField('publicApiKey');
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function paymentView($data)
|
||||||
|
{
|
||||||
|
$data = $this->paymentData($data);
|
||||||
|
|
||||||
return render('gateways.eway.pay', $data);
|
return render('gateways.eway.pay', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -276,4 +284,8 @@ class CreditCard
|
|||||||
|
|
||||||
return $payment;
|
return $payment;
|
||||||
}
|
}
|
||||||
|
public function livewirePaymentView(array $data): string
|
||||||
|
{
|
||||||
|
return 'gateways.eway.pay_livewire';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
* @license https://www.elastic.co/licensing/elastic-license
|
* @license https://www.elastic.co/licensing/elastic-license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { wait, instant } from '../wait';
|
||||||
|
|
||||||
class EwayRapid {
|
class EwayRapid {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.cardStyles =
|
this.cardStyles =
|
||||||
@ -510,4 +512,8 @@ class EwayRapid {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function boot() {
|
||||||
new EwayRapid().handle();
|
new EwayRapid().handle();
|
||||||
|
}
|
||||||
|
|
||||||
|
instant() ? boot() : wait('#eway-credit-card-payment').then(() => boot());
|
||||||
|
@ -7,6 +7,7 @@ ctrans('texts.credit_card')])
|
|||||||
<meta name="translation-expiry_date" content="{{ ctrans('texts.date') }}">
|
<meta name="translation-expiry_date" content="{{ ctrans('texts.date') }}">
|
||||||
<meta name="translation-card_number" content="{{ ctrans('texts.card_number') }}">
|
<meta name="translation-card_number" content="{{ ctrans('texts.card_number') }}">
|
||||||
<meta name="translation-cvv" content="{{ ctrans('texts.cvv') }}">
|
<meta name="translation-cvv" content="{{ ctrans('texts.cvv') }}">
|
||||||
|
<meta name="instant-payment" content="yes" />
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_content')
|
@section('gateway_content')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user