1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-15 07:33:04 +01:00
invoiceninja/app/Ninja/PaymentDrivers/SkrillPaymentDriver.php
2017-01-16 19:46:47 +02:00

27 lines
721 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;
}
}