mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -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\PaymentType;
|
||||
use App\Models\SystemLog;
|
||||
use App\PaymentDrivers\Common\LivewireMethodInterface;
|
||||
use App\PaymentDrivers\EwayPaymentDriver;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
class CreditCard
|
||||
class CreditCard implements LivewireMethodInterface
|
||||
{
|
||||
use MakesHash;
|
||||
|
||||
@ -102,11 +103,18 @@ class CreditCard
|
||||
return $token;
|
||||
}
|
||||
|
||||
public function paymentView($data)
|
||||
public function paymentData(array $data): array
|
||||
{
|
||||
$data['gateway'] = $this->eway_driver;
|
||||
$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);
|
||||
}
|
||||
|
||||
@ -276,4 +284,8 @@ class CreditCard
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
import { wait, instant } from '../wait';
|
||||
|
||||
class EwayRapid {
|
||||
constructor() {
|
||||
this.cardStyles =
|
||||
@ -510,4 +512,8 @@ class EwayRapid {
|
||||
}
|
||||
}
|
||||
|
||||
new EwayRapid().handle();
|
||||
function boot() {
|
||||
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-card_number" content="{{ ctrans('texts.card_number') }}">
|
||||
<meta name="translation-cvv" content="{{ ctrans('texts.cvv') }}">
|
||||
<meta name="instant-payment" content="yes" />
|
||||
@endsection
|
||||
|
||||
@section('gateway_content')
|
||||
|
Loading…
x
Reference in New Issue
Block a user