1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
invoiceninja/app/Ninja/PaymentDrivers/SkrillPaymentDriver.php
2017-01-30 21:40:43 +02:00

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