Plugin Directory

Changeset 2200862


Ignore:
Timestamp:
11/25/2019 08:21:55 PM (6 years ago)
Author:
Mofsy
Message:

New version: 2.2.0.1

Location:
wc-robokassa/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • wc-robokassa/trunk/includes/class-wc-robokassa-api.php

    r2168628 r2200862  
    4040
    4141    /**
     42     * Available API
     43     *
     44     * @return int
     45     */
     46    public function is_available()
     47    {
     48        /**
     49         * Check WP
     50         */
     51        if(!function_exists('wp_remote_post') || !function_exists('wp_remote_retrieve_body'))
     52        {
     53            return 0;
     54        }
     55
     56        /**
     57         * Check SimpleXMLElement installed
     58         */
     59        if(class_exists('SimpleXMLElement'))
     60        {
     61            return 1;
     62        }
     63
     64        /**
     65         * Check DOMDocument installed
     66         */
     67        if(class_exists('DOMDocument'))
     68        {
     69            return 2;
     70        }
     71
     72        return 0;
     73    }
     74
     75    /**
    4276     * Интерфейс расчёта суммы к получению магазином
    4377     *
     
    5690    {
    5791        /**
    58          * Check SimpleXMLElement installed
    59          */
    60         if(!class_exists('SimpleXMLElement'))
     92         * Check available
     93         */
     94        $is_available = $this->is_available();
     95        if($is_available === 0)
    6196        {
    6297            return false;
     
    88123        {
    89124            /**
    90              * Response normalize
    91              */
    92             $response_data = new SimpleXMLElement($response_body);
    93 
    94             /**
    95              * Check error
    96              *
    97              * @todo refactoring
    98              */
    99             if($response_data->Result->Code != 0)
    100             {
    101                 return false;
    102             }
    103 
    104             return $response_data->OutSum;
     125             * SimpleXMl
     126             */
     127            if($is_available === 1)
     128            {
     129                /**
     130                 * Response normalize
     131                 */
     132                $response_data = new SimpleXMLElement($response_body);
     133
     134                /**
     135                 * Check error
     136                 */
     137                if(!isset($response_data->Result) || $response_data->Result->Code != 0)
     138                {
     139                    return false;
     140                }
     141
     142                return $response_data->OutSum;
     143            }
     144
     145            /**
     146             * DOMDocument
     147             */
     148            if($is_available === 2)
     149            {
     150                /**
     151                 * Response normalize
     152                 */
     153                $response_data = $this->dom_xml_to_array($response_body);
     154
     155                /**
     156                 * Check error
     157                 */
     158                if($response_data['CalcSummsResponseData']['Result']['Code'] != 0)
     159                {
     160                    return false;
     161                }
     162
     163                return $response_data['CalcSummsResponseData']['OutSum'];
     164            }
    105165        }
    106166
     
    128188    {
    129189        /**
    130          * Check SimpleXMLElement installed
    131          */
    132         if(!class_exists('SimpleXMLElement'))
     190         * Check available
     191         */
     192        $is_available = $this->is_available();
     193        if($is_available === 0)
    133194        {
    134195            return false;
     
    159220        if($response_body != '')
    160221        {
    161             /**
    162              * Response normalize
    163              */
    164             $response_data = new SimpleXMLElement($response_body);
    165 
    166             /**
    167              * Check error
    168              *
    169              * @todo refactoring
    170              */
    171             if($response_data->Result->Code != 0)
    172             {
    173                 return false;
    174             }
     222            $op_state_data = array();
     223
     224            /**
     225             * SimpleXML
     226             */
     227            if($is_available === 1)
     228            {
     229                /**
     230                 * Response normalize
     231                 */
     232                $response_data = new SimpleXMLElement($response_body);
     233
     234                /**
     235                 * Check error
     236                 */
     237                if(!isset($response_data->Result) || $response_data->Result->Code != 0)
     238                {
     239                    return false;
     240                }
     241
     242                /**
     243                 * Текущее состояние оплаты.
     244                 */
     245                if(isset($response_data->State))
     246                {
     247                    $op_state_data['state'] = array
     248                    (
     249                        'code'         => $response_data->State->Code,
     250                        'request_date' => $response_data->State->RequestDate,
     251                        'state_date'   => $response_data->State->StateDate,
     252                    );
     253                }
     254
     255                /**
     256                 * Информация об операции оплаты счета
     257                 */
     258                if(isset($response_data->Info))
     259                {
     260                    $op_state_data['info'] = array
     261                    (
     262                        'inc_curr_label' => $response_data->Info->IncCurrLabel,
     263                        'inc_sum' => $response_data->Info->IncSum,
     264                        'inc_account' => $response_data->Info->IncAccount,
     265                        'payment_method_code' => $response_data->Info->PaymentMethod->Code,
     266                        'payment_method_description' => $response_data->Info->PaymentMethod->Description,
     267                        'out_curr_label' => $response_data->Info->OutCurrLabel,
     268                        'out_sum' => $response_data->Info->OutSum,
     269                    );
     270                }
     271            }
     272
     273            /**
     274             * DOMDocument
     275             */
     276            if($is_available === 2)
     277            {
     278                $response_data = $this->dom_xml_to_array( $response_body );
     279
     280                /**
     281                 * Check error
     282                 */
     283                if (!isset($response_data['OperationStateResponse']['Result']['Code']) || $response_data['CurrenciesList']['Result']['Code'] != 0)
     284                {
     285                    return false;
     286                }
     287
     288                /**
     289                 * Текущее состояние оплаты.
     290                 */
     291                if(isset($response_data['OperationStateResponse']['State']))
     292                {
     293                    $op_state_data['state'] = array
     294                    (
     295                        'code' => $response_data['OperationStateResponse']['State']['Code'],
     296                        'request_date' => $response_data['OperationStateResponse']['State']['RequestDate'],
     297                        'state_date' => $response_data['OperationStateResponse']['State']['StateDate'],
     298                    );
     299                }
     300
     301                /**
     302                 * Информация об операции оплаты счета
     303                 */
     304                if(isset($response_data['OperationStateResponse']['Info']))
     305                {
     306                    $op_state_data['info'] = array
     307                    (
     308                        'inc_curr_label' => $response_data['OperationStateResponse']['Info']['IncCurrLabel'],
     309                        'inc_sum' => $response_data['OperationStateResponse']['Info']['IncSum'],
     310                        'inc_account' => $response_data['OperationStateResponse']['Info']['IncAccount'],
     311                        'payment_method_code' => $response_data['OperationStateResponse']['Info']['PaymentMethod']['Code'],
     312                        'payment_method_description' => $response_data['OperationStateResponse']['Info']['PaymentMethod']['Description'],
     313                        'out_curr_label' => $response_data['OperationStateResponse']['Info']['OutCurrLabel'],
     314                        'out_sum' => $response_data['OperationStateResponse']['Info']['OutSum'],
     315                    );
     316                }
     317            }
     318
     319            return $op_state_data;
    175320        }
    176321
     
    197342    {
    198343        /**
    199          * Check SimpleXMLElement installed
    200          */
    201         if(!class_exists('SimpleXMLElement'))
     344         * Check available
     345         */
     346        $is_available = $this->is_available();
     347        if($is_available === 0)
    202348        {
    203349            return false;
     
    229375        {
    230376            /**
    231              * Response normalize
    232              */
    233             $response_data = new SimpleXMLElement($response_body);
    234 
    235             /**
    236              * Check error
    237              *
    238              * @todo refactoring
    239              */
    240             if($response_data->Result->Code != 0)
    241             {
    242                 return false;
    243             }
    244 
    245             /**
    246377             * Данные валют
    247378             */
     
    249380
    250381            /**
    251              * Перебираем данные
    252              */
    253             foreach($response_data->Groups->Group as $xml_group)
    254             {
    255                 $xml_group_attributes = $xml_group->attributes();
    256 
    257                 foreach($xml_group->Items->Currency as $xml_group_item)
    258                 {
    259                     $xml_group_item_attributes = $xml_group_item->attributes();
    260 
    261                     $currencies_data[] = array
    262                     (
    263                         'group_code' => (string)$xml_group_attributes['Code'],
    264                         'group_description' => (string)$xml_group_attributes['Description'],
    265                         'currency_label' => (string)$xml_group_item_attributes['Label'],
    266                         'currency_alias' => (string)$xml_group_item_attributes['Alias'],
    267                         'currency_name' => (string)$xml_group_item_attributes['Name'],
    268                         'language' => $language,
    269                     );
    270                 }
    271             }
    272 
    273             return $currencies_data;
     382             * SimpleXML
     383             */
     384            if($is_available === 1)
     385            {
     386                /**
     387                 * Response normalize
     388                 */
     389                $response_data = new SimpleXMLElement($response_body);
     390
     391                /**
     392                 * Check error
     393                 */
     394                if(!isset($response_data->Result) || $response_data->Result->Code != 0)
     395                {
     396                    return false;
     397                }
     398
     399                /**
     400                 * Перебираем данные
     401                 */
     402                foreach($response_data->Groups->Group as $xml_group)
     403                {
     404                    $xml_group_attributes = $xml_group->attributes();
     405
     406                    foreach($xml_group->Items->Currency as $xml_group_item)
     407                    {
     408                        $xml_group_item_attributes = $xml_group_item->attributes();
     409
     410                        $response_item = array
     411                        (
     412                            'group_code' => (string)$xml_group_attributes['Code'],
     413                            'group_description' => (string)$xml_group_attributes['Description'],
     414                            'currency_label' => (string)$xml_group_item_attributes['Label'],
     415                            'currency_alias' => (string)$xml_group_item_attributes['Alias'],
     416                            'currency_name' => (string)$xml_group_item_attributes['Name'],
     417                            'language' => $language,
     418                        );
     419
     420                        if(isset($xml_group_item_attributes['MaxValue']))
     421                        {
     422                            $response_item['sum_max'] = (string)$xml_group_item_attributes['MaxValue'];
     423                        }
     424
     425                        if(isset($xml_group_item_attributes['MinValue']))
     426                        {
     427                            $response_item['sum_min'] = (string)$xml_group_item_attributes['MinValue'];
     428                        }
     429
     430                        $currencies_data[] = $response_item;
     431                    }
     432                }
     433
     434                return $currencies_data;
     435            }
     436
     437            /**
     438             * DOMDocument
     439             */
     440            if($is_available === 2)
     441            {
     442                $response_data = $this->dom_xml_to_array($response_body);
     443
     444                /**
     445                 * Check error
     446                 */
     447                if(!isset($response_data['CurrenciesList']['Result']['Code']) || $response_data['CurrenciesList']['Result']['Code'] != 0)
     448                {
     449                    return false;
     450                }
     451
     452                /**
     453                 * Перебираем данные
     454                 */
     455                foreach($response_data['CurrenciesList']['Groups']['Group'] as $array_group)
     456                {
     457                    $array_group_attributes = $array_group['@attributes'];
     458
     459                    foreach($array_group['Items']['Currency'] as $array_group_item)
     460                    {
     461                        if(isset($array_group_item['@attributes']))
     462                        {
     463                            $array_group_item = $array_group_item['@attributes'];
     464                        }
     465
     466                        $response_item = array
     467                        (
     468                            'group_code' => $array_group_attributes['Code'],
     469                            'group_description' => $array_group_attributes['Description'],
     470                            'currency_label' => $array_group_item['Label'],
     471                            'currency_alias' => $array_group_item['Alias'],
     472                            'currency_name' => $array_group_item['Name'],
     473                            'language' => $language,
     474                        );
     475
     476                        if(isset($array_group_item['MaxValue']))
     477                        {
     478                            $response_item['sum_max'] = $array_group_item['MaxValue'];
     479                        }
     480
     481                        if(isset($array_group_item['MinValue']))
     482                        {
     483                            $response_item['sum_min'] = $array_group_item['MinValue'];
     484                        }
     485
     486                        $currencies_data[] = $response_item;
     487                    }
     488                }
     489
     490                return $currencies_data;
     491            }
    274492        }
    275493
     
    297515    {
    298516        /**
    299          * Check SimpleXMLElement installed
    300          */
    301         if(!class_exists('SimpleXMLElement'))
     517         * Check available
     518         */
     519        $is_available = $this->is_available();
     520        if($is_available === 0)
    302521        {
    303522            return false;
     
    329548        {
    330549            /**
    331              * Response normalize
    332              */
    333             $response_data = new SimpleXMLElement($response_body);
    334 
    335             /**
    336              * Check error
    337              *
    338              * @todo refactoring
    339              */
    340             if($response_data->Result->Code != 0)
    341             {
    342                 return false;
    343             }
    344 
    345             /**
    346550             * Данные валют
    347551             */
     
    349553
    350554            /**
    351              * Перебираем данные
    352              */
    353             foreach($response_data->Methods->Method as $xml_method)
    354             {
    355                 $xml_method_attributes = $xml_method->attributes();
    356 
    357                 $methods_data[(string)$xml_method_attributes['Code']] = array
    358                 (
    359                     'method_code' => (string)$xml_method_attributes['Code'],
    360                     'method_description' => (string)$xml_method_attributes['Description'],
    361                     'language' => $language
    362                 );
     555             * SimpleXML
     556             */
     557            if($is_available === 1)
     558            {
     559                /**
     560                 * Response normalize
     561                 */
     562                $response_data = new SimpleXMLElement($response_body);
     563
     564                /**
     565                 * Check error
     566                 */
     567                if (!isset($response_data->Result) || $response_data->Result->Code != 0)
     568                {
     569                    return false;
     570                }
     571
     572                /**
     573                 * Перебираем данные
     574                 */
     575                foreach ( $response_data->Methods->Method as $xml_method )
     576                {
     577                    $xml_method_attributes = $xml_method->attributes();
     578
     579                    $methods_data[ (string) $xml_method_attributes['Code'] ] = array
     580                    (
     581                        'method_code' => (string) $xml_method_attributes['Code'],
     582                        'method_description' => (string) $xml_method_attributes['Description'],
     583                        'language' => $language
     584                    );
     585                }
     586
     587            }
     588
     589            /**
     590             * DOMDocument
     591             */
     592            if($is_available === 2)
     593            {
     594                $response_data = $this->dom_xml_to_array($response_body);
     595
     596                /**
     597                 * Check error
     598                 */
     599                if(!isset($response_data['PaymentMethodsList']['Result']['Code']) || $response_data['PaymentMethodsList']['Result']['Code'] != 0)
     600                {
     601                    return false;
     602                }
     603
     604                /**
     605                 * Перебираем данные
     606                 */
     607                foreach ($response_data['PaymentMethodsList']['Methods']['Method'] as $array_method)
     608                {
     609                    $array_method_attributes = $array_method['@attributes'];
     610
     611                    $methods_data[$array_method_attributes['Code']] = array
     612                    (
     613                        'method_code' => $array_method_attributes['Code'],
     614                        'method_description' => $array_method_attributes['Description'],
     615                        'language' => $language
     616                    );
     617                }
    363618            }
    364619
     
    392647    {
    393648        /**
    394          * Check SimpleXMLElement installed
    395          */
    396         if(!class_exists('SimpleXMLElement'))
     649         * Check available
     650         */
     651        $is_available = $this->is_available();
     652        if($is_available === 0)
    397653        {
    398654            return false;
     
    424680        {
    425681            /**
    426              * Response normalize
    427              */
    428             $response_data = new SimpleXMLElement($response_body);
    429 
    430             /**
    431              * Check error
    432              *
    433              * @todo refactoring
    434              */
    435             if($response_data->Result->Code != 0)
    436             {
    437                 return false;
    438             }
    439 
    440             /**
    441682             * Данные валют
    442683             */
     
    444685
    445686            /**
    446              * Перебираем данные
    447              */
    448             foreach($response_data->Groups->Group as $xml_group)
    449             {
    450                 $xml_group_attributes = $xml_group->attributes();
    451 
    452                 foreach($xml_group->Items->Currency as $xml_group_item)
    453                 {
    454                     $xml_group_item_attributes = $xml_group_item->attributes();
    455 
    456                     $xml_group_item_rate_attributes = $xml_group_item->Rate->attributes();
    457 
    458                     $rates_data[] = array
    459                     (
    460                         'group_code' => (string)$xml_group_attributes['Code'],
    461                         'group_description' => (string)$xml_group_attributes['Description'],
    462                         'currency_label' => (string)$xml_group_item_attributes['Label'],
    463                         'currency_alias' => (string)$xml_group_item_attributes['Alias'],
    464                         'currency_name' => (string)$xml_group_item_attributes['Name'],
    465                         'rate_inc_sum' => (string)$xml_group_item_rate_attributes['IncSum'],
    466                         'language' => $language,
    467                     );
     687             * SimpleXML
     688             */
     689            if($is_available === 1)
     690            {
     691                /**
     692                 * Response normalize
     693                 */
     694                $response_data = new SimpleXMLElement($response_body);
     695
     696                /**
     697                 * Check error
     698                 */
     699                if(!isset($response_data->Result) || $response_data->Result->Code != 0)
     700                {
     701                    return false;
     702                }
     703
     704                /**
     705                 * Перебираем данные
     706                 */
     707                foreach($response_data->Groups->Group as $xml_group)
     708                {
     709                    $xml_group_attributes = $xml_group->attributes();
     710
     711                    foreach($xml_group->Items->Currency as $xml_group_item)
     712                    {
     713                        $xml_group_item_attributes = $xml_group_item->attributes();
     714                        $xml_group_item_rate_attributes = $xml_group_item->Rate->attributes();
     715
     716                        $rates_item =  array
     717                        (
     718                            'group_code' => (string)$xml_group_attributes['Code'],
     719                            'group_description' => (string)$xml_group_attributes['Description'],
     720                            'currency_label' => (string)$xml_group_item_attributes['Label'],
     721                            'currency_alias' => (string)$xml_group_item_attributes['Alias'],
     722                            'currency_name' => (string)$xml_group_item_attributes['Name'],
     723                            'rate_inc_sum' => (string)$xml_group_item_rate_attributes['IncSum'],
     724                            'language' => $language,
     725                        );
     726
     727                        if(isset($xml_group_item_attributes['MaxValue']))
     728                        {
     729                            $rates_item['currency_sum_max'] = (string)$xml_group_item_attributes['MaxValue'];
     730                        }
     731
     732                        if(isset($xml_group_item_attributes['MinValue']))
     733                        {
     734                            $rates_item['currency_sum_min'] = (string)$xml_group_item_attributes['MinValue'];
     735                        }
     736
     737                        $rates_data[] = $rates_item;
     738                    }
     739                }
     740            }
     741
     742            /**
     743             * DOMDocument
     744             */
     745            if($is_available === 2)
     746            {
     747                $response_data = $this->dom_xml_to_array($response_body);
     748
     749                /**
     750                 * Check error
     751                 */
     752                if(!isset($response_data['RatesList']['Result']['Code']) || $response_data['RatesList']['Result']['Code'] != 0)
     753                {
     754                    return false;
     755                }
     756
     757                /**
     758                 * Перебираем данные
     759                 */
     760                foreach($response_data['RatesList']['Groups']['Group'] as $xml_group)
     761                {
     762                    $xml_group_attributes = $xml_group['@attributes'];
     763
     764                    if(!isset($xml_group['Items']['Currency']['@attributes']))
     765                    {
     766                        foreach($xml_group['Items']['Currency'] as $xml_group_item_key => $xml_group_item)
     767                        {
     768                            $rates_item = array
     769                            (
     770                                'group_code' => $xml_group_attributes['Code'],
     771                                'group_description' => $xml_group_attributes['Description'],
     772                                'currency_label' => $xml_group_item['@attributes']['Label'],
     773                                'currency_alias' => $xml_group_item['@attributes']['Alias'],
     774                                'currency_name' => $xml_group_item['@attributes']['Name'],
     775                                'rate_inc_sum' => $xml_group_item['Rate']['@attributes']['IncSum'],
     776                                'language' => $language,
     777                            );
     778
     779                            if(isset($xml_group_item['@attributes']['MaxValue']))
     780                            {
     781                                $rates_item['currency_sum_max'] = $xml_group_item['@attributes']['MaxValue'];
     782                            }
     783
     784                            if(isset($xml_group_item['@attributes']['MinValue']))
     785                            {
     786                                $rates_item['currency_sum_min'] = $xml_group_item['@attributes']['MinValue'];
     787                            }
     788
     789                            $rates_data[] = $rates_item;
     790                        }
     791                    }
     792                    else
     793                    {
     794                        $rates_item = array
     795                        (
     796                            'group_code' => $xml_group_attributes['Code'],
     797                            'group_description' => $xml_group_attributes['Description'],
     798                            'currency_label' => $xml_group['Items']['Currency']['@attributes']['Label'],
     799                            'currency_alias' => $xml_group['Items']['Currency']['@attributes']['Alias'],
     800                            'currency_name' => $xml_group['Items']['Currency']['@attributes']['Name'],
     801                            'rate_inc_sum' => $xml_group['Items']['Currency']['Rate']['@attributes']['IncSum'],
     802                            'language' => $language,
     803                        );
     804
     805                        if(isset($xml_group['Items']['Currency']['@attributes']['MaxValue']))
     806                        {
     807                            $rates_item['currency_sum_max'] = $xml_group['Items']['Currency']['@attributes']['MaxValue'];
     808                        }
     809
     810                        if(isset($xml_group['Items']['Currency']['@attributes']['MinValue']))
     811                        {
     812                            $rates_item['currency_sum_min'] = $xml_group['Items']['Currency']['@attributes']['MinValue'];
     813                        }
     814
     815                        $rates_data[] = $rates_item;
     816                    }
    468817                }
    469818            }
     
    485834    {
    486835        /**
    487          * Check SimpleXMLElement installed
    488          */
    489         if(!class_exists('SimpleXMLElement'))
     836         * Check available
     837         */
     838        $is_available = $this->is_available();
     839        if($is_available === 0)
    490840        {
    491841            return false;
     
    517867        {
    518868            /**
    519              * Response normalize
    520              */
    521             $response_data = new SimpleXMLElement($response_body);
    522 
    523             /**
    524              * Check error
    525              *
    526              * @todo refactoring
    527              */
    528             if($response_data->Result->Code != 0)
    529             {
    530                 return false;
    531             }
    532 
    533             return $response_data->Limit;
     869             * SimpleXMl
     870             */
     871            if($is_available === 1)
     872            {
     873                /**
     874                 * Response normalize
     875                 */
     876                $response_data = new SimpleXMLElement($response_body);
     877
     878                /**
     879                 * Check error
     880                 */
     881                if(!isset($response_data->Result) || $response_data->Result->Code != 0)
     882                {
     883                    return false;
     884                }
     885
     886                return $response_data->Limit;
     887            }
     888
     889            /**
     890             * DOMDocument
     891             */
     892            if($is_available === 2)
     893            {
     894                $response_data = $this->dom_xml_to_array($response_body);
     895
     896                /**
     897                 * Check error
     898                 */
     899                if(!isset($response_data['LimitResponse']['Result']['Code']) || $response_data["LimitResponse"]['Result']['Code'] != 0)
     900                {
     901                    return false;
     902                }
     903
     904                return $response_data['LimitResponse']['Limit'];
     905            }
    534906        }
    535907
    536908        return false;
    537909    }
     910
     911    /**
     912     * Dom_XML2Array
     913     *
     914     * @param $response_body
     915     *
     916     * @return mixed
     917     */
     918    private function dom_xml_to_array($response_body)
     919    {
     920        $root = new DOMDocument();
     921        $root->loadXml($response_body);
     922
     923        $result = array();
     924
     925        if ($root->hasAttributes())
     926        {
     927            $attrs = $root->attributes;
     928            foreach ($attrs as $attr)
     929            {
     930                $result['@attributes'][$attr->name] = $attr->value;
     931            }
     932        }
     933
     934        if ($root->hasChildNodes())
     935        {
     936            $children = $root->childNodes;
     937
     938            if ($children->length == 1)
     939            {
     940                $child = $children->item(0);
     941
     942                if ($child->nodeType == XML_TEXT_NODE)
     943                {
     944                    $result['_value'] = $child->nodeValue;
     945                    return count($result) == 1 ? $result['_value'] : $result;
     946                }
     947            }
     948
     949            $groups = array();
     950            foreach ($children as $child)
     951            {
     952                if (!isset($result[$child->nodeName]))
     953                {
     954                    $result[$child->nodeName] = $this->dom_xml_to_array($child);
     955                }
     956                else
     957                {
     958                    if (!isset($groups[$child->nodeName]))
     959                    {
     960                        $result[$child->nodeName] = array($result[$child->nodeName]);
     961                        $groups[$child->nodeName] = 1;
     962                    }
     963
     964                    $result[$child->nodeName][] = $this->dom_xml_to_array($child);
     965                }
     966            }
     967        }
     968
     969        return $result;
     970    }
    538971}
  • wc-robokassa/trunk/includes/class-wc-robokassa-method.php

    r2168628 r2200862  
    244244         * Testing?
    245245         */
    246         $this->test = $this->get_option('test');
     246        $this->set_test($this->get_option('test'));
    247247
    248248        /**
    249249         * Default language for Robokassa interface
    250250         */
    251         $this->user_interface_language = $this->get_option('language');
     251        $this->set_user_interface_language($this->get_option('language'));
    252252
    253253        /**
     
    260260            {
    261261                case 'en_EN':
    262                     $this->user_interface_language = 'en';
     262                    $this->set_user_interface_language('en');
    263263                    break;
    264264                default:
    265                     $this->user_interface_language = 'ru';
     265                    $this->set_user_interface_language('ru');
    266266                    break;
    267267            }
     
    278278        if($this->get_option('ofd_status') == 'yes')
    279279        {
    280             $this->ofd_status = true;
     280            $this->set_ofd_status(true);
    281281        }
    282282
     
    314314            }
    315315
    316             $this->ofd_sno = $ofd_sno;
     316            $this->set_ofd_sno($ofd_sno);
    317317        }
    318318
     
    350350            }
    351351
    352             $this->ofd_nds = $ofd_nds;
     352            $this->set_ofd_nds($ofd_nds);
    353353        }
    354354
     
    358358        if($this->get_option('ofd_payment_method') !== '')
    359359        {
    360             $this->ofd_payment_method = $this->get_option('ofd_payment_method');
     360            $this->set_ofd_payment_method($this->get_option('ofd_payment_method'));
    361361        }
    362362
     
    366366        if($this->get_option('ofd_payment_object') !== '')
    367367        {
    368             $this->ofd_payment_object = $this->get_option('ofd_payment_object');
     368            $this->set_ofd_payment_object($this->get_option('ofd_payment_object'));
    369369        }
    370370
     
    374374        if($this->get_option('shop_pass_1') !== '')
    375375        {
    376             $this->shop_pass_1 = $this->get_option('shop_pass_1');
     376            $this->set_shop_pass_1($this->get_option('shop_pass_1'));
    377377        }
    378378
     
    382382        if($this->get_option('shop_pass_2') !== '')
    383383        {
    384             $this->shop_pass_2 = $this->get_option('shop_pass_2');
     384            $this->set_shop_pass_2($this->get_option('shop_pass_2'));
    385385        }
    386386
     
    388388         * Load shop login
    389389         */
    390         $this->shop_login = $this->get_option('shop_login');
     390        $this->set_shop_login($this->get_option('shop_login'));
    391391
    392392        /**
    393393         * Load sign method
    394394         */
    395         $this->sign_method = $this->get_option('sign_method');
     395        $this->set_sign_method($this->get_option('sign_method'));
    396396
    397397        /**
     
    400400        if($this->get_option('test_shop_pass_1') !== '')
    401401        {
    402             $this->test_shop_pass_1 = $this->get_option('test_shop_pass_1');
     402            $this->set_test_shop_pass_1($this->get_option('test_shop_pass_1'));
    403403        }
    404404
     
    408408        if($this->get_option('test_shop_pass_2') !== '')
    409409        {
    410             $this->test_shop_pass_2 = $this->get_option('test_shop_pass_2');
     410            $this->set_test_shop_pass_2($this->get_option('test_shop_pass_2'));
    411411        }
    412412
     
    414414         * Load sign method for testing
    415415         */
    416         $this->test_sign_method = $this->get_option('test_sign_method');
     416        $this->set_test_sign_method($this->get_option('test_sign_method'));
    417417
    418418        /**
     
    431431            $this->enabled = false;
    432432        }
     433    }
     434
     435    /**
     436     * @since 2.2.0.1
     437     *
     438     * @return string
     439     */
     440    public function get_shop_login()
     441    {
     442        return $this->shop_login;
     443    }
     444
     445    /**
     446     * @since 2.2.0.1
     447     *
     448     * @param string $shop_login
     449     */
     450    public function set_shop_login( $shop_login )
     451    {
     452        $this->shop_login = $shop_login;
     453    }
     454
     455    /**
     456     * @since 2.2.0.1
     457     *
     458     * @return string
     459     */
     460    public function get_shop_pass_1()
     461    {
     462        return $this->shop_pass_1;
     463    }
     464
     465    /**
     466     * @since 2.2.0.1
     467     *
     468     * @param string $shop_pass_1
     469     */
     470    public function set_shop_pass_1( $shop_pass_1 )
     471    {
     472        $this->shop_pass_1 = $shop_pass_1;
     473    }
     474
     475    /**
     476     * @since 2.2.0.1
     477     *
     478     * @return string
     479     */
     480    public function get_shop_pass_2()
     481    {
     482        return $this->shop_pass_2;
     483    }
     484
     485    /**
     486     * @since 2.2.0.1
     487     *
     488     * @param string $shop_pass_2
     489     */
     490    public function set_shop_pass_2( $shop_pass_2 )
     491    {
     492        $this->shop_pass_2 = $shop_pass_2;
     493    }
     494
     495    /**
     496     * @since 2.2.0.1
     497     *
     498     * @return string
     499     */
     500    public function get_sign_method()
     501    {
     502        return $this->sign_method;
     503    }
     504
     505    /**
     506     * @since 2.2.0.1
     507     *
     508     * @param string $sign_method
     509     */
     510    public function set_sign_method( $sign_method )
     511    {
     512        $this->sign_method = $sign_method;
     513    }
     514
     515    /**
     516     * @since 2.2.0.1
     517     *
     518     * @return string
     519     */
     520    public function get_form_url()
     521    {
     522        return $this->form_url;
     523    }
     524
     525    /**
     526     * @since 2.2.0.1
     527     *
     528     * @param string $form_url
     529     */
     530    public function set_form_url( $form_url )
     531    {
     532        $this->form_url = $form_url;
     533    }
     534
     535    /**
     536     * @since 2.2.0.1
     537     *
     538     * @return string
     539     */
     540    public function get_user_interface_language()
     541    {
     542        return $this->user_interface_language;
     543    }
     544
     545    /**
     546     * @since 2.2.0.1
     547     *
     548     * @param string $user_interface_language
     549     */
     550    public function set_user_interface_language( $user_interface_language )
     551    {
     552        $this->user_interface_language = $user_interface_language;
     553    }
     554
     555    /**
     556     * @since 2.2.0.1
     557     *
     558     * @return mixed
     559     */
     560    public function get_test()
     561    {
     562        return $this->test;
     563    }
     564
     565    /**
     566     * @since 2.2.0.1
     567     *
     568     * @param mixed $test
     569     */
     570    public function set_test( $test )
     571    {
     572        $this->test = $test;
     573    }
     574
     575    /**
     576     * @since 2.2.0.1
     577     *
     578     * @return string
     579     */
     580    public function get_test_shop_pass_1()
     581    {
     582        return $this->test_shop_pass_1;
     583    }
     584
     585    /**
     586     * @since 2.2.0.1
     587     *
     588     * @param string $test_shop_pass_1
     589     */
     590    public function set_test_shop_pass_1( $test_shop_pass_1 )
     591    {
     592        $this->test_shop_pass_1 = $test_shop_pass_1;
     593    }
     594
     595    /**
     596     * @since 2.2.0.1
     597     *
     598     * @return string
     599     */
     600    public function get_test_shop_pass_2()
     601    {
     602        return $this->test_shop_pass_2;
     603    }
     604
     605    /**
     606     * @since 2.2.0.1
     607     *
     608     * @param string $test_shop_pass_2
     609     */
     610    public function set_test_shop_pass_2( $test_shop_pass_2 )
     611    {
     612        $this->test_shop_pass_2 = $test_shop_pass_2;
     613    }
     614
     615    /**
     616     * @since 2.2.0.1
     617     *
     618     * @return string
     619     */
     620    public function get_test_sign_method()
     621    {
     622        return $this->test_sign_method;
     623    }
     624
     625    /**
     626     * @since 2.2.0.1
     627     *
     628     * @param string $test_sign_method
     629     */
     630    public function set_test_sign_method( $test_sign_method )
     631    {
     632        $this->test_sign_method = $test_sign_method;
     633    }
     634
     635    /**
     636     * @since 2.2.0.1
     637     *
     638     * @return bool
     639     */
     640    public function is_ofd_status()
     641    {
     642        return $this->ofd_status;
     643    }
     644
     645    /**
     646     * @since 2.2.0.1
     647     *
     648     * @param bool $ofd_status
     649     */
     650    public function set_ofd_status( $ofd_status )
     651    {
     652        $this->ofd_status = $ofd_status;
     653    }
     654
     655    /**
     656     * @since 2.2.0.1
     657     *
     658     * @return string
     659     */
     660    public function get_ofd_sno()
     661    {
     662        return $this->ofd_sno;
     663    }
     664
     665    /**
     666     * @since 2.2.0.1
     667     *
     668     * @param string $ofd_sno
     669     */
     670    public function set_ofd_sno( $ofd_sno )
     671    {
     672        $this->ofd_sno = $ofd_sno;
     673    }
     674
     675    /**
     676     * @since 2.2.0.1
     677     *
     678     * @return string
     679     */
     680    public function get_ofd_nds()
     681    {
     682        return $this->ofd_nds;
     683    }
     684
     685    /**
     686     * @since 2.2.0.1
     687     *
     688     * @param string $ofd_nds
     689     */
     690    public function set_ofd_nds( $ofd_nds )
     691    {
     692        $this->ofd_nds = $ofd_nds;
     693    }
     694
     695    /**
     696     * @since 2.2.0.1
     697     *
     698     * @return string
     699     */
     700    public function get_ofd_payment_method()
     701    {
     702        return $this->ofd_payment_method;
     703    }
     704
     705    /**
     706     * @since 2.2.0.1
     707     *
     708     * @param string $ofd_payment_method
     709     */
     710    public function set_ofd_payment_method( $ofd_payment_method )
     711    {
     712        $this->ofd_payment_method = $ofd_payment_method;
     713    }
     714
     715    /**
     716     * @since 2.2.0.1
     717     *
     718     * @return string
     719     */
     720    public function get_ofd_payment_object()
     721    {
     722        return $this->ofd_payment_object;
     723    }
     724
     725    /**
     726     * @since 2.2.0.1
     727     *
     728     * @param string $ofd_payment_object
     729     */
     730    public function set_ofd_payment_object( $ofd_payment_object )
     731    {
     732        $this->ofd_payment_object = $ofd_payment_object;
    433733    }
    434734
     
    7491049        $fields['ofd_payment_method'] = array
    7501050        (
    751             'title' => __('Признак способа расчёта', 'wc-robokassa'),
    752             'description' => __('Этот параметр необязательный. Если этот параметр не настроен, то в чеке будет указано значение параметра по умолчанию из Личного кабинета.', 'wc-robokassa'),
     1051            'title' => __('Indication of the calculation method', 'wc-robokassa'),
     1052            'description' => __('The parameter is optional. If this parameter is not configured, the check will indicate the default value of the parameter from the Personal account.', 'wc-robokassa'),
    7531053            'type' => 'select',
    7541054            'default' => '',
     
    7561056            (
    7571057                '' => __('Default in Robokassa', 'wc-robokassa'),
    758                 'full_prepayment' => __('Предоплата 100%', 'wc-robokassa'),
    759                 'prepayment' => __('Частичная предоплата', 'wc-robokassa'),
    760                 'advance' => __('Аванс', 'wc-robokassa'),
    761                 'full_payment' => __('Полный расчет', 'wc-robokassa'),
    762                 'partial_payment' => __('Частичный расчёт и кредит', 'wc-robokassa'),
    763                 'credit' => __('Передача в кредит', 'wc-robokassa'),
    764                 'credit_payment' => __('Оплата кредита', 'wc-robokassa')
     1058                'full_prepayment' => __('Prepayment 100%', 'wc-robokassa'),
     1059                'prepayment' => __('Partial prepayment', 'wc-robokassa'),
     1060                'advance' => __('Advance', 'wc-robokassa'),
     1061                'full_payment' => __('Full settlement', 'wc-robokassa'),
     1062                'partial_payment' => __('Partial settlement and credit', 'wc-robokassa'),
     1063                'credit' => __('Transfer on credit', 'wc-robokassa'),
     1064                'credit_payment' => __('Credit payment', 'wc-robokassa')
    7651065            ),
    7661066        );
     
    7681068        $fields['ofd_payment_object'] = array
    7691069        (
    770             'title' => __('Признак предмета расчёта', 'wc-robokassa'),
    771             'description' => __('Этот параметр необязательный. Если этот параметр не настроен, то в чеке будет указано значение параметра по умолчанию из Личного кабинета.', 'wc-robokassa'),
     1070            'title' => __('Sign of the subject of calculation', 'wc-robokassa'),
     1071            'description' => __('The parameter is optional. If this parameter is not configured, the check will indicate the default value of the parameter from the Personal account.', 'wc-robokassa'),
    7721072            'type' => 'select',
    7731073            'default' => '',
     
    7751075            (
    7761076                '' => __('Default in Robokassa', 'wc-robokassa'),
    777                 'commodity' => __('Товар', 'wc-robokassa'),
    778                 'excise' => __('Подакцизный товар', 'wc-robokassa'),
    779                 'job' => __('Работа', 'wc-robokassa'),
    780                 'service' => __('Услуга', 'wc-robokassa'),
    781                 'gambling_bet' => __('Ставка азартной игры', 'wc-robokassa'),
    782                 'gambling_prize' => __('Выигрыш азартной игры', 'wc-robokassa'),
    783                 'lottery' => __('Лотерейный билет', 'wc-robokassa'),
    784                 'lottery_prize' => __('Выигрыш лотереи', 'wc-robokassa'),
    785                 'intellectual_activity' => __('Результаты интеллектуальной деятельности', 'wc-robokassa'),
    786                 'payment' => __('Платеж', 'wc-robokassa'),
    787                 'agent_commission' => __('Агентское вознаграждение', 'wc-robokassa'),
    788                 'composite' => __('Составной предмет расчета', 'wc-robokassa'),
    789                 'another' => __('Иной предмет расчета', 'wc-robokassa'),
    790                 'property_right' => __('Имущественное право', 'wc-robokassa'),
    791                 'non-operating_gain' => __('Внереализационный доход', 'wc-robokassa'),
    792                 'insurance_premium' => __('Страховые взносы', 'wc-robokassa'),
    793                 'sales_tax' => __('Торговый сбор', 'wc-robokassa'),
    794                 'resort_fee' => __('Курортный сбор', 'wc-robokassa')
     1077                'commodity' => __('Product', 'wc-robokassa'),
     1078                'excise' => __('Excisable goods', 'wc-robokassa'),
     1079                'job' => __('Work', 'wc-robokassa'),
     1080                'service' => __('Service', 'wc-robokassa'),
     1081                'gambling_bet' => __('Gambling rate', 'wc-robokassa'),
     1082                'gambling_prize' => __('Gambling win', 'wc-robokassa'),
     1083                'lottery' => __('Lottery ticket', 'wc-robokassa'),
     1084                'lottery_prize' => __('Winning the lottery', 'wc-robokassa'),
     1085                'intellectual_activity' => __('Results of intellectual activity', 'wc-robokassa'),
     1086                'payment' => __('Payment', 'wc-robokassa'),
     1087                'agent_commission' => __('Agency fee', 'wc-robokassa'),
     1088                'composite' => __('Compound subject of calculation', 'wc-robokassa'),
     1089                'another' => __('Another object of the calculation', 'wc-robokassa'),
     1090                'property_right' => __('Property right', 'wc-robokassa'),
     1091                'non-operating_gain' => __('Extraordinary income', 'wc-robokassa'),
     1092                'insurance_premium' => __('Insurance premium', 'wc-robokassa'),
     1093                'sales_tax' => __('Sales tax', 'wc-robokassa'),
     1094                'resort_fee' => __('Resort fee', 'wc-robokassa')
    7951095            ),
    7961096        );
     
    8431143    public function is_valid_for_use()
    8441144    {
    845         $return = true;
    846 
    8471145        /**
    8481146         * Check allow currency
     
    8501148        if (!in_array(WC_Robokassa::instance()->get_wc_currency(), $this->currency_all, false))
    8511149        {
    852             $return = false;
    853 
    854             /**
    855              * Logger notice
    856              */
    857             WC_Robokassa::instance()->get_logger()->addInfo('Currency not support: ' . WC_Robokassa::instance()->get_wc_currency());
     1150            return false;
    8581151        }
    8591152
     
    8631156         * @todo сделать возможность тестирования не только админами
    8641157         */
    865         if ($this->test === 'yes' && !current_user_can( 'manage_options' ))
    866         {
    867             $return = false;
    868 
    869             /**
    870              * Logger notice
    871              */
    872             WC_Robokassa::instance()->get_logger()->addNotice('Test mode only admins.');
    873         }
    874 
    875         return $return;
     1158        if ($this->get_test() === 'yes' && !current_user_can('manage_options'))
     1159        {
     1160            return false;
     1161        }
     1162
     1163        return true;
    8761164    }
    8771165
     
    9881276         * Add order note
    9891277         */
    990         $order->add_order_note(__('The client started to pay.', 'wc-robokassa'));
     1278        if(method_exists($order, 'add_order_note'))
     1279        {
     1280            $order->add_order_note(__('The client started to pay.', 'wc-robokassa'));
     1281        }
    9911282
    9921283        /**
     
    10551346         * Shop login
    10561347         */
    1057         $args['MerchantLogin'] = $this->shop_login;
     1348        $args['MerchantLogin'] = $this->get_shop_login();
    10581349
    10591350        /**
     
    10971388         * Test mode
    10981389         */
    1099         if ($this->test === 'yes')
     1390        if ($this->get_test() === 'yes')
    11001391        {
    11011392            /**
    11021393             * Signature pass for testing
    11031394             */
    1104             $signature_pass = $this->test_shop_pass_1;
     1395            $signature_pass = $this->get_test_shop_pass_1();
    11051396
    11061397            /**
    11071398             * Sign method
    11081399             */
    1109             $signature_method = $this->test_sign_method;
     1400            $signature_method = $this->get_test_sign_method();
    11101401
    11111402            /**
     
    11221413             * Signature pass for real payments
    11231414             */
    1124             $signature_pass = $this->shop_pass_1;
     1415            $signature_pass = $this->get_shop_pass_1();
    11251416
    11261417            /**
    11271418             * Sign method
    11281419             */
    1129             $signature_method = $this->sign_method;
     1420            $signature_method = $this->get_sign_method();
    11301421        }
    11311422
     
    11381429            $args['Email'] = $billing_email;
    11391430        }
    1140         unset($billing_email);
    11411431
    11421432        /**
     
    11441434         */
    11451435        $receipt_result = '';
    1146         if($this->ofd_status !== false)
     1436        if($this->is_ofd_status() === true)
    11471437        {
    11481438            /**
     
    11541444             * Items
    11551445             */
    1156             $receipt_items = array();
    1157 
    1158             foreach ($order->get_items() as $receipt_items_key => $receipt_items_value)
    1159             {
    1160                 /**
    1161                  * Quantity
    1162                  */
    1163                 $item_quantity = $receipt_items_value->get_quantity();
    1164 
    1165                 /**
    1166                  * Total item sum
    1167                  */
    1168                 $item_total = $receipt_items_value->get_total();
    1169 
    1170                 /**
    1171                  * Build positions
    1172                  */
    1173                 $receipt_items[] = array
    1174                 (
    1175                     /**
    1176                      * Название товара
    1177                      *
    1178                      * максимальная длина 128 символов
    1179                      */
    1180                     'name' => $receipt_items_value['name'],
    1181 
    1182                     /**
    1183                      * Стоимость предмета расчета с учетом скидок и наценок
    1184                      *
    1185                      * Цена в рублях:
    1186                      *  целая часть не более 8 знаков;
    1187                      *  дробная часть не более 2 знаков.
    1188                      */
    1189                     'sum' => intval($item_total),
    1190 
    1191                     /**
    1192                      * Количество/вес
    1193                      *
    1194                      * максимальная длина 128 символов
    1195                      */
    1196                     'quantity' => intval($item_quantity),
    1197 
    1198                     /**
    1199                      * Tax
    1200                      */
    1201                     'tax' => $this->ofd_nds,
    1202 
    1203                     /**
    1204                      * Payment method
    1205                      */
    1206                     'payment_method' => $this->ofd_payment_method,
    1207 
    1208                     /**
    1209                      * Payment object
    1210                      */
    1211                     'payment_object' => $this->ofd_payment_object,
    1212                 );
    1213             }
    1214 
    1215             /**
    1216              * Delivery
    1217              */
    1218             if ($order->get_shipping_total() > 0)
    1219             {
    1220                 /**
    1221                  * Build positions
    1222                  */
    1223                 $receipt_items[] = array
    1224                 (
    1225                     /**
    1226                      * Название товара
    1227                      *
    1228                      * максимальная длина 128 символов
    1229                      */
    1230                     'name' => __('Delivery', 'wc-robokassa'),
    1231 
    1232                     /**
    1233                      * Стоимость предмета расчета с учетом скидок и наценок
    1234                      *
    1235                      * Цена в рублях:
    1236                      *  целая часть не более 8 знаков;
    1237                      *  дробная часть не более 2 знаков.
    1238                      */
    1239                     'sum' => intval($order->get_shipping_total()),
    1240 
    1241                     /**
    1242                      * Количество/вес
    1243                      *
    1244                      * максимальная длина 128 символов
    1245                      */
    1246                     'quantity' => 1,
    1247 
    1248                     /**
    1249                      * Tax
    1250                      */
    1251                     'tax' => $this->ofd_nds,
    1252 
    1253                     /**
    1254                      * Payment method
    1255                      */
    1256                     'payment_method' => $this->ofd_payment_method,
    1257 
    1258                     /**
    1259                      * Payment object
    1260                      */
    1261                     'payment_object' => $this->ofd_payment_object,
    1262                 );
    1263             }
     1446            $receipt_items = $this->generate_receipt_items($order);
    12641447
    12651448            /**
    12661449             * Sno
    12671450             */
    1268             $receipt['sno'] = $this->ofd_sno;
     1451            $receipt['sno'] = $this->get_ofd_sno();
    12691452
    12701453            /**
     
    12771460             */
    12781461            $receipt_result = json_encode($receipt);
    1279 
    1280             /**
    1281              * Insert $receipt_result into debug mode
    1282              */
    1283             WC_Robokassa::instance()->get_logger()->addDebug('$receipt_result' . $receipt_result);
    12841462        }
    12851463
     
    13131491         * Language (culture)
    13141492         */
    1315         $args['Culture'] = $this->user_interface_language;
     1493        $args['Culture'] = $this->get_user_interface_language();
    13161494
    13171495        /**
     
    13321510         * Return full form
    13331511         */
    1334         return '<form action="'.esc_url($this->form_url).'" method="POST" id="wc_robokassa_payment_form" accept-charset="utf-8">'."\n".
     1512        return '<form action="'.esc_url($this->get_form_url()).'" method="POST" id="wc_robokassa_payment_form" accept-charset="utf-8">'."\n".
    13351513               implode("\n", $args_array).
    13361514               '<input type="submit" class="button alt" id="submit_wc_robokassa_payment_form" value="'.__('Pay', 'wc-robokassa').
     
    13401518
    13411519    /**
     1520     * @since 2.2.0.1
     1521     *
     1522     * @param WC_Order $order
     1523     *
     1524     * @return array
     1525     */
     1526    public function generate_receipt_items($order)
     1527    {
     1528        $receipt_items = array();
     1529
     1530        /**
     1531         * Order items
     1532         */
     1533        foreach ($order->get_items() as $receipt_items_key => $receipt_items_value)
     1534        {
     1535            /**
     1536             * Quantity
     1537             */
     1538            $item_quantity = $receipt_items_value->get_quantity();
     1539
     1540            /**
     1541             * Total item sum
     1542             */
     1543            $item_total = $receipt_items_value->get_total();
     1544
     1545            /**
     1546             * Build positions
     1547             */
     1548            $receipt_items[] = array
     1549            (
     1550                /**
     1551                 * Название товара
     1552                 *
     1553                 * максимальная длина 128 символов
     1554                 */
     1555                'name' => $receipt_items_value['name'],
     1556
     1557                /**
     1558                 * Стоимость предмета расчета с учетом скидок и наценок
     1559                 *
     1560                 * Цена в рублях:
     1561                 *  целая часть не более 8 знаков;
     1562                 *  дробная часть не более 2 знаков.
     1563                 */
     1564                'sum' => intval($item_total),
     1565
     1566                /**
     1567                 * Количество/вес
     1568                 *
     1569                 * максимальная длина 128 символов
     1570                 */
     1571                'quantity' => intval($item_quantity),
     1572
     1573                /**
     1574                 * Tax
     1575                 */
     1576                'tax' => $this->get_ofd_nds(),
     1577
     1578                /**
     1579                 * Payment method
     1580                 */
     1581                'payment_method' => $this->get_ofd_payment_method(),
     1582
     1583                /**
     1584                 * Payment object
     1585                 */
     1586                'payment_object' => $this->get_ofd_payment_object(),
     1587            );
     1588        }
     1589
     1590        /**
     1591         * Delivery
     1592         */
     1593        if ($order->get_shipping_total() > 0)
     1594        {
     1595            /**
     1596             * Build positions
     1597             */
     1598            $receipt_items[] = array
     1599            (
     1600                /**
     1601                 * Название товара
     1602                 *
     1603                 * максимальная длина 128 символов
     1604                 */
     1605                'name' => __('Delivery', 'wc-robokassa'),
     1606
     1607                /**
     1608                 * Стоимость предмета расчета с учетом скидок и наценок
     1609                 *
     1610                 * Цена в рублях:
     1611                 *  целая часть не более 8 знаков;
     1612                 *  дробная часть не более 2 знаков.
     1613                 */
     1614                'sum' => intval($order->get_shipping_total()),
     1615
     1616                /**
     1617                 * Количество/вес
     1618                 *
     1619                 * максимальная длина 128 символов
     1620                 */
     1621                'quantity' => 1,
     1622
     1623                /**
     1624                 * Tax
     1625                 */
     1626                'tax' => $this->get_ofd_nds(),
     1627
     1628                /**
     1629                 * Payment method
     1630                 */
     1631                'payment_method' => $this->get_ofd_payment_method(),
     1632
     1633                /**
     1634                 * Payment object
     1635                 */
     1636                'payment_object' => $this->get_ofd_payment_object(),
     1637            );
     1638        }
     1639
     1640        return $receipt_items;
     1641    }
     1642
     1643    /**
    13421644     * Get signature
    13431645     *
     
    13721674
    13731675            default:
    1374 
    13751676                $signature = strtoupper(md5($string));
    13761677        }
     
    14121713         * Test mode
    14131714         */
    1414         if ($this->test === 'yes' || (array_key_exists('IsTest', $_REQUEST) && $_REQUEST['IsTest'] == '1'))
     1715        if ($this->get_test() === 'yes' || (array_key_exists('IsTest', $_REQUEST) && $_REQUEST['IsTest'] == '1'))
    14151716        {
    14161717            /**
     
    14221723             * Signature pass for testing
    14231724             */
    1424             if ($_GET['action'] === 'success')
     1725            if ($_REQUEST['action'] === 'success')
    14251726            {
    1426                 $signature_pass = $this->test_shop_pass_1;
     1727                $signature_pass = $this->get_test_shop_pass_1();
    14271728            }
    14281729            else
    14291730            {
    1430                 $signature_pass = $this->test_shop_pass_2;
     1731                $signature_pass = $this->get_test_shop_pass_2();
    14311732            }
    14321733
     
    14341735             * Sign method
    14351736             */
    1436             $signature_method = $this->test_sign_method;
     1737            $signature_method = $this->get_test_sign_method();
    14371738        }
    14381739        /**
     
    14511752            if ($_GET['action'] === 'success')
    14521753            {
    1453                 $signature_pass = $this->shop_pass_1;
     1754                $signature_pass = $this->get_shop_pass_1();
    14541755            }
    14551756            else
    14561757            {
    1457                 $signature_pass = $this->shop_pass_2;
     1758                $signature_pass = $this->get_shop_pass_2();
    14581759            }
    14591760
     
    14611762             * Sign method
    14621763             */
    1463             $signature_method = $this->sign_method;
     1764            $signature_method = $this->get_sign_method();
    14641765        }
    14651766
     
    14981799         * Add order note
    14991800         */
    1500         $order->add_order_note(sprintf(__('Robokassa request success. Sum: %1$s Signature: %2$s Remote signature: %3$s', 'wc-robokassa'), $sum, $local_signature, $signature));
     1801        if(method_exists($order, 'add_order_note'))
     1802        {
     1803            $order->add_order_note( sprintf( __( 'Robokassa request success. Sum: %1$s Signature: %2$s Remote signature: %3$s', 'wc-robokassa' ), $sum, $local_signature, $signature ) );
     1804        }
    15011805
    15021806        /**
    15031807         * Result
    15041808         */
    1505         if ($_GET['action'] === 'result')
     1809        if ($_REQUEST['action'] === 'result')
    15061810        {
    15071811            /**
     
    15201824                 * Add order note
    15211825                 */
    1522                 $order->add_order_note(sprintf(__('Validate hash error. Local: %1$s Remote: %2$s', 'wc-robokassa'), $local_signature, $signature));
    1523 
    1524                 /**
    1525                  * Logger info
    1526                  */
    1527                 WC_Robokassa::instance()->get_logger()->addError('Validate secret key error. Local hash != remote hash.');
     1826                if(method_exists($order, 'add_order_note'))
     1827                {
     1828                    $order->add_order_note( sprintf( __( 'Validate hash error. Local: %1$s Remote: %2$s', 'wc-robokassa' ), $local_signature, $signature ) );
     1829                }
    15281830            }
    15291831
     
    15331835            if($validate === true)
    15341836            {
    1535                 /**
    1536                  * Logger info
    1537                  */
    1538                 WC_Robokassa::instance()->get_logger()->addInfo('Result Validated success.');
    1539 
    15401837                /**
    15411838                 * Testing
     
    15461843                     * Add order note
    15471844                     */
    1548                     $order->add_order_note(__('Order successfully paid (TEST MODE).', 'wc-robokassa'));
    1549 
    1550                     /**
    1551                      * Logger notice
    1552                      */
    1553                     WC_Robokassa::instance()->get_logger()->addNotice('Order successfully paid (TEST MODE).');
     1845                    if(method_exists($order, 'add_order_note'))
     1846                    {
     1847                        $order->add_order_note( __( 'Order successfully paid (TEST MODE).', 'wc-robokassa' ) );
     1848                    }
    15541849                }
    15551850                /**
     
    15611856                     * Add order note
    15621857                     */
    1563                     $order->add_order_note(__('Order successfully paid.', 'wc-robokassa'));
    1564 
    1565                     /**
    1566                      * Logger notice
    1567                      */
    1568                     WC_Robokassa::instance()->get_logger()->addNotice('Order successfully paid.');
     1858                    if(method_exists($order, 'add_order_note'))
     1859                    {
     1860                        $order->add_order_note( __( 'Order successfully paid.', 'wc-robokassa' ) );
     1861                    }
    15691862                }
    1570 
    1571                 /**
    1572                  * Logger notice
    1573                  */
    1574                 WC_Robokassa::instance()->get_logger()->addInfo('Payment complete.');
    15751863
    15761864                /**
     
    15821870
    15831871            /**
    1584              * Logger notice
    1585              */
    1586             WC_Robokassa::instance()->get_logger()->addError('Result Validated error. Payment error, please pay other time.');
    1587 
    1588             /**
    15891872             * Send Service unavailable
    15901873             */
     
    15941877         * Success
    15951878         */
    1596         else if ($_GET['action'] === 'success')
     1879        else if ($_REQUEST['action'] === 'success')
    15971880        {
    15981881            /**
    15991882             * Add order note
    16001883             */
    1601             $order->add_order_note(__('Client return to success page.', 'wc-robokassa'));
     1884            if(method_exists($order, 'add_order_note'))
     1885            {
     1886                $order->add_order_note( __( 'Client return to success page.', 'wc-robokassa' ) );
     1887            }
    16021888
    16031889            /**
     
    16091895             * Redirect to success
    16101896             */
    1611             wp_redirect( $this->get_return_url( $order ) );
     1897            wp_redirect($this->get_return_url($order));
    16121898            die();
    16131899        }
     
    16151901         * Fail
    16161902         */
    1617         else if ($_GET['action'] === 'fail')
     1903        else if ($_REQUEST['action'] === 'fail')
    16181904        {
    16191905            /**
    16201906             * Add order note
    16211907             */
    1622             $order->add_order_note(__('The order has not been paid.', 'wc-robokassa'));
     1908            if(method_exists($order, 'add_order_note'))
     1909            {
     1910                $order->add_order_note( __( 'The order has not been paid.', 'wc-robokassa' ) );
     1911            }
    16231912
    16241913            /**
  • wc-robokassa/trunk/includes/class-wc-robokassa.php

    r2168628 r2200862  
    266266    public function load_robokassa_api()
    267267    {
    268         $robokassa_api_class_name = apply_filters('wc_robokassa_api_class_name_load', 'Wc_Robokassa_Api');
     268        $default_class_name = 'Wc_Robokassa_Api';
     269
     270        $robokassa_api_class_name = apply_filters('wc_robokassa_api_class_name_load', $default_class_name);
    269271
    270272        if(!class_exists($robokassa_api_class_name))
    271273        {
    272             $robokassa_api_class_name = 'Wc_Robokassa_Api';
     274            $robokassa_api_class_name = $default_class_name;
    273275        }
    274276
     
    355357    public function wc_gateway_method_add($methods)
    356358    {
    357         $robokassa_method_class_name = apply_filters('wc_robokassa_method_class_name_add', 'Wc_Robokassa_Method');
     359        $default_class_name = 'Wc_Robokassa_Method';
     360
     361        $robokassa_method_class_name = apply_filters('wc_robokassa_method_class_name_add', $default_class_name);
    358362
    359363        if(!class_exists($robokassa_method_class_name))
    360364        {
    361             $robokassa_method_class_name = 'Wc_Robokassa_Method';
     365            $robokassa_method_class_name = $default_class_name;
    362366        }
    363367
  • wc-robokassa/trunk/languages/wc-robokassa-ru_RU.po

    r2168628 r2200862  
    22msgstr ""
    33"Project-Id-Version: Robokassa - Payment Gateway for WooCommerce\n"
    4 "POT-Creation-Date: 2019-10-05 08:53+0300\n"
    5 "PO-Revision-Date: 2019-10-05 08:55+0300\n"
     4"POT-Creation-Date: 2019-11-25 16:07+0300\n"
     5"PO-Revision-Date: 2019-11-25 16:31+0300\n"
    66"Last-Translator: Mofsy <ru.mofsy@yandex.ru>\n"
    77"Language-Team: Mofsy <support@mofsy.ru>\n"
     
    2323
    2424#: includes/class-wc-robokassa-method.php:134
    25 #: includes/class-wc-robokassa-method.php:670
     25#: includes/class-wc-robokassa-method.php:970
    2626msgid "Robokassa"
    2727msgstr "Робокасса"
     
    3131msgstr "Оплата через Робокассу."
    3232
    33 #: includes/class-wc-robokassa-method.php:459
     33#: includes/class-wc-robokassa-method.php:759
    3434msgid "Main settings"
    3535msgstr "Основные настройки"
    3636
    37 #: includes/class-wc-robokassa-method.php:461
     37#: includes/class-wc-robokassa-method.php:761
    3838msgid "Work is impossible without these settings."
    3939msgstr "Работа невозможна без этих настроек."
    4040
    41 #: includes/class-wc-robokassa-method.php:466
     41#: includes/class-wc-robokassa-method.php:766
    4242msgid "Online / Offline gateway"
    4343msgstr "Включить / Выключить шлюз"
    4444
    45 #: includes/class-wc-robokassa-method.php:468
     45#: includes/class-wc-robokassa-method.php:768
    4646msgid "Enable display of the payment gateway on the website"
    4747msgstr "Включить отображение платежного шлюза на сайте"
    4848
    49 #: includes/class-wc-robokassa-method.php:475
     49#: includes/class-wc-robokassa-method.php:775
    5050msgid "Shop identifier"
    5151msgstr "Идентификатор магазина"
    5252
    53 #: includes/class-wc-robokassa-method.php:477
     53#: includes/class-wc-robokassa-method.php:777
    5454msgid "Unique identification for shop from Robokassa."
    5555msgstr "Уникальный идентификатор магазина из личного кабинета Робокассы."
    5656
    57 #: includes/class-wc-robokassa-method.php:483
    58 #: includes/class-wc-robokassa-method.php:581
     57#: includes/class-wc-robokassa-method.php:783
     58#: includes/class-wc-robokassa-method.php:881
    5959msgid "Hash calculation algorithm"
    6060msgstr "Алгоритм вычисления хэша"
    6161
    62 #: includes/class-wc-robokassa-method.php:484
    63 #: includes/class-wc-robokassa-method.php:582
     62#: includes/class-wc-robokassa-method.php:784
     63#: includes/class-wc-robokassa-method.php:882
    6464msgid ""
    6565"The algorithm must match the one specified in the personal account of "
     
    6969"ROBOKASSA."
    7070
    71 #: includes/class-wc-robokassa-method.php:500
    72 #: includes/class-wc-robokassa-method.php:598
     71#: includes/class-wc-robokassa-method.php:800
     72#: includes/class-wc-robokassa-method.php:898
    7373msgid "Password #1"
    7474msgstr "Пароль #1"
    7575
    76 #: includes/class-wc-robokassa-method.php:502
     76#: includes/class-wc-robokassa-method.php:802
    7777msgid ""
    7878"Please write Shop pass 1. The pass must match the one specified in the "
     
    8282"указан в личном кабинете ROBOKASSA."
    8383
    84 #: includes/class-wc-robokassa-method.php:508
    85 #: includes/class-wc-robokassa-method.php:606
     84#: includes/class-wc-robokassa-method.php:808
     85#: includes/class-wc-robokassa-method.php:906
    8686msgid "Password #2"
    8787msgstr "Пароль #2"
    8888
    89 #: includes/class-wc-robokassa-method.php:510
     89#: includes/class-wc-robokassa-method.php:810
    9090msgid ""
    9191"Please write Shop pass 2. The pass must match the one specified in the "
     
    9595"указан в личном кабинете ROBOKASSA."
    9696
    97 #: includes/class-wc-robokassa-method.php:514
     97#: includes/class-wc-robokassa-method.php:814
    9898msgid ""
    9999"Address to notify the site of the results of operations in the background. "
     
    105105"настройках. Способ уведомления: POST."
    106106
    107 #: includes/class-wc-robokassa-method.php:518
     107#: includes/class-wc-robokassa-method.php:818
    108108msgid "Result Url"
    109109msgstr "Result Url"
    110110
    111 #: includes/class-wc-robokassa-method.php:525
     111#: includes/class-wc-robokassa-method.php:825
    112112msgid ""
    113113"The address for the user to go to the site after successful payment. Copy "
     
    120120"Способ уведомления: POST. Вы можете указать другие адреса по вашему выбору."
    121121
    122 #: includes/class-wc-robokassa-method.php:529
     122#: includes/class-wc-robokassa-method.php:829
    123123msgid "Success Url"
    124124msgstr "Success Url"
    125125
    126 #: includes/class-wc-robokassa-method.php:536
     126#: includes/class-wc-robokassa-method.php:836
    127127msgid ""
    128128"The address for the user to go to the site, after payment with an error. "
     
    135135"Способ уведомления: POST. Вы можете указать другие адреса по вашему выбору."
    136136
    137 #: includes/class-wc-robokassa-method.php:540
     137#: includes/class-wc-robokassa-method.php:840
    138138msgid "Fail Url"
    139139msgstr "Fail Url"
    140140
    141 #: includes/class-wc-robokassa-method.php:561
     141#: includes/class-wc-robokassa-method.php:861
    142142msgid "Parameters of the test fees"
    143143msgstr "Параметры проведения тестовых платежей"
    144144
    145 #: includes/class-wc-robokassa-method.php:563
     145#: includes/class-wc-robokassa-method.php:863
    146146msgid ""
    147147"Set up test payments. Passwords and counting method signature for test "
     
    151151"тестовых платежей отличаются."
    152152
    153 #: includes/class-wc-robokassa-method.php:568
     153#: includes/class-wc-robokassa-method.php:868
    154154msgid "Test mode"
    155155msgstr "Тестовый режим"
    156156
    157 #: includes/class-wc-robokassa-method.php:570
     157#: includes/class-wc-robokassa-method.php:870
    158158msgid "Activate testing mode for admins."
    159159msgstr "Активация тестового режима для админов."
    160160
    161 #: includes/class-wc-robokassa-method.php:574
    162 #: includes/class-wc-robokassa-method.php:825
     161#: includes/class-wc-robokassa-method.php:874
     162#: includes/class-wc-robokassa-method.php:1125
    163163msgid "Off"
    164164msgstr "Отключить"
    165165
    166 #: includes/class-wc-robokassa-method.php:575
     166#: includes/class-wc-robokassa-method.php:875
    167167msgid "On"
    168168msgstr "Включить"
    169169
    170 #: includes/class-wc-robokassa-method.php:600
     170#: includes/class-wc-robokassa-method.php:900
    171171msgid ""
    172172"Please write Shop pass 1 for testing payments. The pass must match the one "
     
    176176"соответствовать тому, который указан в личном кабинете ROBOKASSA."
    177177
    178 #: includes/class-wc-robokassa-method.php:608
     178#: includes/class-wc-robokassa-method.php:908
    179179msgid ""
    180180"Please write Shop pass 2 for testing payments. The pass must match the one "
     
    184184"соответствовать тому, который указан в личном кабинете ROBOKASSA."
    185185
    186 #: includes/class-wc-robokassa-method.php:626
     186#: includes/class-wc-robokassa-method.php:926
    187187msgid "Interface"
    188188msgstr "Интерфейс"
    189189
    190 #: includes/class-wc-robokassa-method.php:628
     190#: includes/class-wc-robokassa-method.php:928
    191191msgid "Customize the appearance. Can leave it at that."
    192192msgstr "Настройка внешнего вида. Можете оставить все как есть."
    193193
    194 #: includes/class-wc-robokassa-method.php:633
     194#: includes/class-wc-robokassa-method.php:933
    195195msgid "Show gateway icon?"
    196196msgstr "Показать иконку шлюза?"
    197197
    198 #: includes/class-wc-robokassa-method.php:635
     198#: includes/class-wc-robokassa-method.php:935
    199199msgid "Show"
    200200msgstr "Показать"
    201201
    202 #: includes/class-wc-robokassa-method.php:641
     202#: includes/class-wc-robokassa-method.php:941
    203203msgid "Language interface"
    204204msgstr "Язык интерфейса"
    205205
    206 #: includes/class-wc-robokassa-method.php:645
     206#: includes/class-wc-robokassa-method.php:945
    207207msgid "Russian"
    208208msgstr "Русский"
    209209
    210 #: includes/class-wc-robokassa-method.php:646
     210#: includes/class-wc-robokassa-method.php:946
    211211msgid "English"
    212212msgstr "Английский"
    213213
    214 #: includes/class-wc-robokassa-method.php:648
     214#: includes/class-wc-robokassa-method.php:948
    215215msgid "What language interface displayed for the customer on Robokassa?"
    216216msgstr "Какой язык показывать клиентам на стороне сервиса Робокасса?"
    217217
    218 #: includes/class-wc-robokassa-method.php:654
     218#: includes/class-wc-robokassa-method.php:954
    219219msgid "Language based on the locale?"
    220220msgstr "Язык интерфейса на основе локали?"
    221221
    222 #: includes/class-wc-robokassa-method.php:658
     222#: includes/class-wc-robokassa-method.php:958
    223223msgid "Yes"
    224224msgstr "Да"
    225225
    226 #: includes/class-wc-robokassa-method.php:659
     226#: includes/class-wc-robokassa-method.php:959
    227227msgid "No"
    228228msgstr "Нет"
    229229
    230 #: includes/class-wc-robokassa-method.php:661
     230#: includes/class-wc-robokassa-method.php:961
    231231msgid "Trying to get the language based on the locale?"
    232232msgstr "Получать язык для интерфейса Робокассы  на основе локали?"
    233233
    234 #: includes/class-wc-robokassa-method.php:667
     234#: includes/class-wc-robokassa-method.php:967
    235235msgid "Title"
    236236msgstr "Название"
    237237
    238 #: includes/class-wc-robokassa-method.php:669
     238#: includes/class-wc-robokassa-method.php:969
    239239msgid "This is the name that the user sees during the payment."
    240240msgstr "Заголовок, который видит пользователь в процессе оформления заказа."
    241241
    242 #: includes/class-wc-robokassa-method.php:675
     242#: includes/class-wc-robokassa-method.php:975
    243243msgid "Order button text"
    244244msgstr "Название кнопки оплаты"
    245245
    246 #: includes/class-wc-robokassa-method.php:677
     246#: includes/class-wc-robokassa-method.php:977
    247247msgid "This is the button text that the user sees during the payment."
    248248msgstr ""
     
    250250"заказа."
    251251
    252 #: includes/class-wc-robokassa-method.php:678
     252#: includes/class-wc-robokassa-method.php:978
    253253msgid "Goto pay"
    254254msgstr "Перейти к оплате"
    255255
    256 #: includes/class-wc-robokassa-method.php:683
     256#: includes/class-wc-robokassa-method.php:983
    257257msgid "Description"
    258258msgstr "Описание"
    259259
    260 #: includes/class-wc-robokassa-method.php:685
     260#: includes/class-wc-robokassa-method.php:985
    261261msgid ""
    262262"Description of the method of payment that the customer will see on our "
     
    264264msgstr "Описанием метода оплаты которое клиент будет видеть на вашем сайте."
    265265
    266 #: includes/class-wc-robokassa-method.php:686
     266#: includes/class-wc-robokassa-method.php:986
    267267msgid "Payment via Robokassa."
    268268msgstr "Оплата через Робокассу."
    269269
    270 #: includes/class-wc-robokassa-method.php:703
     270#: includes/class-wc-robokassa-method.php:1003
    271271msgid "Cart content sending (54fz)"
    272272msgstr "Отправка данных корзины (54 федеральный закон)"
    273273
    274 #: includes/class-wc-robokassa-method.php:705
     274#: includes/class-wc-robokassa-method.php:1005
    275275msgid ""
    276276"These settings are required only for legal entities in the absence of its "
     
    280280"кассового аппарата."
    281281
    282 #: includes/class-wc-robokassa-method.php:710
     282#: includes/class-wc-robokassa-method.php:1010
    283283msgid "The transfer of goods"
    284284msgstr "Передача товаров"
    285285
    286 #: includes/class-wc-robokassa-method.php:712
     286#: includes/class-wc-robokassa-method.php:1012
    287287msgid "Enable"
    288288msgstr "Включить"
    289289
    290 #: includes/class-wc-robokassa-method.php:713
     290#: includes/class-wc-robokassa-method.php:1013
    291291msgid ""
    292292"When you select the option, a check will be generated and sent to the tax "
     
    300300"Федерации. Возможны расхождения в сумме НДС с суммой, рассчитанной магазином."
    301301
    302 #: includes/class-wc-robokassa-method.php:719
     302#: includes/class-wc-robokassa-method.php:1019
    303303msgid "Taxation system"
    304304msgstr "Система налогообложения"
    305305
    306 #: includes/class-wc-robokassa-method.php:724
     306#: includes/class-wc-robokassa-method.php:1024
    307307msgid "General"
    308308msgstr "Общая"
    309309
    310 #: includes/class-wc-robokassa-method.php:725
     310#: includes/class-wc-robokassa-method.php:1025
    311311msgid "Simplified, income"
    312312msgstr "Упрощенная, доход"
    313313
    314 #: includes/class-wc-robokassa-method.php:726
     314#: includes/class-wc-robokassa-method.php:1026
    315315msgid "Simplified, income minus consumption"
    316316msgstr "Упрощенная, доход минус расход"
    317317
    318 #: includes/class-wc-robokassa-method.php:727
     318#: includes/class-wc-robokassa-method.php:1027
    319319msgid "Single tax on imputed income"
    320320msgstr "Единый налог на вмененный доход"
    321321
    322 #: includes/class-wc-robokassa-method.php:728
     322#: includes/class-wc-robokassa-method.php:1028
    323323msgid "Single agricultural tax"
    324324msgstr "Единый сельскохозяйственный налог"
    325325
    326 #: includes/class-wc-robokassa-method.php:729
     326#: includes/class-wc-robokassa-method.php:1029
    327327msgid "Patent system of taxation"
    328328msgstr "Патентная система налогообложения"
    329329
    330 #: includes/class-wc-robokassa-method.php:735
     330#: includes/class-wc-robokassa-method.php:1035
    331331msgid "Default VAT rate"
    332332msgstr "НДС по умолчанию"
    333333
    334 #: includes/class-wc-robokassa-method.php:740
     334#: includes/class-wc-robokassa-method.php:1040
    335335msgid "Without the vat"
    336336msgstr "Без НДС"
    337337
    338 #: includes/class-wc-robokassa-method.php:741
     338#: includes/class-wc-robokassa-method.php:1041
    339339msgid "VAT 0%"
    340340msgstr "НДС 0%"
    341341
    342 #: includes/class-wc-robokassa-method.php:742
     342#: includes/class-wc-robokassa-method.php:1042
    343343msgid "VAT 10%"
    344344msgstr "НДС 10%"
    345345
    346 #: includes/class-wc-robokassa-method.php:743
     346#: includes/class-wc-robokassa-method.php:1043
    347347msgid "VAT 20%"
    348348msgstr "НДС 20%"
    349349
    350 #: includes/class-wc-robokassa-method.php:744
     350#: includes/class-wc-robokassa-method.php:1044
    351351msgid "VAT receipt settlement rate 10/110"
    352352msgstr "НДС рассчитанный по ставке 10/110"
    353353
    354 #: includes/class-wc-robokassa-method.php:745
     354#: includes/class-wc-robokassa-method.php:1045
    355355msgid "VAT receipt settlement rate 20/120"
    356356msgstr "НДС рассчитанный по ставке 20/120"
    357357
    358 #: includes/class-wc-robokassa-method.php:751
    359 msgid "Признак способа расчёта"
    360 msgstr ""
    361 
    362 #: includes/class-wc-robokassa-method.php:752
    363 #: includes/class-wc-robokassa-method.php:771
    364 msgid ""
    365 "Этот параметр необязательный. Если этот параметр не настроен, то в чеке "
    366 "будет указано значение параметра по умолчанию из Личного кабинета."
    367 msgstr ""
    368 
    369 #: includes/class-wc-robokassa-method.php:757
    370 #: includes/class-wc-robokassa-method.php:776
     358#: includes/class-wc-robokassa-method.php:1051
     359msgid "Indication of the calculation method"
     360msgstr "Указание метода расчета"
     361
     362#: includes/class-wc-robokassa-method.php:1052
     363#: includes/class-wc-robokassa-method.php:1071
     364msgid ""
     365"The parameter is optional. If this parameter is not configured, the check "
     366"will indicate the default value of the parameter from the Personal account."
     367msgstr ""
     368"Параметр является необязательным. Если этот параметр не настроен, то в чеке "
     369"будет указано значение параметра по умолчанию из личного кабинета."
     370
     371#: includes/class-wc-robokassa-method.php:1057
     372#: includes/class-wc-robokassa-method.php:1076
    371373msgid "Default in Robokassa"
    372374msgstr "По умолчанию в Робокассе"
    373375
    374 #: includes/class-wc-robokassa-method.php:758
    375 msgid "Предоплата 100%"
    376 msgstr ""
    377 
    378 #: includes/class-wc-robokassa-method.php:759
    379 msgid "Частичная предоплата"
    380 msgstr ""
    381 
    382 #: includes/class-wc-robokassa-method.php:760
    383 msgid "Аванс"
    384 msgstr ""
    385 
    386 #: includes/class-wc-robokassa-method.php:761
    387 msgid "Полный расчет"
    388 msgstr ""
    389 
    390 #: includes/class-wc-robokassa-method.php:762
    391 msgid "Частичный расчёт и кредит"
    392 msgstr ""
    393 
    394 #: includes/class-wc-robokassa-method.php:763
    395 msgid "Передача в кредит"
    396 msgstr ""
    397 
    398 #: includes/class-wc-robokassa-method.php:764
    399 msgid "Оплата кредита"
    400 msgstr ""
    401 
    402 #: includes/class-wc-robokassa-method.php:770
    403 msgid "Признак предмета расчёта"
    404 msgstr ""
    405 
    406 #: includes/class-wc-robokassa-method.php:777
    407 msgid "Товар"
    408 msgstr ""
    409 
    410 #: includes/class-wc-robokassa-method.php:778
    411 msgid "Подакцизный товар"
    412 msgstr ""
    413 
    414 #: includes/class-wc-robokassa-method.php:779
    415 msgid "Работа"
    416 msgstr ""
    417 
    418 #: includes/class-wc-robokassa-method.php:780
    419 msgid "Услуга"
    420 msgstr ""
    421 
    422 #: includes/class-wc-robokassa-method.php:781
    423 msgid "Ставка азартной игры"
    424 msgstr ""
    425 
    426 #: includes/class-wc-robokassa-method.php:782
    427 msgid "Выигрыш азартной игры"
    428 msgstr ""
    429 
    430 #: includes/class-wc-robokassa-method.php:783
    431 msgid "Лотерейный билет"
    432 msgstr ""
    433 
    434 #: includes/class-wc-robokassa-method.php:784
    435 msgid "Выигрыш лотереи"
    436 msgstr ""
    437 
    438 #: includes/class-wc-robokassa-method.php:785
    439 msgid "Результаты интеллектуальной деятельности"
    440 msgstr ""
    441 
    442 #: includes/class-wc-robokassa-method.php:786
    443 msgid "Платеж"
    444 msgstr ""
    445 
    446 #: includes/class-wc-robokassa-method.php:787
    447 msgid "Агентское вознаграждение"
    448 msgstr ""
    449 
    450 #: includes/class-wc-robokassa-method.php:788
    451 msgid "Составной предмет расчета"
    452 msgstr ""
    453 
    454 #: includes/class-wc-robokassa-method.php:789
    455 msgid "Иной предмет расчета"
    456 msgstr ""
    457 
    458 #: includes/class-wc-robokassa-method.php:790
    459 msgid "Имущественное право"
    460 msgstr ""
    461 
    462 #: includes/class-wc-robokassa-method.php:791
    463 msgid "Внереализационный доход"
    464 msgstr ""
    465 
    466 #: includes/class-wc-robokassa-method.php:792
    467 msgid "Страховые взносы"
    468 msgstr ""
    469 
    470 #: includes/class-wc-robokassa-method.php:793
    471 msgid "Торговый сбор"
    472 msgstr ""
    473 
    474 #: includes/class-wc-robokassa-method.php:794
    475 msgid "Курортный сбор"
    476 msgstr ""
    477 
    478 #: includes/class-wc-robokassa-method.php:812
     376#: includes/class-wc-robokassa-method.php:1058
     377msgid "Prepayment 100%"
     378msgstr "Предоплата 100%"
     379
     380#: includes/class-wc-robokassa-method.php:1059
     381msgid "Partial prepayment"
     382msgstr "Частичная предоплата"
     383
     384#: includes/class-wc-robokassa-method.php:1060
     385msgid "Advance"
     386msgstr "Аванс"
     387
     388#: includes/class-wc-robokassa-method.php:1061
     389msgid "Full settlement"
     390msgstr "Полная предоплата"
     391
     392#: includes/class-wc-robokassa-method.php:1062
     393msgid "Partial settlement and credit"
     394msgstr "Частичный расчет и кредит"
     395
     396#: includes/class-wc-robokassa-method.php:1063
     397msgid "Transfer on credit"
     398msgstr "Передача в кредит"
     399
     400#: includes/class-wc-robokassa-method.php:1064
     401msgid "Credit payment"
     402msgstr "Платеж по кредиту"
     403
     404#: includes/class-wc-robokassa-method.php:1070
     405msgid "Sign of the subject of calculation"
     406msgstr "Признак предмета расчета"
     407
     408#: includes/class-wc-robokassa-method.php:1077
     409msgid "Product"
     410msgstr "Товар"
     411
     412#: includes/class-wc-robokassa-method.php:1078
     413msgid "Excisable goods"
     414msgstr "Подакцизные товары"
     415
     416#: includes/class-wc-robokassa-method.php:1079
     417msgid "Work"
     418msgstr "Работа"
     419
     420#: includes/class-wc-robokassa-method.php:1080
     421msgid "Service"
     422msgstr "Услуга"
     423
     424#: includes/class-wc-robokassa-method.php:1081
     425msgid "Gambling rate"
     426msgstr "Ставка на азартные игры"
     427
     428#: includes/class-wc-robokassa-method.php:1082
     429msgid "Gambling win"
     430msgstr "Выигрыш в азартных играх"
     431
     432#: includes/class-wc-robokassa-method.php:1083
     433msgid "Lottery ticket"
     434msgstr "Лотерейный билет"
     435
     436#: includes/class-wc-robokassa-method.php:1084
     437msgid "Winning the lottery"
     438msgstr "Выигрыш в лотерею"
     439
     440#: includes/class-wc-robokassa-method.php:1085
     441msgid "Results of intellectual activity"
     442msgstr "Результаты интеллектуальной деятельности"
     443
     444#: includes/class-wc-robokassa-method.php:1086
     445msgid "Payment"
     446msgstr "Платеж"
     447
     448#: includes/class-wc-robokassa-method.php:1087
     449msgid "Agency fee"
     450msgstr "Агентское вознаграждение"
     451
     452#: includes/class-wc-robokassa-method.php:1088
     453msgid "Compound subject of calculation"
     454msgstr "Соединение при подсчете"
     455
     456#: includes/class-wc-robokassa-method.php:1089
     457msgid "Another object of the calculation"
     458msgstr "Иной предмет расчета"
     459
     460#: includes/class-wc-robokassa-method.php:1090
     461msgid "Property right"
     462msgstr "Имущественное право собственности"
     463
     464#: includes/class-wc-robokassa-method.php:1091
     465msgid "Extraordinary income"
     466msgstr "Внереализационный доход"
     467
     468#: includes/class-wc-robokassa-method.php:1092
     469msgid "Insurance premium"
     470msgstr "Страховая премия"
     471
     472#: includes/class-wc-robokassa-method.php:1093
     473msgid "Sales tax"
     474msgstr "Налог с продаж"
     475
     476#: includes/class-wc-robokassa-method.php:1094
     477msgid "Resort fee"
     478msgstr "Курортный сбор"
     479
     480#: includes/class-wc-robokassa-method.php:1112
    479481msgid "Technical details"
    480482msgstr "Технические детали"
    481483
    482 #: includes/class-wc-robokassa-method.php:814
     484#: includes/class-wc-robokassa-method.php:1114
    483485msgid ""
    484486"Setting technical parameters. Used by technical specialists. Can leave it at "
     
    488490"Можете оставить все как есть."
    489491
    490 #: includes/class-wc-robokassa-method.php:819
     492#: includes/class-wc-robokassa-method.php:1119
    491493msgid "Enable logging?"
    492494msgstr "Включить логирование?"
    493495
    494 #: includes/class-wc-robokassa-method.php:821
     496#: includes/class-wc-robokassa-method.php:1121
    495497msgid ""
    496498"You can enable gateway logging, specify the level of error that you want to "
     
    504506"По умолчанию, уровень ошибок не должен быть меньше, чем ERROR."
    505507
    506 #: includes/class-wc-robokassa-method.php:887
     508#: includes/class-wc-robokassa-method.php:1187
    507509msgid "Return to payment gateways"
    508510msgstr "Вернутся к платежным шлюзам"
    509511
    510 #: includes/class-wc-robokassa-method.php:948
     512#: includes/class-wc-robokassa-method.php:1248
    511513msgid ""
    512514"TEST mode is active. Payment will not be charged. After checking, disable "
     
    516518"режим."
    517519
    518 #: includes/class-wc-robokassa-method.php:990
     520#: includes/class-wc-robokassa-method.php:1292
    519521msgid "The client started to pay."
    520522msgstr "Клиент начал оплату."
    521523
    522 #: includes/class-wc-robokassa-method.php:1073
     524#: includes/class-wc-robokassa-method.php:1376
    523525msgid "Order number: "
    524526msgstr "Номер заказа: "
    525527
    526 #: includes/class-wc-robokassa-method.php:1230
     528#: includes/class-wc-robokassa-method.php:1533
    527529msgid "Delivery"
    528530msgstr "Доставка"
    529531
    530 #: includes/class-wc-robokassa-method.php:1336
     532#: includes/class-wc-robokassa-method.php:1639
    531533msgid "Pay"
    532534msgstr "Оплатить"
    533535
    534 #: includes/class-wc-robokassa-method.php:1337
     536#: includes/class-wc-robokassa-method.php:1640
    535537msgid "Cancel & return to cart"
    536538msgstr "Отменить и вернутся в корзину"
    537539
    538 #: includes/class-wc-robokassa-method.php:1488
     540#: includes/class-wc-robokassa-method.php:1791
    539541msgid "Order not found."
    540542msgstr "Заказ не найден."
    541543
    542 #: includes/class-wc-robokassa-method.php:1500
     544#: includes/class-wc-robokassa-method.php:1805
    543545#, php-format
    544546msgid ""
     
    547549"Запрос от Робокассы принят. Сумма: %1$s Подпись: %2$s Удаленная подпись: %3$s"
    548550
    549 #: includes/class-wc-robokassa-method.php:1522
     551#: includes/class-wc-robokassa-method.php:1830
    550552#, php-format
    551553msgid "Validate hash error. Local: %1$s Remote: %2$s"
    552554msgstr "Ошибка валидации хеша. Локальный: %1$s Удаленный: %2$s"
    553555
    554 #: includes/class-wc-robokassa-method.php:1548
     556#: includes/class-wc-robokassa-method.php:1859
    555557msgid "Order successfully paid (TEST MODE)."
    556558msgstr "Счет успешно оплачен (ТЕСТОВЫЙ ПЛАТЕЖ)"
    557559
    558 #: includes/class-wc-robokassa-method.php:1563
     560#: includes/class-wc-robokassa-method.php:1877
    559561msgid "Order successfully paid."
    560562msgstr "Счет успешно оплачен."
    561563
    562 #: includes/class-wc-robokassa-method.php:1591
     564#: includes/class-wc-robokassa-method.php:1906
    563565msgid "Payment error, please pay other time."
    564566msgstr "Ошибка платежа, пожалуйста повторите попытку позже."
    565567
    566 #: includes/class-wc-robokassa-method.php:1601
     568#: includes/class-wc-robokassa-method.php:1918
    567569msgid "Client return to success page."
    568570msgstr "Клиент вернулся на страницу успешной оплаты."
    569571
    570 #: includes/class-wc-robokassa-method.php:1622
     572#: includes/class-wc-robokassa-method.php:1942
    571573msgid "The order has not been paid."
    572574msgstr "Счет не был оплачен."
    573575
    574 #: includes/class-wc-robokassa-method.php:1639
     576#: includes/class-wc-robokassa-method.php:1960
    575577msgid "Api request error. Action not found."
    576578msgstr "Ошибка запроса к API. Действие не найдено."
    577579
    578 #: includes/class-wc-robokassa.php:413
     580#: includes/class-wc-robokassa.php:417
    579581msgid "Buy Premium addon"
    580582msgstr "Купить премиум аддон"
    581583
    582 #: includes/class-wc-robokassa.php:428
     584#: includes/class-wc-robokassa.php:432
    583585msgid "Settings"
    584586msgstr "Настройки"
    585587
    586 #: includes/class-wc-robokassa.php:458
     588#: includes/class-wc-robokassa.php:462
    587589msgid ""
    588590"The plugin for accepting payments through ROBOKASSA for WooCommerce has been "
     
    592594"версии, требующей дополнительной настройки."
    593595
    594 #: includes/class-wc-robokassa.php:460
     596#: includes/class-wc-robokassa.php:464
    595597msgid "here"
    596598msgstr "сюда"
    597599
    598 #: includes/class-wc-robokassa.php:461
     600#: includes/class-wc-robokassa.php:465
    599601#, php-format
    600602msgid "Press %s (to go to payment gateway settings)."
    601 msgstr "Press %s (to go to payment gateway settings)."
    602 
    603 #: includes/class-wc-robokassa.php:566
     603msgstr "Нажмите %s (для перехода к настройкам платежного шлюза)."
     604
     605#: includes/class-wc-robokassa.php:570
    604606msgid "Useful information"
    605607msgstr "Полезная информация"
    606608
    607 #: includes/class-wc-robokassa.php:569 includes/class-wc-robokassa.php:591
     609#: includes/class-wc-robokassa.php:573 includes/class-wc-robokassa.php:595
    608610msgid "Official plugin page"
    609611msgstr "Официальная страница"
    610612
    611 #: includes/class-wc-robokassa.php:570
     613#: includes/class-wc-robokassa.php:574
    612614msgid "Related news: ROBOKASSA"
    613615msgstr "Новости по теме Робокасса"
    614616
    615 #: includes/class-wc-robokassa.php:571
     617#: includes/class-wc-robokassa.php:575
    616618msgid "Plugins for WooCommerce"
    617619msgstr "Плагины для WooCommerce"
    618620
    619 #: includes/class-wc-robokassa.php:572
     621#: includes/class-wc-robokassa.php:576
    620622msgid "Feedback to author"
    621623msgstr "Связь с автором"
    622624
    623 #: includes/class-wc-robokassa.php:584
     625#: includes/class-wc-robokassa.php:588
    624626msgid "Paid supplement"
    625627msgstr "Платное дополнение"
    626628
    627 #: includes/class-wc-robokassa.php:589
     629#: includes/class-wc-robokassa.php:593
    628630msgid "Even more opportunities to accept payments. Increase conversion."
    629631msgstr "Еще больше возможностей принимать платежи. Увеличьте конверсию."
  • wc-robokassa/trunk/languages/wc-robokassa.pot

    r2168628 r2200862  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: Robokassa - Payment gateway for WooCommerce\n"
    6 "POT-Creation-Date: 2019-10-05 08:53+0300\n"
     6"POT-Creation-Date: 2019-11-25 16:06+0300\n"
    77"PO-Revision-Date: 2016-01-10 16:41+0300\n"
    88"Last-Translator: Mofsy <ru.mofsy@yandex.ru>\n"
     
    2222
    2323#: includes/class-wc-robokassa-method.php:134
    24 #: includes/class-wc-robokassa-method.php:670
     24#: includes/class-wc-robokassa-method.php:970
    2525msgid "Robokassa"
    2626msgstr ""
     
    3030msgstr ""
    3131
    32 #: includes/class-wc-robokassa-method.php:459
     32#: includes/class-wc-robokassa-method.php:759
    3333msgid "Main settings"
    3434msgstr ""
    3535
    36 #: includes/class-wc-robokassa-method.php:461
     36#: includes/class-wc-robokassa-method.php:761
    3737msgid "Work is impossible without these settings."
    3838msgstr ""
    3939
    40 #: includes/class-wc-robokassa-method.php:466
     40#: includes/class-wc-robokassa-method.php:766
    4141msgid "Online / Offline gateway"
    4242msgstr ""
    4343
    44 #: includes/class-wc-robokassa-method.php:468
     44#: includes/class-wc-robokassa-method.php:768
    4545msgid "Enable display of the payment gateway on the website"
    4646msgstr ""
    4747
    48 #: includes/class-wc-robokassa-method.php:475
     48#: includes/class-wc-robokassa-method.php:775
    4949msgid "Shop identifier"
    5050msgstr ""
    5151
    52 #: includes/class-wc-robokassa-method.php:477
     52#: includes/class-wc-robokassa-method.php:777
    5353msgid "Unique identification for shop from Robokassa."
    5454msgstr ""
    5555
    56 #: includes/class-wc-robokassa-method.php:483
    57 #: includes/class-wc-robokassa-method.php:581
     56#: includes/class-wc-robokassa-method.php:783
     57#: includes/class-wc-robokassa-method.php:881
    5858msgid "Hash calculation algorithm"
    5959msgstr ""
    6060
    61 #: includes/class-wc-robokassa-method.php:484
    62 #: includes/class-wc-robokassa-method.php:582
     61#: includes/class-wc-robokassa-method.php:784
     62#: includes/class-wc-robokassa-method.php:882
    6363msgid ""
    6464"The algorithm must match the one specified in the personal account of "
     
    6666msgstr ""
    6767
    68 #: includes/class-wc-robokassa-method.php:500
    69 #: includes/class-wc-robokassa-method.php:598
     68#: includes/class-wc-robokassa-method.php:800
     69#: includes/class-wc-robokassa-method.php:898
    7070msgid "Password #1"
    7171msgstr ""
    7272
    73 #: includes/class-wc-robokassa-method.php:502
     73#: includes/class-wc-robokassa-method.php:802
    7474msgid ""
    7575"Please write Shop pass 1. The pass must match the one specified in the "
     
    7777msgstr ""
    7878
    79 #: includes/class-wc-robokassa-method.php:508
    80 #: includes/class-wc-robokassa-method.php:606
     79#: includes/class-wc-robokassa-method.php:808
     80#: includes/class-wc-robokassa-method.php:906
    8181msgid "Password #2"
    8282msgstr ""
    8383
    84 #: includes/class-wc-robokassa-method.php:510
     84#: includes/class-wc-robokassa-method.php:810
    8585msgid ""
    8686"Please write Shop pass 2. The pass must match the one specified in the "
     
    8888msgstr ""
    8989
    90 #: includes/class-wc-robokassa-method.php:514
     90#: includes/class-wc-robokassa-method.php:814
    9191msgid ""
    9292"Address to notify the site of the results of operations in the background. "
     
    9595msgstr ""
    9696
    97 #: includes/class-wc-robokassa-method.php:518
     97#: includes/class-wc-robokassa-method.php:818
    9898msgid "Result Url"
    9999msgstr ""
    100100
    101 #: includes/class-wc-robokassa-method.php:525
     101#: includes/class-wc-robokassa-method.php:825
    102102msgid ""
    103103"The address for the user to go to the site after successful payment. Copy "
     
    107107msgstr ""
    108108
    109 #: includes/class-wc-robokassa-method.php:529
     109#: includes/class-wc-robokassa-method.php:829
    110110msgid "Success Url"
    111111msgstr ""
    112112
    113 #: includes/class-wc-robokassa-method.php:536
     113#: includes/class-wc-robokassa-method.php:836
    114114msgid ""
    115115"The address for the user to go to the site, after payment with an error. "
     
    119119msgstr ""
    120120
    121 #: includes/class-wc-robokassa-method.php:540
     121#: includes/class-wc-robokassa-method.php:840
    122122msgid "Fail Url"
    123123msgstr ""
    124124
    125 #: includes/class-wc-robokassa-method.php:561
     125#: includes/class-wc-robokassa-method.php:861
    126126msgid "Parameters of the test fees"
    127127msgstr ""
    128128
    129 #: includes/class-wc-robokassa-method.php:563
     129#: includes/class-wc-robokassa-method.php:863
    130130msgid ""
    131131"Set up test payments. Passwords and counting method signature for test "
     
    133133msgstr ""
    134134
    135 #: includes/class-wc-robokassa-method.php:568
     135#: includes/class-wc-robokassa-method.php:868
    136136msgid "Test mode"
    137137msgstr ""
    138138
    139 #: includes/class-wc-robokassa-method.php:570
     139#: includes/class-wc-robokassa-method.php:870
    140140msgid "Activate testing mode for admins."
    141141msgstr ""
    142142
    143 #: includes/class-wc-robokassa-method.php:574
    144 #: includes/class-wc-robokassa-method.php:825
     143#: includes/class-wc-robokassa-method.php:874
     144#: includes/class-wc-robokassa-method.php:1125
    145145msgid "Off"
    146146msgstr ""
    147147
    148 #: includes/class-wc-robokassa-method.php:575
     148#: includes/class-wc-robokassa-method.php:875
    149149msgid "On"
    150150msgstr ""
    151151
    152 #: includes/class-wc-robokassa-method.php:600
     152#: includes/class-wc-robokassa-method.php:900
    153153msgid ""
    154154"Please write Shop pass 1 for testing payments. The pass must match the one "
     
    156156msgstr ""
    157157
    158 #: includes/class-wc-robokassa-method.php:608
     158#: includes/class-wc-robokassa-method.php:908
    159159msgid ""
    160160"Please write Shop pass 2 for testing payments. The pass must match the one "
     
    162162msgstr ""
    163163
    164 #: includes/class-wc-robokassa-method.php:626
     164#: includes/class-wc-robokassa-method.php:926
    165165msgid "Interface"
    166166msgstr ""
    167167
    168 #: includes/class-wc-robokassa-method.php:628
     168#: includes/class-wc-robokassa-method.php:928
    169169msgid "Customize the appearance. Can leave it at that."
    170170msgstr ""
    171171
    172 #: includes/class-wc-robokassa-method.php:633
     172#: includes/class-wc-robokassa-method.php:933
    173173msgid "Show gateway icon?"
    174174msgstr ""
    175175
    176 #: includes/class-wc-robokassa-method.php:635
     176#: includes/class-wc-robokassa-method.php:935
    177177msgid "Show"
    178178msgstr ""
    179179
    180 #: includes/class-wc-robokassa-method.php:641
     180#: includes/class-wc-robokassa-method.php:941
    181181msgid "Language interface"
    182182msgstr ""
    183183
    184 #: includes/class-wc-robokassa-method.php:645
     184#: includes/class-wc-robokassa-method.php:945
    185185msgid "Russian"
    186186msgstr ""
    187187
    188 #: includes/class-wc-robokassa-method.php:646
     188#: includes/class-wc-robokassa-method.php:946
    189189msgid "English"
    190190msgstr ""
    191191
    192 #: includes/class-wc-robokassa-method.php:648
     192#: includes/class-wc-robokassa-method.php:948
    193193msgid "What language interface displayed for the customer on Robokassa?"
    194194msgstr ""
    195195
    196 #: includes/class-wc-robokassa-method.php:654
     196#: includes/class-wc-robokassa-method.php:954
    197197msgid "Language based on the locale?"
    198198msgstr ""
    199199
    200 #: includes/class-wc-robokassa-method.php:658
     200#: includes/class-wc-robokassa-method.php:958
    201201msgid "Yes"
    202202msgstr ""
    203203
    204 #: includes/class-wc-robokassa-method.php:659
     204#: includes/class-wc-robokassa-method.php:959
    205205msgid "No"
    206206msgstr ""
    207207
    208 #: includes/class-wc-robokassa-method.php:661
     208#: includes/class-wc-robokassa-method.php:961
    209209msgid "Trying to get the language based on the locale?"
    210210msgstr ""
    211211
    212 #: includes/class-wc-robokassa-method.php:667
     212#: includes/class-wc-robokassa-method.php:967
    213213msgid "Title"
    214214msgstr ""
    215215
    216 #: includes/class-wc-robokassa-method.php:669
     216#: includes/class-wc-robokassa-method.php:969
    217217msgid "This is the name that the user sees during the payment."
    218218msgstr ""
    219219
    220 #: includes/class-wc-robokassa-method.php:675
     220#: includes/class-wc-robokassa-method.php:975
    221221msgid "Order button text"
    222222msgstr ""
    223223
    224 #: includes/class-wc-robokassa-method.php:677
     224#: includes/class-wc-robokassa-method.php:977
    225225msgid "This is the button text that the user sees during the payment."
    226226msgstr ""
    227227
    228 #: includes/class-wc-robokassa-method.php:678
     228#: includes/class-wc-robokassa-method.php:978
    229229msgid "Goto pay"
    230230msgstr ""
    231231
    232 #: includes/class-wc-robokassa-method.php:683
     232#: includes/class-wc-robokassa-method.php:983
    233233msgid "Description"
    234234msgstr ""
    235235
    236 #: includes/class-wc-robokassa-method.php:685
     236#: includes/class-wc-robokassa-method.php:985
    237237msgid ""
    238238"Description of the method of payment that the customer will see on our "
     
    240240msgstr ""
    241241
    242 #: includes/class-wc-robokassa-method.php:686
     242#: includes/class-wc-robokassa-method.php:986
    243243msgid "Payment via Robokassa."
    244244msgstr ""
    245245
    246 #: includes/class-wc-robokassa-method.php:703
     246#: includes/class-wc-robokassa-method.php:1003
    247247msgid "Cart content sending (54fz)"
    248248msgstr ""
    249249
    250 #: includes/class-wc-robokassa-method.php:705
     250#: includes/class-wc-robokassa-method.php:1005
    251251msgid ""
    252252"These settings are required only for legal entities in the absence of its "
     
    254254msgstr ""
    255255
    256 #: includes/class-wc-robokassa-method.php:710
     256#: includes/class-wc-robokassa-method.php:1010
    257257msgid "The transfer of goods"
    258258msgstr ""
    259259
    260 #: includes/class-wc-robokassa-method.php:712
     260#: includes/class-wc-robokassa-method.php:1012
    261261msgid "Enable"
    262262msgstr ""
    263263
    264 #: includes/class-wc-robokassa-method.php:713
     264#: includes/class-wc-robokassa-method.php:1013
    265265msgid ""
    266266"When you select the option, a check will be generated and sent to the tax "
     
    271271msgstr ""
    272272
    273 #: includes/class-wc-robokassa-method.php:719
     273#: includes/class-wc-robokassa-method.php:1019
    274274msgid "Taxation system"
    275275msgstr ""
    276276
    277 #: includes/class-wc-robokassa-method.php:724
     277#: includes/class-wc-robokassa-method.php:1024
    278278msgid "General"
    279279msgstr ""
    280280
    281 #: includes/class-wc-robokassa-method.php:725
     281#: includes/class-wc-robokassa-method.php:1025
    282282msgid "Simplified, income"
    283283msgstr ""
    284284
    285 #: includes/class-wc-robokassa-method.php:726
     285#: includes/class-wc-robokassa-method.php:1026
    286286msgid "Simplified, income minus consumption"
    287287msgstr ""
    288288
    289 #: includes/class-wc-robokassa-method.php:727
     289#: includes/class-wc-robokassa-method.php:1027
    290290msgid "Single tax on imputed income"
    291291msgstr ""
    292292
    293 #: includes/class-wc-robokassa-method.php:728
     293#: includes/class-wc-robokassa-method.php:1028
    294294msgid "Single agricultural tax"
    295295msgstr ""
    296296
    297 #: includes/class-wc-robokassa-method.php:729
     297#: includes/class-wc-robokassa-method.php:1029
    298298msgid "Patent system of taxation"
    299299msgstr ""
    300300
    301 #: includes/class-wc-robokassa-method.php:735
     301#: includes/class-wc-robokassa-method.php:1035
    302302msgid "Default VAT rate"
    303303msgstr ""
    304304
    305 #: includes/class-wc-robokassa-method.php:740
     305#: includes/class-wc-robokassa-method.php:1040
    306306msgid "Without the vat"
    307307msgstr ""
    308308
    309 #: includes/class-wc-robokassa-method.php:741
     309#: includes/class-wc-robokassa-method.php:1041
    310310msgid "VAT 0%"
    311311msgstr ""
    312312
    313 #: includes/class-wc-robokassa-method.php:742
     313#: includes/class-wc-robokassa-method.php:1042
    314314msgid "VAT 10%"
    315315msgstr ""
    316316
    317 #: includes/class-wc-robokassa-method.php:743
     317#: includes/class-wc-robokassa-method.php:1043
    318318msgid "VAT 20%"
    319319msgstr ""
    320320
    321 #: includes/class-wc-robokassa-method.php:744
     321#: includes/class-wc-robokassa-method.php:1044
    322322msgid "VAT receipt settlement rate 10/110"
    323323msgstr ""
    324324
    325 #: includes/class-wc-robokassa-method.php:745
     325#: includes/class-wc-robokassa-method.php:1045
    326326msgid "VAT receipt settlement rate 20/120"
    327327msgstr ""
    328328
    329 #: includes/class-wc-robokassa-method.php:751
    330 msgid "Признак способа расчёта"
    331 msgstr ""
    332 
    333 #: includes/class-wc-robokassa-method.php:752
    334 #: includes/class-wc-robokassa-method.php:771
    335 msgid ""
    336 "Этот параметр необязательный. Если этот параметр не настроен, то в чеке "
    337 "будет указано значение параметра по умолчанию из Личного кабинета."
    338 msgstr ""
    339 
    340 #: includes/class-wc-robokassa-method.php:757
    341 #: includes/class-wc-robokassa-method.php:776
     329#: includes/class-wc-robokassa-method.php:1051
     330msgid "Indication of the calculation method"
     331msgstr ""
     332
     333#: includes/class-wc-robokassa-method.php:1052
     334#: includes/class-wc-robokassa-method.php:1071
     335msgid ""
     336"The parameter is optional. If this parameter is not configured, the check "
     337"will indicate the default value of the parameter from the Personal account."
     338msgstr ""
     339
     340#: includes/class-wc-robokassa-method.php:1057
     341#: includes/class-wc-robokassa-method.php:1076
    342342msgid "Default in Robokassa"
    343343msgstr ""
    344344
    345 #: includes/class-wc-robokassa-method.php:758
    346 msgid "Предоплата 100%"
    347 msgstr ""
    348 
    349 #: includes/class-wc-robokassa-method.php:759
    350 msgid "Частичная предоплата"
    351 msgstr ""
    352 
    353 #: includes/class-wc-robokassa-method.php:760
    354 msgid "Аванс"
    355 msgstr ""
    356 
    357 #: includes/class-wc-robokassa-method.php:761
    358 msgid "Полный расчет"
    359 msgstr ""
    360 
    361 #: includes/class-wc-robokassa-method.php:762
    362 msgid "Частичный расчёт и кредит"
    363 msgstr ""
    364 
    365 #: includes/class-wc-robokassa-method.php:763
    366 msgid "Передача в кредит"
    367 msgstr ""
    368 
    369 #: includes/class-wc-robokassa-method.php:764
    370 msgid "Оплата кредита"
    371 msgstr ""
    372 
    373 #: includes/class-wc-robokassa-method.php:770
    374 msgid "Признак предмета расчёта"
    375 msgstr ""
    376 
    377 #: includes/class-wc-robokassa-method.php:777
    378 msgid "Товар"
    379 msgstr ""
    380 
    381 #: includes/class-wc-robokassa-method.php:778
    382 msgid "Подакцизный товар"
    383 msgstr ""
    384 
    385 #: includes/class-wc-robokassa-method.php:779
    386 msgid "Работа"
    387 msgstr ""
    388 
    389 #: includes/class-wc-robokassa-method.php:780
    390 msgid "Услуга"
    391 msgstr ""
    392 
    393 #: includes/class-wc-robokassa-method.php:781
    394 msgid "Ставка азартной игры"
    395 msgstr ""
    396 
    397 #: includes/class-wc-robokassa-method.php:782
    398 msgid "Выигрыш азартной игры"
    399 msgstr ""
    400 
    401 #: includes/class-wc-robokassa-method.php:783
    402 msgid "Лотерейный билет"
    403 msgstr ""
    404 
    405 #: includes/class-wc-robokassa-method.php:784
    406 msgid "Выигрыш лотереи"
    407 msgstr ""
    408 
    409 #: includes/class-wc-robokassa-method.php:785
    410 msgid "Результаты интеллектуальной деятельности"
    411 msgstr ""
    412 
    413 #: includes/class-wc-robokassa-method.php:786
    414 msgid "Платеж"
    415 msgstr ""
    416 
    417 #: includes/class-wc-robokassa-method.php:787
    418 msgid "Агентское вознаграждение"
    419 msgstr ""
    420 
    421 #: includes/class-wc-robokassa-method.php:788
    422 msgid "Составной предмет расчета"
    423 msgstr ""
    424 
    425 #: includes/class-wc-robokassa-method.php:789
    426 msgid "Иной предмет расчета"
    427 msgstr ""
    428 
    429 #: includes/class-wc-robokassa-method.php:790
    430 msgid "Имущественное право"
    431 msgstr ""
    432 
    433 #: includes/class-wc-robokassa-method.php:791
    434 msgid "Внереализационный доход"
    435 msgstr ""
    436 
    437 #: includes/class-wc-robokassa-method.php:792
    438 msgid "Страховые взносы"
    439 msgstr ""
    440 
    441 #: includes/class-wc-robokassa-method.php:793
    442 msgid "Торговый сбор"
    443 msgstr ""
    444 
    445 #: includes/class-wc-robokassa-method.php:794
    446 msgid "Курортный сбор"
    447 msgstr ""
    448 
    449 #: includes/class-wc-robokassa-method.php:812
     345#: includes/class-wc-robokassa-method.php:1058
     346msgid "Prepayment 100%"
     347msgstr ""
     348
     349#: includes/class-wc-robokassa-method.php:1059
     350msgid "Partial prepayment"
     351msgstr ""
     352
     353#: includes/class-wc-robokassa-method.php:1060
     354msgid "Advance"
     355msgstr ""
     356
     357#: includes/class-wc-robokassa-method.php:1061
     358msgid "Full settlement"
     359msgstr ""
     360
     361#: includes/class-wc-robokassa-method.php:1062
     362msgid "Partial settlement and credit"
     363msgstr ""
     364
     365#: includes/class-wc-robokassa-method.php:1063
     366msgid "Transfer on credit"
     367msgstr ""
     368
     369#: includes/class-wc-robokassa-method.php:1064
     370msgid "Credit payment"
     371msgstr ""
     372
     373#: includes/class-wc-robokassa-method.php:1070
     374msgid "Sign of the subject of calculation"
     375msgstr ""
     376
     377#: includes/class-wc-robokassa-method.php:1077
     378msgid "Product"
     379msgstr ""
     380
     381#: includes/class-wc-robokassa-method.php:1078
     382msgid "Excisable goods"
     383msgstr ""
     384
     385#: includes/class-wc-robokassa-method.php:1079
     386msgid "Work"
     387msgstr ""
     388
     389#: includes/class-wc-robokassa-method.php:1080
     390msgid "Service"
     391msgstr ""
     392
     393#: includes/class-wc-robokassa-method.php:1081
     394msgid "Gambling rate"
     395msgstr ""
     396
     397#: includes/class-wc-robokassa-method.php:1082
     398msgid "Gambling win"
     399msgstr ""
     400
     401#: includes/class-wc-robokassa-method.php:1083
     402msgid "Lottery ticket"
     403msgstr ""
     404
     405#: includes/class-wc-robokassa-method.php:1084
     406msgid "Winning the lottery"
     407msgstr ""
     408
     409#: includes/class-wc-robokassa-method.php:1085
     410msgid "Results of intellectual activity"
     411msgstr ""
     412
     413#: includes/class-wc-robokassa-method.php:1086
     414msgid "Payment"
     415msgstr ""
     416
     417#: includes/class-wc-robokassa-method.php:1087
     418msgid "Agency fee"
     419msgstr ""
     420
     421#: includes/class-wc-robokassa-method.php:1088
     422msgid "Compound subject of calculation"
     423msgstr ""
     424
     425#: includes/class-wc-robokassa-method.php:1089
     426msgid "Another object of the calculation"
     427msgstr ""
     428
     429#: includes/class-wc-robokassa-method.php:1090
     430msgid "Property right"
     431msgstr ""
     432
     433#: includes/class-wc-robokassa-method.php:1091
     434msgid "Extraordinary income"
     435msgstr ""
     436
     437#: includes/class-wc-robokassa-method.php:1092
     438msgid "Insurance premium"
     439msgstr ""
     440
     441#: includes/class-wc-robokassa-method.php:1093
     442msgid "Sales tax"
     443msgstr ""
     444
     445#: includes/class-wc-robokassa-method.php:1094
     446msgid "Resort fee"
     447msgstr ""
     448
     449#: includes/class-wc-robokassa-method.php:1112
    450450msgid "Technical details"
    451451msgstr ""
    452452
    453 #: includes/class-wc-robokassa-method.php:814
     453#: includes/class-wc-robokassa-method.php:1114
    454454msgid ""
    455455"Setting technical parameters. Used by technical specialists. Can leave it "
     
    457457msgstr ""
    458458
    459 #: includes/class-wc-robokassa-method.php:819
     459#: includes/class-wc-robokassa-method.php:1119
    460460msgid "Enable logging?"
    461461msgstr ""
    462462
    463 #: includes/class-wc-robokassa-method.php:821
     463#: includes/class-wc-robokassa-method.php:1121
    464464msgid ""
    465465"You can enable gateway logging, specify the level of error that you want "
     
    469469msgstr ""
    470470
    471 #: includes/class-wc-robokassa-method.php:887
     471#: includes/class-wc-robokassa-method.php:1187
    472472msgid "Return to payment gateways"
    473473msgstr ""
    474474
    475 #: includes/class-wc-robokassa-method.php:948
     475#: includes/class-wc-robokassa-method.php:1248
    476476msgid ""
    477477"TEST mode is active. Payment will not be charged. After checking, disable "
     
    479479msgstr ""
    480480
    481 #: includes/class-wc-robokassa-method.php:990
     481#: includes/class-wc-robokassa-method.php:1292
    482482msgid "The client started to pay."
    483483msgstr ""
    484484
    485 #: includes/class-wc-robokassa-method.php:1073
     485#: includes/class-wc-robokassa-method.php:1376
    486486msgid "Order number: "
    487487msgstr ""
    488488
    489 #: includes/class-wc-robokassa-method.php:1230
     489#: includes/class-wc-robokassa-method.php:1533
    490490msgid "Delivery"
    491491msgstr ""
    492492
    493 #: includes/class-wc-robokassa-method.php:1336
     493#: includes/class-wc-robokassa-method.php:1639
    494494msgid "Pay"
    495495msgstr ""
    496496
    497 #: includes/class-wc-robokassa-method.php:1337
     497#: includes/class-wc-robokassa-method.php:1640
    498498msgid "Cancel & return to cart"
    499499msgstr ""
    500500
    501 #: includes/class-wc-robokassa-method.php:1488
     501#: includes/class-wc-robokassa-method.php:1791
    502502msgid "Order not found."
    503503msgstr ""
    504504
    505 #: includes/class-wc-robokassa-method.php:1500
     505#: includes/class-wc-robokassa-method.php:1805
    506506#, php-format
    507507msgid ""
     
    509509msgstr ""
    510510
    511 #: includes/class-wc-robokassa-method.php:1522
     511#: includes/class-wc-robokassa-method.php:1830
    512512#, php-format
    513513msgid "Validate hash error. Local: %1$s Remote: %2$s"
    514514msgstr ""
    515515
    516 #: includes/class-wc-robokassa-method.php:1548
     516#: includes/class-wc-robokassa-method.php:1859
    517517msgid "Order successfully paid (TEST MODE)."
    518518msgstr ""
    519519
    520 #: includes/class-wc-robokassa-method.php:1563
     520#: includes/class-wc-robokassa-method.php:1877
    521521msgid "Order successfully paid."
    522522msgstr ""
    523523
    524 #: includes/class-wc-robokassa-method.php:1591
     524#: includes/class-wc-robokassa-method.php:1906
    525525msgid "Payment error, please pay other time."
    526526msgstr ""
    527527
    528 #: includes/class-wc-robokassa-method.php:1601
     528#: includes/class-wc-robokassa-method.php:1918
    529529msgid "Client return to success page."
    530530msgstr ""
    531531
    532 #: includes/class-wc-robokassa-method.php:1622
     532#: includes/class-wc-robokassa-method.php:1942
    533533msgid "The order has not been paid."
    534534msgstr ""
    535535
    536 #: includes/class-wc-robokassa-method.php:1639
     536#: includes/class-wc-robokassa-method.php:1960
    537537msgid "Api request error. Action not found."
    538538msgstr ""
    539539
    540 #: includes/class-wc-robokassa.php:413
     540#: includes/class-wc-robokassa.php:417
    541541msgid "Buy Premium addon"
    542542msgstr ""
    543543
    544 #: includes/class-wc-robokassa.php:428
     544#: includes/class-wc-robokassa.php:432
    545545msgid "Settings"
    546546msgstr ""
    547547
    548 #: includes/class-wc-robokassa.php:458
     548#: includes/class-wc-robokassa.php:462
    549549msgid ""
    550550"The plugin for accepting payments through ROBOKASSA for WooCommerce has "
     
    552552msgstr ""
    553553
    554 #: includes/class-wc-robokassa.php:460
     554#: includes/class-wc-robokassa.php:464
    555555msgid "here"
    556556msgstr ""
    557557
    558 #: includes/class-wc-robokassa.php:461
     558#: includes/class-wc-robokassa.php:465
    559559#, php-format
    560560msgid "Press %s (to go to payment gateway settings)."
    561561msgstr ""
    562562
    563 #: includes/class-wc-robokassa.php:566
     563#: includes/class-wc-robokassa.php:570
    564564msgid "Useful information"
    565565msgstr ""
    566566
    567 #: includes/class-wc-robokassa.php:569 includes/class-wc-robokassa.php:591
     567#: includes/class-wc-robokassa.php:573 includes/class-wc-robokassa.php:595
    568568msgid "Official plugin page"
    569569msgstr ""
    570570
    571 #: includes/class-wc-robokassa.php:570
     571#: includes/class-wc-robokassa.php:574
    572572msgid "Related news: ROBOKASSA"
    573573msgstr ""
    574574
    575 #: includes/class-wc-robokassa.php:571
     575#: includes/class-wc-robokassa.php:575
    576576msgid "Plugins for WooCommerce"
    577577msgstr ""
    578578
    579 #: includes/class-wc-robokassa.php:572
     579#: includes/class-wc-robokassa.php:576
    580580msgid "Feedback to author"
    581581msgstr ""
    582582
    583 #: includes/class-wc-robokassa.php:584
     583#: includes/class-wc-robokassa.php:588
    584584msgid "Paid supplement"
    585585msgstr ""
    586586
    587 #: includes/class-wc-robokassa.php:589
     587#: includes/class-wc-robokassa.php:593
    588588msgid "Even more opportunities to accept payments. Increase conversion."
    589589msgstr ""
  • wc-robokassa/trunk/readme.txt

    r2188746 r2200862  
    4242* Russian - always included
    4343
    44 *Note:* All my plugins are localized/ translateable by default. This is very important for all users worldwide.
    45 So please contribute your language to the plugin to make it even more useful. For translating I recommend the awesome for validating the ["Poedit Editor"](http://www.poedit.net/).
    46 
    4744== Installation ==
    48451. Archive extract and upload "wc-robokassa" to /wp-content/plugins
     
    5148
    5249== Changelog ==
     50
     51= 2.2.0.1 =
     52* API: simplexml, dom
     53* Fix: language files
     54* More fix
    5355
    5456= 2.0.1.2 =
  • wc-robokassa/trunk/wc-robokassa.php

    r2188746 r2200862  
    44    Plugin URI: https://mofsy.ru/projects/wc-robokassa
    55    Description: Allows you to use Robokassa with the WooCommerce as payment gateway plugin.
    6     Version: 2.0.1.2
     6    Version: 2.2.0.1
    77    WC requires at least: 3.0
    88    WC tested up to: 3.8
Note: See TracChangeset for help on using the changeset viewer.