mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
29 lines
720 B
PHP
29 lines
720 B
PHP
<?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;
|
|
}
|
|
}
|