mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on Skrill
This commit is contained in:
parent
5c8d4cf324
commit
45ee040146
26
app/Ninja/PaymentDrivers/SkrillPaymentDriver.php
Normal file
26
app/Ninja/PaymentDrivers/SkrillPaymentDriver.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php namespace App\Ninja\PaymentDrivers;
|
||||
|
||||
use Utils;
|
||||
|
||||
class SkrillPaymentDriver extends BasePaymentDriver
|
||||
{
|
||||
protected function paymentDetails($paymentMethod = false)
|
||||
{
|
||||
$data = parent::paymentDetails($paymentMethod);
|
||||
$locale = strtoupper(Utils::getLocaleRegion());
|
||||
|
||||
if ( ! in_array($locale , ['EN', 'DE', 'ES', 'FR', 'IT', 'PL', 'GR', 'RO', 'RU', 'TR', 'CN', 'CZ', 'NL', 'DA', 'SV', 'FI'])) {
|
||||
$locale = 'EN';
|
||||
}
|
||||
|
||||
$details = [];
|
||||
foreach ($this->invoice()->invoice_items as $item) {
|
||||
$details[$item->product_key] = $item->notes;
|
||||
}
|
||||
|
||||
$data['language'] = $locale;
|
||||
$data['details'] = $details;
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
@ -55,7 +55,7 @@ class PaymentLibrariesSeeder extends Seeder
|
||||
['name' => 'PaymentSense', 'provider' => 'PaymentSense'],
|
||||
['name' => 'Realex', 'provider' => 'Realex_Remote'],
|
||||
['name' => 'Sisow', 'provider' => 'Sisow'],
|
||||
['name' => 'Skrill', 'provider' => 'Skrill'],
|
||||
['name' => 'Skrill', 'provider' => 'Skrill', 'is_offsite' => true],
|
||||
['name' => 'BitPay', 'provider' => 'BitPay', 'is_offsite' => true, 'sort_order' => 6],
|
||||
['name' => 'Dwolla', 'provider' => 'Dwolla', 'is_offsite' => true, 'sort_order' => 5],
|
||||
['name' => 'AGMS', 'provider' => 'Agms'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user