1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
invoiceninja/app/Ninja/PaymentDrivers/SkrillPaymentDriver.php
2019-01-30 21:45:46 +11:00

29 lines
720 B
PHP
Executable File

<?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;
}
}