Plugin Directory

Changeset 2932350


Ignore:
Timestamp:
06/29/2023 03:21:48 PM (3 years ago)
Author:
sprinque
Message:

v.1.3.6

Location:
sprinque
Files:
38 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sprinque/tags/1.3.6/assets/js/frontend.js

    r2920051 r2932350  
    826826                error: function (response) {
    827827                    if( response.status === 403 ) {
    828                         const currentErrorClass = 'message' in response.responseJSON ? response.responseJSON.message : '';
     828
     829                        let language = document.documentElement.lang;
     830                        language = language.replace('_', '-');
     831                        language = language.split('-');
     832                        language = language.shift();
     833
     834                        const $currentError = 'message' in response.responseJSON ? response.responseJSON.message : '';
    829835                        const $newBusinessContainer = $('.search_already_added_company');
    830836                        const $errorsContainer = $('.verifying_your_account');
    831837                        const $spinner = $errorsContainer.find('.wpm-loader');
    832838                        const $errorsList = $errorsContainer.find('.cant-complete-autorization');
    833                         const $errors = $errorsContainer.find('.verify-error-explanation');
    834                         const $currentError = $errorsList.find(currentErrorClass);
     839                        const $errorMessageElement = $errorsContainer.find('.verify-error');
     840                        const errorMessage = Sprinque.getTranslatedApiError(language, $currentError);
    835841
    836842                        if($currentError.length) {
    837843                            $newBusinessContainer.hide();
    838                             $errors.hide();
    839844                            $spinner.hide();
    840845                            $errorsList.show();
    841                             $currentError.show();
    842846                            $errorsContainer.show();
     847                            $errorMessageElement.show().html(errorMessage);
    843848                        }
    844849                    }
     
    985990                            }, 1000);
    986991                        } else {
    987                             var modal_class = 'modal-middle';
    988 
    989992                            showTab('.verifying_your_account');
    990993                            $('.cant-complete-autorization').show();
     
    993996                            $('.verify-error-explanation, .verify-error').hide();
    994997
    995                             if(response.result.error_code === 'auth-credit-exceeded') {
    996                                 $('.verify-credit-exceeded').show();
    997                             } else if (response.result.error_code === 'auth-credit-rejected') {
    998                                 $('.auth-credit-rejected-error').show();
    999                             } else if (response.result.error_code === 'auth-amount-exceeded') {
    1000                                 $('.auth-amount-more-then-default-error').show();
    1001                             } else if (response.result.error_code === 'auth-credit-not-found') {
    1002                                 $('.auth-credit-not-found-error').show();
    1003                             } else if (response.result.error_code === 'auth-buyer-inactive') {
    1004                                 $('.auth-buyer-inactive-error').show();
    1005                             } else if (response.result.error_code === 'auth-buyer-blocked') {
    1006                                 $('.auth-buyer-blocked-error').show();
    1007                             } else if (response.result.error_code === 'auth-buyer-not-found') {
    1008                                 $('.auth-buyer-not-found-error').show();
     998                            const is_error_by_code = typeof response.result.error_code !== "undefined" && response.result.error_code.length > 0;
     999
     1000                            let language = document.documentElement.lang;
     1001                            language = language.replace('_', '-');
     1002                            language = language.split('-');
     1003                            language = language.shift();
     1004
     1005                            const modal_class = is_error_by_code ? 'modal-middle' : '';
     1006                            if (is_error_by_code) {
     1007                                const errors = [];
     1008                                for (let key in response.result.errors) {
     1009                                    errors.push(Sprinque.getTranslatedApiError(language, key));
     1010                                }
     1011                                message = errors.join("<br>");
    10091012                            } else {
    1010                                 $('.verify-error').show()
    1011                                     .html(response.message);
    1012                                 modal_class = '';
     1013                                message = response.message;
    10131014                            }
     1015
     1016                            $('.verify-error').show().html(message);
    10141017
    10151018                            if (modal_class.length > 0) {
  • sprinque/tags/1.3.6/include/payment_method.php

    r2919712 r2932350  
    232232         */
    233233        public function sprinque_register_buyer_api() {
    234             if ( ! session_id() ) {
    235                 session_cache_limiter('public');
    236                 session_start();
    237             }
     234               
    238235            if (! isset( $_POST['business_name'] ) ) {
    239236                return false;
     237            }
     238
     239            // Dont start a sessions unless we are going to do things with the business name.
     240            if ( ! session_id() ) {
     241                session_start();
    240242            }
    241243
     
    365367                // See the error classes /templates/frontend/srinque_pay_modal_form.php:109
    366368                $error = [
    367                     'REJECTED' => '.auth-credit-rejected-error',
    368                     'BLOCKED' => '.auth-buyer-blocked-error',
    369                     'INACTIVE' => '.auth-buyer-inactive-error',
     369                    'REJECTED' => 'AuthCreditRejectedError',
     370                    'BLOCKED' => 'AuthBuyerBlockedError',
     371                    'INACTIVE' => 'AuthBuyerInactiveError',
    370372                ];
    371373
     
    383385        public function sprinque_authorize_company_order() {
    384386            if ( ! session_id() ) {
    385                 session_cache_limiter('public');
    386387                session_start();
    387388            }
     
    396397                $buyer_id = sanitize_text_field($_SESSION['buyer_id']);
    397398            }
     399
     400            $buyer = $this->srinque_api( [], 'GET', "/buyers/{$buyer_id}" );
    398401
    399402            // Get the user's IP address
     
    416419                'metadata' => [
    417420                    'IPv4' => !strpos($ip, ':') !== false ? $ip : '',
    418                     'IPv6' => strpos($ip, ':') !== false ? $ip : ''
     421                    'IPv6' => strpos($ip, ':') !== false ? $ip : '',
     422                    'business_name' => $buyer['business_name']
    419423                ]
    420424            ];
     
    486490        {
    487491            if ( ! session_id() ) {
    488                 session_cache_limiter('public');
    489492                session_start();
    490493            }
     
    518521        {
    519522            if ( ! session_id() ) {
    520                 session_cache_limiter('public');
    521523                session_start();
    522524            }
     
    573575        public function sprinque_get_buyer_info() {
    574576            if ( ! session_id() ) {
    575                 session_cache_limiter('public');
    576577                session_start();
    577578            }
     
    756757        public function process_payment( $order_id ) {
    757758            if ( ! session_id() ) {
    758                 session_cache_limiter('public');
    759759                session_start();
    760760            }
  • sprinque/tags/1.3.6/languages/sprinque-de_DE.po

    r2919808 r2932350  
    5656msgstr "Überprüft"
    5757
    58 #, fuzzy
    5958msgid "Billing or Accounts Payable email"
    60 msgstr "E-Mail für Rechnungsstellung oder Kreditorenbuchhaltung"
     59msgstr "E-Mail für Rechnungsstellung oder Buchhaltung"
    6160
    6261#: templates/frontend/srinque_pay_modal_form.php:36
     
    163162#: sprinque.php:259
    164163#: sprinque.php:451
    165 #, fuzzy
    166164msgid "Net terms fee"
    167 msgstr "Netto-Laufzeitgebühr"
     165msgstr "Netto-Zahlungsziel Gebühr"
    168166
    169167#: templates/frontend/srinque_pay_modal_form.php:53
     
    256254#: templates/frontend/srinque_pay_modal_form.php:113
    257255msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "Die Genehmigung kann bis zu 24 Stunden dauern. Ihre Bestellung ist nicht bestätigt, bis eine Entscheidung getroffen ist. <br>Wir werden Sie per E-Mail benachrichtigen, sobald die Prüfung abgeschlossen ist."
     256msgstr "Die Genehmigung kann bis zu 24 Stunden dauern. Ihre Bestellung ist nicht bestätigt, bis eine Entscheidung getroffen ist. Wir werden Sie per E-Mail benachrichtigen, sobald die Prüfung abgeschlossen ist."
    259257
    260258#: include/payment_method.php:481
     
    264262#: templates/frontend/srinque_pay_modal_form.php:12
    265263msgid "To approve a payment term for you we need your company information to run a credit assessment"
    266 msgstr "Um Ihnen ein Zahlungsziel zu gewähren, benötigen wir Ihre Unternehmensdaten, um eine Bonitätsprüfung durchzuführen"
     264msgstr "Um Ihnen ein Zahlungsziel zu gewähren, benötigen wir Ihre Unternehmensdaten, um eine Bonitätsprüfung durchzuführen."
    267265
    268266#: templates/frontend/srinque_pay_modal_form.php:64
  • sprinque/tags/1.3.6/languages/sprinque-en_US.po

    r2919808 r2932350  
    3232msgstr "Apartment, suite, etc. (optional)"
    3333
    34 #: templates/frontend/srinque_pay_modal_form.php:91
    35 msgid "AuthCreditExceededError"
    36 msgstr "Authorization request exceeds the available credit limit"
    37 
    38 #: templates/frontend/srinque_pay_modal_form.php:91
    39 msgid "AuthBuyerNotFoundError"
    40 msgstr "Business does not exist"
    41 
    42 #: templates/frontend/srinque_pay_modal_form.php:91
    43 msgid "AuthBuyerBlockedError"
    44 msgstr "Business has been blocked"
    45 
    46 #: templates/frontend/srinque_pay_modal_form.php:91
    47 msgid "AuthBuyerInactiveError"
    48 msgstr "Business is inactive"
    49 
    50 #: templates/frontend/srinque_pay_modal_form.php:91
    51 msgid "AuthCreditNotFoundError"
    52 msgstr "Credit limit for this buyer is not set"
    53 
    54 #: templates/frontend/srinque_pay_modal_form.php:91
    55 msgid "AuthCreditRejectedError"
    56 msgstr "Business rejected for credit"
    57 
    58 #: templates/frontend/srinque_pay_modal_form.php:91
    59 msgid "AuthAmountMoreThanDefault"
    60 msgstr "Authorized amount is more then default setting"
    61 
    6234msgid "VAT ID"
    6335msgstr "VAT ID"
  • sprinque/tags/1.3.6/languages/sprinque-es_ES.po

    r2919808 r2932350  
    256256#: templates/frontend/srinque_pay_modal_form.php:113
    257257msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "La aprobación puede tardar hasta 24 horas. Tu pedido no estará confirmado hasta que se tome una decisión. <br>Te notificaremos por email una vez finalizada la revisión."
     258msgstr "La aprobación puede tardar hasta 24 horas. Tu pedido no estará confirmado hasta que se tome una decisión. Te notificaremos por email una vez finalizada la revisión."
    259259
    260260#: include/payment_method.php:481
  • sprinque/tags/1.3.6/languages/sprinque-fr_FR.po

    r2919808 r2932350  
    256256#: templates/frontend/srinque_pay_modal_form.php:113
    257257msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "L'approbation peut prendre jusqu'à 24 heures. Votre commande n'est pas confirmée tant qu'une décision n'a pas été prise. <br>Nous vous informerons par courriel une fois l'examen terminé."
     258msgstr "L'approbation peut prendre jusqu'à 24 heures. Votre commande n'est pas confirmée tant qu'une décision n'a pas été prise. Nous vous informerons par courriel une fois l'examen terminé."
    259259
    260260#: include/payment_method.php:481
  • sprinque/tags/1.3.6/languages/sprinque-nl_NL.po

    r2920051 r2932350  
    256256#: templates/frontend/srinque_pay_modal_form.php:113
    257257msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "Je verzoek om op factuur te betalen wordt behandeld, dit kan 24 uur duren. Je bestelling is nog niet bevestigd tot beoordeling is afgerond. <br> We sturen je een bericht zodra de beoordeling voltooid is."
     258msgstr "Je verzoek om op factuur te betalen wordt behandeld, dit kan 24 uur duren. Je bestelling is nog niet bevestigd tot beoordeling is afgerond. We sturen je een bericht zodra de beoordeling voltooid is."
    259259
    260260#: include/payment_method.php:481
  • sprinque/tags/1.3.6/languages/sprinque-pl_PL.po

    r2919808 r2932350  
    99
    1010#: templates/frontend/srinque_pay_modal_form.php:102
    11 #, fuzzy
    1211msgid "(in :sec seconds)"
    1312msgstr "(w :sek sekundach)"
    1413
    1514#: sprinque.php:442 templates/ajax/founded_companies.php:22
    16 #, fuzzy
    1715msgid "Add buyer manually"
    1816msgstr "Dodaj kupującego ręcznie"
    1917
    2018#: templates/frontend/srinque_pay_modal_form.php:38
    21 #, fuzzy
    2219msgid "Address"
    2320msgstr "Adres"
    2421
    2522#: templates/frontend/srinque_pay_modal_form.php:42
    26 #, fuzzy
    2723msgid "Apartment, suite, etc (optional)"
    2824msgstr "Mieszkanie, apartament itp. (opcjonalnie)"
    2925
    3026#: templates/frontend/srinque_pay_modal_form.php:91
    31 #, fuzzy
    3227msgid "AuthAmountMoreThanDefault"
    3328msgstr "Autoryzowana kwota jest wyższa niż ustawienie domyślne"
    3429
    3530#: templates/frontend/srinque_pay_modal_form.php:91
    36 #, fuzzy
    3731msgid "AuthBuyerBlockedError"
    38 msgstr "Działalność została zablokowana"
    39 
    40 #: templates/frontend/srinque_pay_modal_form.php:91
    41 #, fuzzy
     32msgstr "Firma została zablokowana"
     33
     34#: templates/frontend/srinque_pay_modal_form.php:91
    4235msgid "AuthBuyerInactiveError"
    4336msgstr "Firma jest nieaktywna"
    4437
    4538#: templates/frontend/srinque_pay_modal_form.php:91
    46 #, fuzzy
    4739msgid "AuthBuyerNotFoundError"
    48 msgstr "Biznes nie istnieje"
     40msgstr "Firma nie istnieje"
    4941
    5042# When the order amount is larger than the available credit limit
    51 #, fuzzy
    5243msgid "AuthCreditExceededError"
    5344msgstr "Żądanie autoryzacji przekracza dostępny limit kredytowy"
    5445
    5546#: templates/frontend/srinque_pay_modal_form.php:91
    56 #, fuzzy
    5747msgid "AuthCreditNotFoundError"
    5848msgstr "Limit kredytowy dla tego kupującego nie został ustawiony"
    5949
    6050#: templates/frontend/srinque_pay_modal_form.php:91
    61 #, fuzzy
    6251msgid "AuthCreditRejectedError"
    6352msgstr "Odrzucenie wniosku o kredyt dla firmy"
    6453
    6554#: sprinque.php:392 sprinque.php:418
    66 #, fuzzy
    6755msgid "Awaiting Review"
    68 msgstr "Oczekiwanie na recenzję"
    69 
    70 #, fuzzy
     56msgstr "Oczekiwanie na weryfikację"
     57
    7158msgid "Billing or Accounts Payable email"
    7259msgstr "Wiadomość e-mail dotycząca rozliczeń lub zobowiązań"
    7360
    7461#: templates/frontend/srinque_pay_modal_form.php:36
    75 #, fuzzy
    7662msgid "Business address"
    7763msgstr "Adres firmy"
     
    7965#: sprinque.php:439 include/payment_method.php:111
    8066#: include/payment_method.php:119
    81 #, fuzzy
    8267msgid "Buy now and pay later for businesses"
    8368msgstr "Kup teraz i zapłać później dla firm"
    8469
    8570#: sprinque.php:441 templates/ajax/founded_companies.php:17
    86 #, fuzzy
    8771msgid "Can't find the business you are looking for?"
    8872msgstr "Nie możesz znaleźć firmy, której szukasz?"
     
    9175#: templates/frontend/srinque_pay_modal_form.php:108
    9276#: templates/frontend/srinque_pay_modal_form.php:116
    93 #, fuzzy
    9477msgid "Choose another payment method"
    9578msgstr "Wybierz inną metodę płatności"
    9679
    9780#: templates/frontend/srinque_pay_modal_form.php:46
    98 #, fuzzy
    9981msgid "City"
    10082msgstr "Miasto"
    10183
    10284#: sprinque.php:440 templates/ajax/founded_companies.php:3
    103 #, fuzzy
    10485msgid "Click here"
    10586msgstr "Kliknij tutaj"
     
    10788#: templates/frontend/srinque_pay_modal_form.php:21
    10889#: templates/frontend/srinque_pay_modal_form.php:22
    109 #, fuzzy
    11090msgid "Company Name"
    11191msgstr "Nazwa firmy"
    11292
    11393#: sprinque.php:440 templates/ajax/founded_companies.php:3
    114 #, fuzzy
    11594msgid "Company not found"
    11695msgstr "Nie znaleziono firmy?"
    11796
    11897#: templates/frontend/srinque_pay_modal_form.php:29
    119 #, fuzzy
    12098msgid "Company VAT ID"
    121 msgstr "NIP spółki"
     99msgstr "NIP firmy"
    122100
    123101#: templates/frontend/srinque_pay_modal_form.php:31
    124102#: templates/frontend/srinque_pay_modal_form.php:56
    125103#: templates/frontend/srinque_pay_modal_form.php:75
    126 #, fuzzy
    127104msgid "Confirm"
    128105msgstr "Potwierdź"
     
    130107#: templates/frontend/srinque_pay_modal_form.php:131
    131108#: templates/frontend/cancel_order_sprinque.php:11
    132 #, fuzzy
    133109msgid "Confirm cancelation"
    134 msgstr "Potwierdzenie anulowania"
     110msgstr "Potwierdź anulowanie"
    135111
    136112#: templates/frontend/srinque_pay_modal_form.php:137
    137 #, fuzzy
    138113msgid "Confirm order"
    139 msgstr "Potwierdzenie zamówienia"
     114msgstr "Potwierdź zamówienie"
    140115
    141116#: templates/frontend/srinque_pay_modal_form.php:129
    142 #, fuzzy
    143117msgid "Congratulations!"
    144118msgstr "Gratulacje!"
     
    146120#: templates/frontend/srinque_pay_modal_form.php:107
    147121#: templates/frontend/srinque_pay_modal_form.php:114
    148 #, fuzzy
    149122msgid "Continue and wait"
    150123msgstr "Kontynuuj i czekaj"
    151124
    152125#: templates/frontend/srinque_pay_modal_form.php:11
    153 #, fuzzy
    154126msgid "Country"
    155127msgstr "Kraj"
    156128
    157129#: sprinque.php:546
    158 #, fuzzy
    159130msgid "days"
    160 msgstr "czasy"
     131msgstr "dni"
    161132
    162133#: templates/frontend/srinque_pay_modal_form.php:100
    163 #, fuzzy
    164134msgid "days by Sprinque!"
    165135msgstr "dni przez Sprinque!"
    166136
    167137#: include/payment_method.php:501
    168 #, fuzzy
    169138msgid "Enable Pay by Invoice"
    170 msgstr "Włącz płatność przez fakturę"
     139msgstr "Włącz płatność na podstawie faktury"
    171140
    172141#: include/payment_method.php:499
    173 #, fuzzy
    174142msgid "Enable/Disable"
    175 msgstr "Włącz/Wyłącz"
     143msgstr "Włącz/wyłącz"
    176144
    177145#: templates/frontend/srinque_pay_modal_form.php:82
    178146#: templates/frontend/srinque_pay_modal_form.php:92
    179 #, fuzzy
    180147msgid "Go Back"
    181148msgstr "Wróć"
    182149
    183150#. URI of the plugin
    184 #, fuzzy
    185151msgid "https://sprinque.com/"
    186152msgstr "https://sprinque.com/"
    187153
    188154#: templates/frontend/srinque_pay_modal_form.php:79
    189 #, fuzzy
    190155msgid "If you have not received the code, please check your spam folder or"
    191156msgstr "Jeśli nie otrzymałeś kodu, sprawdź folder spamu lub"
    192157
    193158#: sprinque.php:444
    194 #, fuzzy
    195159msgid "Loading..."
    196160msgstr "Ładowanie..."
     
    198162#: sprinque.php:259
    199163#: sprinque.php:451
    200 #, fuzzy
    201164msgid "Net terms fee"
    202165msgstr "Opłata za warunki netto"
    203166
    204167#: templates/frontend/srinque_pay_modal_form.php:53
    205 #, fuzzy
    206168msgid "Not all fields filled on Billing or Modal"
    207169msgstr "Nie wszystkie pola są wypełnione na stronie Billing lub Modal"
    208170
    209171#: sprinque.php:443
    210 #, fuzzy
    211172msgid "Not all required fields are filled"
    212173msgstr "Nie wszystkie wymagane pola są wypełnione"
    213174
    214175#: include/payment_method.php:120
    215 #, fuzzy
    216176msgid "Order finished with Pay by Invoice"
    217 msgstr "Zamówienie zakończone z płatnością przez fakturę"
     177msgstr "Zamówienie zakończone płatnością na podstawie faktury"
    218178
    219179#: sprinque.php:438 include/payment_method.php:110
    220180#: include/payment_method.php:118
    221 #, fuzzy
    222181msgid "Pay by Invoice"
    223 msgstr "Płatność fakturą przez Sprinque"
     182msgstr "Płatność na podstawie faktury przez Sprinque"
    224183
    225184#: include/payment_method.php:549 include/payment_method.php:553
    226 #, fuzzy
    227185msgid "Pay by Invoice - Business only"
    228 msgstr "Płatność fakturą - tylko dla firm"
     186msgstr "Płatność na podstawie faktury — tylko dla firm"
    229187
    230188#: sprinque.php:211
    231 #, fuzzy
    232189msgid "Pay by Invoice - Cancelled"
    233 msgstr "Płatność fakturą - anulowane"
     190msgstr "Płatność na podstawie faktury — anulowana"
    234191
    235192#: templates/frontend/srinque_pay_modal_form.php:101
    236193#: templates/frontend/srinque_pay_modal_form.php:122
    237 #, fuzzy
    238194msgid "Place order"
    239195msgstr "Złóż zamówienie"
    240196
    241197#: templates/frontend/srinque_pay_modal_form.php:126
    242 #, fuzzy
    243198msgid "Placing your order"
    244199msgstr "Składanie zamówienia"
    245200
    246201#: templates/frontend/srinque_pay_modal_form.php:9
    247 #, fuzzy
    248202msgid "Please select your business"
    249203msgstr "Wybierz swoją firmę"
    250204
    251205#: templates/frontend/srinque_pay_modal_form.php:50
    252 #, fuzzy
    253206msgid "Postal code"
    254207msgstr "Kod pocztowy"
    255208
    256209#: templates/frontend/srinque_pay_modal_form.php:55
    257 #, fuzzy
    258210msgid "Previous step"
    259211msgstr "Poprzedni krok"
     
    261213#: templates/frontend/srinque_pay_modal_form.php:99
    262214#: templates/frontend/srinque_pay_modal_form.php:120
    263 #, fuzzy
    264215msgid "Purchase approved"
    265216msgstr "Zakup zatwierdzony"
     
    267218#: templates/frontend/srinque_pay_modal_form.php:105
    268219#: templates/frontend/srinque_pay_modal_form.php:112
    269 #, fuzzy
    270220msgid "Purchase under review"
    271221msgstr "Zakup w trakcie przeglądu"
     
    273223#: templates/frontend/srinque_pay_modal_form.php:26
    274224#: templates/frontend/srinque_pay_modal_form.php:27
    275 #, fuzzy
    276225msgid "Registration number"
    277226msgstr "Numer rejestracyjny"
    278227
    279228#: include/payment_method.php:301
    280 #, fuzzy
    281229msgid "Registration number is already used"
    282230msgstr "Numer rejestracyjny jest już używany"
    283231
    284232#: templates/frontend/srinque_pay_modal_form.php:79
    285 #, fuzzy
    286233msgid "Resend Code"
    287234msgstr "Wyślij ponownie kod"
    288235
    289236#: templates/frontend/srinque_pay_modal_form.php:12
    290 #, fuzzy
    291237msgid "Select a country"
    292238msgstr "Wybierz kraj"
    293239
    294240#: sprinque.php:419
    295 #, fuzzy
    296241msgid "Shipping"
    297242msgstr "Wysyłka"
     
    299244#. Name of the plugin
    300245#. Author of the plugin
    301 #, fuzzy
    302246msgid "Sprinque"
    303247msgstr "Sprinque"
    304248
    305249#. Description of the plugin
    306 #, fuzzy
    307250msgid "Sprinque for WordPress is a plugin that allows you to offer your business buyers net payment terms (15, 30, 60, 90 days) and thereby grow conversion and retention."
    308251msgstr "Sprinque dla WordPress to wtyczka, która pozwala zaoferować kupującym warunki płatności netto (15, 30, 60, 90 dni), a tym samym zwiększyć konwersję i retencję."
     
    310253#: templates/frontend/srinque_pay_modal_form.php:106
    311254#: templates/frontend/srinque_pay_modal_form.php:113
    312 #, fuzzy
    313255msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    314 msgstr "Zatwierdzenie może potrwać do 24 godzin. Zamówienie nie zostanie potwierdzone do momentu podjęcia decyzji. <br>Po zakończeniu weryfikacji powiadomimy Cię e-mailem."
     256msgstr "Zatwierdzenie może potrwać do 24 godzin. Zamówienie nie zostanie potwierdzone do momentu podjęcia decyzji. Po zakończeniu weryfikacji otrzymasz wiadomość e-mail."
    315257
    316258#: include/payment_method.php:481
    317 #, fuzzy
    318259msgid "Title"
    319260msgstr "Tytuł"
    320261
    321262#: templates/frontend/srinque_pay_modal_form.php:12
    322 #, fuzzy
    323263msgid "To approve a payment term for you we need your company information to run a credit assessment"
    324264msgstr "Aby zatwierdzić termin płatności, potrzebujemy informacji o firmie w celu przeprowadzenia oceny kredytowej"
    325265
    326266#: templates/frontend/srinque_pay_modal_form.php:64
    327 #, fuzzy
    328267msgid "To make sure it's really you we have sent a code to"
    329268msgstr "Aby upewnić się, że to naprawdę Ty, wysłaliśmy kod na adres"
    330269
    331270#: sprinque.php:440 templates/ajax/founded_companies.php:3
    332 #, fuzzy
    333271msgid "to use it anyway"
    334272msgstr "i tak go używać"
    335273
    336274#: templates/frontend/srinque_pay_modal_form.php:133
    337 #, fuzzy
    338275msgid "Total amount"
    339276msgstr "Łączna kwota"
    340277
    341 #, fuzzy
    342278msgid "VAT ID"
    343 msgstr "VAT ID"
     279msgstr "NIP"
    344280
    345281#: templates/frontend/srinque_pay_modal_form.php:62
    346 #, fuzzy
    347282msgid "Verify your email"
    348283msgstr "Zweryfikuj swój adres e-mail"
    349284
    350285#: templates/frontend/srinque_pay_modal_form.php:87
    351 #, fuzzy
    352286msgid "We are verifying your account"
    353287msgstr "Weryfikujemy konto użytkownika"
    354288
    355289#: templates/frontend/srinque_pay_modal_form.php:77
    356 #, fuzzy
    357290msgid "Wrong code number"
    358291msgstr "Nieprawidłowy numer kodu"
    359292
    360293#: templates/frontend/srinque_pay_modal_form.php:121
    361 #, fuzzy
    362294msgid "You have been approved for a credit limit of €xx and a payment term of 30 days by Sprinque!"
    363 msgstr "Otrzymałeś zgodę na limit kredytowy w wysokości €xx i termin płatności 30 dni od Sprinque!"
     295msgstr "Otrzymałeś zgodę na limit kredytowy w wysokości xx EUR i termin płatności 30 dni przez Sprinque!"
    364296
    365297#: templates/frontend/srinque_pay_modal_form.php:100
    366 #, fuzzy
    367298msgid "You have been approved for a payment term of"
    368299msgstr "Zostałeś zatwierdzony na okres płatności wynoszący"
     
    370301#: include/payment_method.php:420 include/payment_method.php:450
    371302#, php-format
    372 #, fuzzy
    373303msgid "You have been approved for a payment term of %s days by Sprinque!"
    374304msgstr "Zostałeś zatwierdzony na okres płatności %s dni przez Sprinque!"
    375305
    376306#: templates/frontend/srinque_pay_modal_form.php:130
    377 #, fuzzy
    378307msgid "You've been approved to pay with net terms. Select the payment term that best suits your company"
    379 msgstr "Zostałeś zatwierdzony do płatności netto. Wybierz termin płatności, który najlepiej pasuje do Twojej firmy"
     308msgstr "Zostałeś zatwierdzony do płatności netto. Wybierz termin płatności, który najlepiej pasuje Twojej firmie"
  • sprinque/tags/1.3.6/languages/sprinque.po

    r2919808 r2932350  
    6969msgstr ""
    7070
    71 
    72 #: templates/frontend/srinque_pay_modal_form.php:91
    73 msgid "AuthCreditExceededError"
    74 msgstr ""
    75 
    76 #: templates/frontend/srinque_pay_modal_form.php:91
    77 msgid "AuthBuyerNotFoundError"
    78 msgstr ""
    79 
    80 #: templates/frontend/srinque_pay_modal_form.php:91
    81 msgid "AuthBuyerBlockedError"
    82 msgstr ""
    83 
    84 #: templates/frontend/srinque_pay_modal_form.php:91
    85 msgid "AuthBuyerInactiveError"
    86 msgstr ""
    87 
    88 #: templates/frontend/srinque_pay_modal_form.php:91
    89 msgid "AuthCreditNotFoundError"
    90 msgstr ""
    91 
    92 #: templates/frontend/srinque_pay_modal_form.php:91
    93 msgid "AuthCreditRejectedError"
    94 msgstr ""
    95 
    96 #: templates/frontend/srinque_pay_modal_form.php:91
    97 msgid "AuthAmountMoreThanDefault"
    98 msgstr ""
    99 
    10071#: templates/frontend/srinque_pay_modal_form.php:31
    10172msgid "VAT ID"
  • sprinque/tags/1.3.6/languages/sprinque.pot

    r2919808 r2932350  
    3333msgstr ""
    3434
    35 #: templates/frontend/srinque_pay_modal_form.php:116
    36 msgid "AuthAmountMoreThanDefault"
    37 msgstr ""
    38 
    39 #: templates/frontend/srinque_pay_modal_form.php:119
    40 msgid "AuthBuyerBlockedError"
    41 msgstr ""
    42 
    43 #: templates/frontend/srinque_pay_modal_form.php:118
    44 msgid "AuthBuyerInactiveError"
    45 msgstr ""
    46 
    47 #: templates/frontend/srinque_pay_modal_form.php:120
    48 msgid "AuthBuyerNotFoundError"
    49 msgstr ""
    50 
    51 #: templates/frontend/srinque_pay_modal_form.php:114
    52 msgid "AuthCreditExceededError"
    53 msgstr ""
    54 
    55 #: templates/frontend/srinque_pay_modal_form.php:117
    56 msgid "AuthCreditNotFoundError"
    57 msgstr ""
    58 
    59 #: templates/frontend/srinque_pay_modal_form.php:115
    60 msgid "AuthCreditRejectedError"
    61 msgstr ""
    62 
    6335#: sprinque.php:499 sprinque.php:525
    6436msgid "Awaiting Review"
  • sprinque/tags/1.3.6/readme.txt

    r2922962 r2932350  
    66Tested up to: 6.0
    77Requires PHP: 5.3
    8 Stable tag: 1.3.5
     8Stable tag: 1.3.6
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5050
    5151== Changelog ==
     52
     53= 1.3.6 - June 29, 2023 =
     54* Deleted session_cache_limiter('public') in requests;
     55* Verified Polish translations;
     56* Used b2b-sprinque-tools for local errors translations;
     57* Pass business buyer name to metadata for auth call;
     58* Bumped b2b-sprinque-tools to v.1.3.6;
    5259
    5360= 1.3.5 - June 7, 2023 =
  • sprinque/tags/1.3.6/sprinque.php

    r2922962 r2932350  
    55Description: Sprinque for WordPress is a plugin that allows you to offer your business buyers net payment terms (15, 30, 60, 90 days) and thereby grow conversion and retention.
    66Author: Sprinque
    7 Version: 1.3.5
     7Version: 1.3.6
    88Text Domain: sprinque
    99Domain Path: /languages
    1010*/
    1111
    12 define( 'PLUGIN_SRINQUE_VERSION', '1.3.5' );
     12define( 'PLUGIN_SRINQUE_VERSION', '1.3.6' );
    1313define( 'PLUGIN_SRINQUE_DIR', __DIR__ );
    1414define( 'PLUGIN_SRINQUE_PATH', plugins_url( '', __FILE__ ) );
     
    421421                        $total = round($total, 2);
    422422
     423                        // Get buyer
     424                        $buyer = $this->srinque_api( [], 'GET', "/buyers/{$webhook['buyer_id']}" );
     425
    423426                        // Prepare Data to Send
    424427                        $data = [
     
    435438                            'metadata' => [
    436439                                'IPv4' => !strpos($ip_address, ':') !== false ? $ip_address : '',
    437                                 'IPv6' => strpos($ip_address, ':') !== false ? $ip_address : ''
     440                                'IPv6' => strpos($ip_address, ':') !== false ? $ip_address : '',
     441                                'business_name' => $buyer['business_name']
    438442                            ]
    439443                        ];
     
    614618            // Register scripts
    615619            $settings = get_option( 'woocommerce_wpm_srinque_pay_settings', true );
    616             wp_enqueue_script( 'wpm_srinque_tools', 'https://unpkg.com/b2b-sprinque-tools@1.3.2/dist/index.umd.min.js', array( ), PLUGIN_SRINQUE_VERSION, 'all' );
     620            wp_enqueue_script( 'wpm_srinque_tools', 'https://unpkg.com/b2b-sprinque-tools@1.3.6/dist/index.umd.min.js', array( ), PLUGIN_SRINQUE_VERSION, 'all' );
    617621            wp_enqueue_script( 'wpm_srinque_pay', PLUGIN_SRINQUE_PATH . '/assets/js/frontend.js', array( 'jquery', 'wpm_srinque_tools' ), PLUGIN_SRINQUE_VERSION, 'all' );
    618622
  • sprinque/tags/1.3.6/templates/frontend/srinque_pay_modal_form.php

    r2919712 r2932350  
    119119                    <div class="cant-complete-autorization" style="display: none;">
    120120                        <div class="verify-error"></div>
    121                         <div class="verify-error-explanation verify-credit-exceeded"><?php _e( "AuthCreditExceededError", 'sprinque' ); ?></div>
    122                         <div class="verify-error-explanation auth-credit-rejected-error"><?php _e( "AuthCreditRejectedError", 'sprinque' ); ?></div>
    123                         <div class="verify-error-explanation auth-amount-more-then-default-error"><?php _e( "AuthAmountMoreThanDefault", 'sprinque' ); ?></div>
    124                         <div class="verify-error-explanation auth-credit-not-found-error"><?php _e( "AuthCreditNotFoundError", 'sprinque' ); ?></div>
    125                         <div class="verify-error-explanation auth-buyer-inactive-error"><?php _e( "AuthBuyerInactiveError", 'sprinque' ); ?></div>
    126                         <div class="verify-error-explanation auth-buyer-blocked-error"><?php _e( "AuthBuyerBlockedError", 'sprinque' ); ?></div>
    127                         <div class="verify-error-explanation auth-buyer-not-found-error"><?php _e( "AuthBuyerNotFoundError", 'sprinque' ); ?></div>
    128121                        <div class="pagination-btns">
    129122                            <button type="button" class="wpm-btn wpm-btn_outline-primary white_btn_pay to_select_companies"><?php _e( "Go Back", 'sprinque' ); ?></button>
  • sprinque/trunk/assets/js/frontend.js

    r2920051 r2932350  
    826826                error: function (response) {
    827827                    if( response.status === 403 ) {
    828                         const currentErrorClass = 'message' in response.responseJSON ? response.responseJSON.message : '';
     828
     829                        let language = document.documentElement.lang;
     830                        language = language.replace('_', '-');
     831                        language = language.split('-');
     832                        language = language.shift();
     833
     834                        const $currentError = 'message' in response.responseJSON ? response.responseJSON.message : '';
    829835                        const $newBusinessContainer = $('.search_already_added_company');
    830836                        const $errorsContainer = $('.verifying_your_account');
    831837                        const $spinner = $errorsContainer.find('.wpm-loader');
    832838                        const $errorsList = $errorsContainer.find('.cant-complete-autorization');
    833                         const $errors = $errorsContainer.find('.verify-error-explanation');
    834                         const $currentError = $errorsList.find(currentErrorClass);
     839                        const $errorMessageElement = $errorsContainer.find('.verify-error');
     840                        const errorMessage = Sprinque.getTranslatedApiError(language, $currentError);
    835841
    836842                        if($currentError.length) {
    837843                            $newBusinessContainer.hide();
    838                             $errors.hide();
    839844                            $spinner.hide();
    840845                            $errorsList.show();
    841                             $currentError.show();
    842846                            $errorsContainer.show();
     847                            $errorMessageElement.show().html(errorMessage);
    843848                        }
    844849                    }
     
    985990                            }, 1000);
    986991                        } else {
    987                             var modal_class = 'modal-middle';
    988 
    989992                            showTab('.verifying_your_account');
    990993                            $('.cant-complete-autorization').show();
     
    993996                            $('.verify-error-explanation, .verify-error').hide();
    994997
    995                             if(response.result.error_code === 'auth-credit-exceeded') {
    996                                 $('.verify-credit-exceeded').show();
    997                             } else if (response.result.error_code === 'auth-credit-rejected') {
    998                                 $('.auth-credit-rejected-error').show();
    999                             } else if (response.result.error_code === 'auth-amount-exceeded') {
    1000                                 $('.auth-amount-more-then-default-error').show();
    1001                             } else if (response.result.error_code === 'auth-credit-not-found') {
    1002                                 $('.auth-credit-not-found-error').show();
    1003                             } else if (response.result.error_code === 'auth-buyer-inactive') {
    1004                                 $('.auth-buyer-inactive-error').show();
    1005                             } else if (response.result.error_code === 'auth-buyer-blocked') {
    1006                                 $('.auth-buyer-blocked-error').show();
    1007                             } else if (response.result.error_code === 'auth-buyer-not-found') {
    1008                                 $('.auth-buyer-not-found-error').show();
     998                            const is_error_by_code = typeof response.result.error_code !== "undefined" && response.result.error_code.length > 0;
     999
     1000                            let language = document.documentElement.lang;
     1001                            language = language.replace('_', '-');
     1002                            language = language.split('-');
     1003                            language = language.shift();
     1004
     1005                            const modal_class = is_error_by_code ? 'modal-middle' : '';
     1006                            if (is_error_by_code) {
     1007                                const errors = [];
     1008                                for (let key in response.result.errors) {
     1009                                    errors.push(Sprinque.getTranslatedApiError(language, key));
     1010                                }
     1011                                message = errors.join("<br>");
    10091012                            } else {
    1010                                 $('.verify-error').show()
    1011                                     .html(response.message);
    1012                                 modal_class = '';
     1013                                message = response.message;
    10131014                            }
     1015
     1016                            $('.verify-error').show().html(message);
    10141017
    10151018                            if (modal_class.length > 0) {
  • sprinque/trunk/include/payment_method.php

    r2919712 r2932350  
    232232         */
    233233        public function sprinque_register_buyer_api() {
    234             if ( ! session_id() ) {
    235                 session_cache_limiter('public');
    236                 session_start();
    237             }
     234               
    238235            if (! isset( $_POST['business_name'] ) ) {
    239236                return false;
     237            }
     238
     239            // Dont start a sessions unless we are going to do things with the business name.
     240            if ( ! session_id() ) {
     241                session_start();
    240242            }
    241243
     
    365367                // See the error classes /templates/frontend/srinque_pay_modal_form.php:109
    366368                $error = [
    367                     'REJECTED' => '.auth-credit-rejected-error',
    368                     'BLOCKED' => '.auth-buyer-blocked-error',
    369                     'INACTIVE' => '.auth-buyer-inactive-error',
     369                    'REJECTED' => 'AuthCreditRejectedError',
     370                    'BLOCKED' => 'AuthBuyerBlockedError',
     371                    'INACTIVE' => 'AuthBuyerInactiveError',
    370372                ];
    371373
     
    383385        public function sprinque_authorize_company_order() {
    384386            if ( ! session_id() ) {
    385                 session_cache_limiter('public');
    386387                session_start();
    387388            }
     
    396397                $buyer_id = sanitize_text_field($_SESSION['buyer_id']);
    397398            }
     399
     400            $buyer = $this->srinque_api( [], 'GET', "/buyers/{$buyer_id}" );
    398401
    399402            // Get the user's IP address
     
    416419                'metadata' => [
    417420                    'IPv4' => !strpos($ip, ':') !== false ? $ip : '',
    418                     'IPv6' => strpos($ip, ':') !== false ? $ip : ''
     421                    'IPv6' => strpos($ip, ':') !== false ? $ip : '',
     422                    'business_name' => $buyer['business_name']
    419423                ]
    420424            ];
     
    486490        {
    487491            if ( ! session_id() ) {
    488                 session_cache_limiter('public');
    489492                session_start();
    490493            }
     
    518521        {
    519522            if ( ! session_id() ) {
    520                 session_cache_limiter('public');
    521523                session_start();
    522524            }
     
    573575        public function sprinque_get_buyer_info() {
    574576            if ( ! session_id() ) {
    575                 session_cache_limiter('public');
    576577                session_start();
    577578            }
     
    756757        public function process_payment( $order_id ) {
    757758            if ( ! session_id() ) {
    758                 session_cache_limiter('public');
    759759                session_start();
    760760            }
  • sprinque/trunk/languages/sprinque-de_DE.po

    r2919808 r2932350  
    5656msgstr "Überprüft"
    5757
    58 #, fuzzy
    5958msgid "Billing or Accounts Payable email"
    60 msgstr "E-Mail für Rechnungsstellung oder Kreditorenbuchhaltung"
     59msgstr "E-Mail für Rechnungsstellung oder Buchhaltung"
    6160
    6261#: templates/frontend/srinque_pay_modal_form.php:36
     
    163162#: sprinque.php:259
    164163#: sprinque.php:451
    165 #, fuzzy
    166164msgid "Net terms fee"
    167 msgstr "Netto-Laufzeitgebühr"
     165msgstr "Netto-Zahlungsziel Gebühr"
    168166
    169167#: templates/frontend/srinque_pay_modal_form.php:53
     
    256254#: templates/frontend/srinque_pay_modal_form.php:113
    257255msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "Die Genehmigung kann bis zu 24 Stunden dauern. Ihre Bestellung ist nicht bestätigt, bis eine Entscheidung getroffen ist. <br>Wir werden Sie per E-Mail benachrichtigen, sobald die Prüfung abgeschlossen ist."
     256msgstr "Die Genehmigung kann bis zu 24 Stunden dauern. Ihre Bestellung ist nicht bestätigt, bis eine Entscheidung getroffen ist. Wir werden Sie per E-Mail benachrichtigen, sobald die Prüfung abgeschlossen ist."
    259257
    260258#: include/payment_method.php:481
     
    264262#: templates/frontend/srinque_pay_modal_form.php:12
    265263msgid "To approve a payment term for you we need your company information to run a credit assessment"
    266 msgstr "Um Ihnen ein Zahlungsziel zu gewähren, benötigen wir Ihre Unternehmensdaten, um eine Bonitätsprüfung durchzuführen"
     264msgstr "Um Ihnen ein Zahlungsziel zu gewähren, benötigen wir Ihre Unternehmensdaten, um eine Bonitätsprüfung durchzuführen."
    267265
    268266#: templates/frontend/srinque_pay_modal_form.php:64
  • sprinque/trunk/languages/sprinque-en_US.po

    r2919808 r2932350  
    3232msgstr "Apartment, suite, etc. (optional)"
    3333
    34 #: templates/frontend/srinque_pay_modal_form.php:91
    35 msgid "AuthCreditExceededError"
    36 msgstr "Authorization request exceeds the available credit limit"
    37 
    38 #: templates/frontend/srinque_pay_modal_form.php:91
    39 msgid "AuthBuyerNotFoundError"
    40 msgstr "Business does not exist"
    41 
    42 #: templates/frontend/srinque_pay_modal_form.php:91
    43 msgid "AuthBuyerBlockedError"
    44 msgstr "Business has been blocked"
    45 
    46 #: templates/frontend/srinque_pay_modal_form.php:91
    47 msgid "AuthBuyerInactiveError"
    48 msgstr "Business is inactive"
    49 
    50 #: templates/frontend/srinque_pay_modal_form.php:91
    51 msgid "AuthCreditNotFoundError"
    52 msgstr "Credit limit for this buyer is not set"
    53 
    54 #: templates/frontend/srinque_pay_modal_form.php:91
    55 msgid "AuthCreditRejectedError"
    56 msgstr "Business rejected for credit"
    57 
    58 #: templates/frontend/srinque_pay_modal_form.php:91
    59 msgid "AuthAmountMoreThanDefault"
    60 msgstr "Authorized amount is more then default setting"
    61 
    6234msgid "VAT ID"
    6335msgstr "VAT ID"
  • sprinque/trunk/languages/sprinque-es_ES.po

    r2919808 r2932350  
    256256#: templates/frontend/srinque_pay_modal_form.php:113
    257257msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "La aprobación puede tardar hasta 24 horas. Tu pedido no estará confirmado hasta que se tome una decisión. <br>Te notificaremos por email una vez finalizada la revisión."
     258msgstr "La aprobación puede tardar hasta 24 horas. Tu pedido no estará confirmado hasta que se tome una decisión. Te notificaremos por email una vez finalizada la revisión."
    259259
    260260#: include/payment_method.php:481
  • sprinque/trunk/languages/sprinque-fr_FR.po

    r2919808 r2932350  
    256256#: templates/frontend/srinque_pay_modal_form.php:113
    257257msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "L'approbation peut prendre jusqu'à 24 heures. Votre commande n'est pas confirmée tant qu'une décision n'a pas été prise. <br>Nous vous informerons par courriel une fois l'examen terminé."
     258msgstr "L'approbation peut prendre jusqu'à 24 heures. Votre commande n'est pas confirmée tant qu'une décision n'a pas été prise. Nous vous informerons par courriel une fois l'examen terminé."
    259259
    260260#: include/payment_method.php:481
  • sprinque/trunk/languages/sprinque-nl_NL.po

    r2920051 r2932350  
    256256#: templates/frontend/srinque_pay_modal_form.php:113
    257257msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    258 msgstr "Je verzoek om op factuur te betalen wordt behandeld, dit kan 24 uur duren. Je bestelling is nog niet bevestigd tot beoordeling is afgerond. <br> We sturen je een bericht zodra de beoordeling voltooid is."
     258msgstr "Je verzoek om op factuur te betalen wordt behandeld, dit kan 24 uur duren. Je bestelling is nog niet bevestigd tot beoordeling is afgerond. We sturen je een bericht zodra de beoordeling voltooid is."
    259259
    260260#: include/payment_method.php:481
  • sprinque/trunk/languages/sprinque-pl_PL.po

    r2919808 r2932350  
    99
    1010#: templates/frontend/srinque_pay_modal_form.php:102
    11 #, fuzzy
    1211msgid "(in :sec seconds)"
    1312msgstr "(w :sek sekundach)"
    1413
    1514#: sprinque.php:442 templates/ajax/founded_companies.php:22
    16 #, fuzzy
    1715msgid "Add buyer manually"
    1816msgstr "Dodaj kupującego ręcznie"
    1917
    2018#: templates/frontend/srinque_pay_modal_form.php:38
    21 #, fuzzy
    2219msgid "Address"
    2320msgstr "Adres"
    2421
    2522#: templates/frontend/srinque_pay_modal_form.php:42
    26 #, fuzzy
    2723msgid "Apartment, suite, etc (optional)"
    2824msgstr "Mieszkanie, apartament itp. (opcjonalnie)"
    2925
    3026#: templates/frontend/srinque_pay_modal_form.php:91
    31 #, fuzzy
    3227msgid "AuthAmountMoreThanDefault"
    3328msgstr "Autoryzowana kwota jest wyższa niż ustawienie domyślne"
    3429
    3530#: templates/frontend/srinque_pay_modal_form.php:91
    36 #, fuzzy
    3731msgid "AuthBuyerBlockedError"
    38 msgstr "Działalność została zablokowana"
    39 
    40 #: templates/frontend/srinque_pay_modal_form.php:91
    41 #, fuzzy
     32msgstr "Firma została zablokowana"
     33
     34#: templates/frontend/srinque_pay_modal_form.php:91
    4235msgid "AuthBuyerInactiveError"
    4336msgstr "Firma jest nieaktywna"
    4437
    4538#: templates/frontend/srinque_pay_modal_form.php:91
    46 #, fuzzy
    4739msgid "AuthBuyerNotFoundError"
    48 msgstr "Biznes nie istnieje"
     40msgstr "Firma nie istnieje"
    4941
    5042# When the order amount is larger than the available credit limit
    51 #, fuzzy
    5243msgid "AuthCreditExceededError"
    5344msgstr "Żądanie autoryzacji przekracza dostępny limit kredytowy"
    5445
    5546#: templates/frontend/srinque_pay_modal_form.php:91
    56 #, fuzzy
    5747msgid "AuthCreditNotFoundError"
    5848msgstr "Limit kredytowy dla tego kupującego nie został ustawiony"
    5949
    6050#: templates/frontend/srinque_pay_modal_form.php:91
    61 #, fuzzy
    6251msgid "AuthCreditRejectedError"
    6352msgstr "Odrzucenie wniosku o kredyt dla firmy"
    6453
    6554#: sprinque.php:392 sprinque.php:418
    66 #, fuzzy
    6755msgid "Awaiting Review"
    68 msgstr "Oczekiwanie na recenzję"
    69 
    70 #, fuzzy
     56msgstr "Oczekiwanie na weryfikację"
     57
    7158msgid "Billing or Accounts Payable email"
    7259msgstr "Wiadomość e-mail dotycząca rozliczeń lub zobowiązań"
    7360
    7461#: templates/frontend/srinque_pay_modal_form.php:36
    75 #, fuzzy
    7662msgid "Business address"
    7763msgstr "Adres firmy"
     
    7965#: sprinque.php:439 include/payment_method.php:111
    8066#: include/payment_method.php:119
    81 #, fuzzy
    8267msgid "Buy now and pay later for businesses"
    8368msgstr "Kup teraz i zapłać później dla firm"
    8469
    8570#: sprinque.php:441 templates/ajax/founded_companies.php:17
    86 #, fuzzy
    8771msgid "Can't find the business you are looking for?"
    8872msgstr "Nie możesz znaleźć firmy, której szukasz?"
     
    9175#: templates/frontend/srinque_pay_modal_form.php:108
    9276#: templates/frontend/srinque_pay_modal_form.php:116
    93 #, fuzzy
    9477msgid "Choose another payment method"
    9578msgstr "Wybierz inną metodę płatności"
    9679
    9780#: templates/frontend/srinque_pay_modal_form.php:46
    98 #, fuzzy
    9981msgid "City"
    10082msgstr "Miasto"
    10183
    10284#: sprinque.php:440 templates/ajax/founded_companies.php:3
    103 #, fuzzy
    10485msgid "Click here"
    10586msgstr "Kliknij tutaj"
     
    10788#: templates/frontend/srinque_pay_modal_form.php:21
    10889#: templates/frontend/srinque_pay_modal_form.php:22
    109 #, fuzzy
    11090msgid "Company Name"
    11191msgstr "Nazwa firmy"
    11292
    11393#: sprinque.php:440 templates/ajax/founded_companies.php:3
    114 #, fuzzy
    11594msgid "Company not found"
    11695msgstr "Nie znaleziono firmy?"
    11796
    11897#: templates/frontend/srinque_pay_modal_form.php:29
    119 #, fuzzy
    12098msgid "Company VAT ID"
    121 msgstr "NIP spółki"
     99msgstr "NIP firmy"
    122100
    123101#: templates/frontend/srinque_pay_modal_form.php:31
    124102#: templates/frontend/srinque_pay_modal_form.php:56
    125103#: templates/frontend/srinque_pay_modal_form.php:75
    126 #, fuzzy
    127104msgid "Confirm"
    128105msgstr "Potwierdź"
     
    130107#: templates/frontend/srinque_pay_modal_form.php:131
    131108#: templates/frontend/cancel_order_sprinque.php:11
    132 #, fuzzy
    133109msgid "Confirm cancelation"
    134 msgstr "Potwierdzenie anulowania"
     110msgstr "Potwierdź anulowanie"
    135111
    136112#: templates/frontend/srinque_pay_modal_form.php:137
    137 #, fuzzy
    138113msgid "Confirm order"
    139 msgstr "Potwierdzenie zamówienia"
     114msgstr "Potwierdź zamówienie"
    140115
    141116#: templates/frontend/srinque_pay_modal_form.php:129
    142 #, fuzzy
    143117msgid "Congratulations!"
    144118msgstr "Gratulacje!"
     
    146120#: templates/frontend/srinque_pay_modal_form.php:107
    147121#: templates/frontend/srinque_pay_modal_form.php:114
    148 #, fuzzy
    149122msgid "Continue and wait"
    150123msgstr "Kontynuuj i czekaj"
    151124
    152125#: templates/frontend/srinque_pay_modal_form.php:11
    153 #, fuzzy
    154126msgid "Country"
    155127msgstr "Kraj"
    156128
    157129#: sprinque.php:546
    158 #, fuzzy
    159130msgid "days"
    160 msgstr "czasy"
     131msgstr "dni"
    161132
    162133#: templates/frontend/srinque_pay_modal_form.php:100
    163 #, fuzzy
    164134msgid "days by Sprinque!"
    165135msgstr "dni przez Sprinque!"
    166136
    167137#: include/payment_method.php:501
    168 #, fuzzy
    169138msgid "Enable Pay by Invoice"
    170 msgstr "Włącz płatność przez fakturę"
     139msgstr "Włącz płatność na podstawie faktury"
    171140
    172141#: include/payment_method.php:499
    173 #, fuzzy
    174142msgid "Enable/Disable"
    175 msgstr "Włącz/Wyłącz"
     143msgstr "Włącz/wyłącz"
    176144
    177145#: templates/frontend/srinque_pay_modal_form.php:82
    178146#: templates/frontend/srinque_pay_modal_form.php:92
    179 #, fuzzy
    180147msgid "Go Back"
    181148msgstr "Wróć"
    182149
    183150#. URI of the plugin
    184 #, fuzzy
    185151msgid "https://sprinque.com/"
    186152msgstr "https://sprinque.com/"
    187153
    188154#: templates/frontend/srinque_pay_modal_form.php:79
    189 #, fuzzy
    190155msgid "If you have not received the code, please check your spam folder or"
    191156msgstr "Jeśli nie otrzymałeś kodu, sprawdź folder spamu lub"
    192157
    193158#: sprinque.php:444
    194 #, fuzzy
    195159msgid "Loading..."
    196160msgstr "Ładowanie..."
     
    198162#: sprinque.php:259
    199163#: sprinque.php:451
    200 #, fuzzy
    201164msgid "Net terms fee"
    202165msgstr "Opłata za warunki netto"
    203166
    204167#: templates/frontend/srinque_pay_modal_form.php:53
    205 #, fuzzy
    206168msgid "Not all fields filled on Billing or Modal"
    207169msgstr "Nie wszystkie pola są wypełnione na stronie Billing lub Modal"
    208170
    209171#: sprinque.php:443
    210 #, fuzzy
    211172msgid "Not all required fields are filled"
    212173msgstr "Nie wszystkie wymagane pola są wypełnione"
    213174
    214175#: include/payment_method.php:120
    215 #, fuzzy
    216176msgid "Order finished with Pay by Invoice"
    217 msgstr "Zamówienie zakończone z płatnością przez fakturę"
     177msgstr "Zamówienie zakończone płatnością na podstawie faktury"
    218178
    219179#: sprinque.php:438 include/payment_method.php:110
    220180#: include/payment_method.php:118
    221 #, fuzzy
    222181msgid "Pay by Invoice"
    223 msgstr "Płatność fakturą przez Sprinque"
     182msgstr "Płatność na podstawie faktury przez Sprinque"
    224183
    225184#: include/payment_method.php:549 include/payment_method.php:553
    226 #, fuzzy
    227185msgid "Pay by Invoice - Business only"
    228 msgstr "Płatność fakturą - tylko dla firm"
     186msgstr "Płatność na podstawie faktury — tylko dla firm"
    229187
    230188#: sprinque.php:211
    231 #, fuzzy
    232189msgid "Pay by Invoice - Cancelled"
    233 msgstr "Płatność fakturą - anulowane"
     190msgstr "Płatność na podstawie faktury — anulowana"
    234191
    235192#: templates/frontend/srinque_pay_modal_form.php:101
    236193#: templates/frontend/srinque_pay_modal_form.php:122
    237 #, fuzzy
    238194msgid "Place order"
    239195msgstr "Złóż zamówienie"
    240196
    241197#: templates/frontend/srinque_pay_modal_form.php:126
    242 #, fuzzy
    243198msgid "Placing your order"
    244199msgstr "Składanie zamówienia"
    245200
    246201#: templates/frontend/srinque_pay_modal_form.php:9
    247 #, fuzzy
    248202msgid "Please select your business"
    249203msgstr "Wybierz swoją firmę"
    250204
    251205#: templates/frontend/srinque_pay_modal_form.php:50
    252 #, fuzzy
    253206msgid "Postal code"
    254207msgstr "Kod pocztowy"
    255208
    256209#: templates/frontend/srinque_pay_modal_form.php:55
    257 #, fuzzy
    258210msgid "Previous step"
    259211msgstr "Poprzedni krok"
     
    261213#: templates/frontend/srinque_pay_modal_form.php:99
    262214#: templates/frontend/srinque_pay_modal_form.php:120
    263 #, fuzzy
    264215msgid "Purchase approved"
    265216msgstr "Zakup zatwierdzony"
     
    267218#: templates/frontend/srinque_pay_modal_form.php:105
    268219#: templates/frontend/srinque_pay_modal_form.php:112
    269 #, fuzzy
    270220msgid "Purchase under review"
    271221msgstr "Zakup w trakcie przeglądu"
     
    273223#: templates/frontend/srinque_pay_modal_form.php:26
    274224#: templates/frontend/srinque_pay_modal_form.php:27
    275 #, fuzzy
    276225msgid "Registration number"
    277226msgstr "Numer rejestracyjny"
    278227
    279228#: include/payment_method.php:301
    280 #, fuzzy
    281229msgid "Registration number is already used"
    282230msgstr "Numer rejestracyjny jest już używany"
    283231
    284232#: templates/frontend/srinque_pay_modal_form.php:79
    285 #, fuzzy
    286233msgid "Resend Code"
    287234msgstr "Wyślij ponownie kod"
    288235
    289236#: templates/frontend/srinque_pay_modal_form.php:12
    290 #, fuzzy
    291237msgid "Select a country"
    292238msgstr "Wybierz kraj"
    293239
    294240#: sprinque.php:419
    295 #, fuzzy
    296241msgid "Shipping"
    297242msgstr "Wysyłka"
     
    299244#. Name of the plugin
    300245#. Author of the plugin
    301 #, fuzzy
    302246msgid "Sprinque"
    303247msgstr "Sprinque"
    304248
    305249#. Description of the plugin
    306 #, fuzzy
    307250msgid "Sprinque for WordPress is a plugin that allows you to offer your business buyers net payment terms (15, 30, 60, 90 days) and thereby grow conversion and retention."
    308251msgstr "Sprinque dla WordPress to wtyczka, która pozwala zaoferować kupującym warunki płatności netto (15, 30, 60, 90 dni), a tym samym zwiększyć konwersję i retencję."
     
    310253#: templates/frontend/srinque_pay_modal_form.php:106
    311254#: templates/frontend/srinque_pay_modal_form.php:113
    312 #, fuzzy
    313255msgid "This may take upto 24 hours for approval. Your Order is not confirmed until a decision is made. <br>We will notify you by email once the review is complete."
    314 msgstr "Zatwierdzenie może potrwać do 24 godzin. Zamówienie nie zostanie potwierdzone do momentu podjęcia decyzji. <br>Po zakończeniu weryfikacji powiadomimy Cię e-mailem."
     256msgstr "Zatwierdzenie może potrwać do 24 godzin. Zamówienie nie zostanie potwierdzone do momentu podjęcia decyzji. Po zakończeniu weryfikacji otrzymasz wiadomość e-mail."
    315257
    316258#: include/payment_method.php:481
    317 #, fuzzy
    318259msgid "Title"
    319260msgstr "Tytuł"
    320261
    321262#: templates/frontend/srinque_pay_modal_form.php:12
    322 #, fuzzy
    323263msgid "To approve a payment term for you we need your company information to run a credit assessment"
    324264msgstr "Aby zatwierdzić termin płatności, potrzebujemy informacji o firmie w celu przeprowadzenia oceny kredytowej"
    325265
    326266#: templates/frontend/srinque_pay_modal_form.php:64
    327 #, fuzzy
    328267msgid "To make sure it's really you we have sent a code to"
    329268msgstr "Aby upewnić się, że to naprawdę Ty, wysłaliśmy kod na adres"
    330269
    331270#: sprinque.php:440 templates/ajax/founded_companies.php:3
    332 #, fuzzy
    333271msgid "to use it anyway"
    334272msgstr "i tak go używać"
    335273
    336274#: templates/frontend/srinque_pay_modal_form.php:133
    337 #, fuzzy
    338275msgid "Total amount"
    339276msgstr "Łączna kwota"
    340277
    341 #, fuzzy
    342278msgid "VAT ID"
    343 msgstr "VAT ID"
     279msgstr "NIP"
    344280
    345281#: templates/frontend/srinque_pay_modal_form.php:62
    346 #, fuzzy
    347282msgid "Verify your email"
    348283msgstr "Zweryfikuj swój adres e-mail"
    349284
    350285#: templates/frontend/srinque_pay_modal_form.php:87
    351 #, fuzzy
    352286msgid "We are verifying your account"
    353287msgstr "Weryfikujemy konto użytkownika"
    354288
    355289#: templates/frontend/srinque_pay_modal_form.php:77
    356 #, fuzzy
    357290msgid "Wrong code number"
    358291msgstr "Nieprawidłowy numer kodu"
    359292
    360293#: templates/frontend/srinque_pay_modal_form.php:121
    361 #, fuzzy
    362294msgid "You have been approved for a credit limit of €xx and a payment term of 30 days by Sprinque!"
    363 msgstr "Otrzymałeś zgodę na limit kredytowy w wysokości €xx i termin płatności 30 dni od Sprinque!"
     295msgstr "Otrzymałeś zgodę na limit kredytowy w wysokości xx EUR i termin płatności 30 dni przez Sprinque!"
    364296
    365297#: templates/frontend/srinque_pay_modal_form.php:100
    366 #, fuzzy
    367298msgid "You have been approved for a payment term of"
    368299msgstr "Zostałeś zatwierdzony na okres płatności wynoszący"
     
    370301#: include/payment_method.php:420 include/payment_method.php:450
    371302#, php-format
    372 #, fuzzy
    373303msgid "You have been approved for a payment term of %s days by Sprinque!"
    374304msgstr "Zostałeś zatwierdzony na okres płatności %s dni przez Sprinque!"
    375305
    376306#: templates/frontend/srinque_pay_modal_form.php:130
    377 #, fuzzy
    378307msgid "You've been approved to pay with net terms. Select the payment term that best suits your company"
    379 msgstr "Zostałeś zatwierdzony do płatności netto. Wybierz termin płatności, który najlepiej pasuje do Twojej firmy"
     308msgstr "Zostałeś zatwierdzony do płatności netto. Wybierz termin płatności, który najlepiej pasuje Twojej firmie"
  • sprinque/trunk/languages/sprinque.po

    r2919808 r2932350  
    6969msgstr ""
    7070
    71 
    72 #: templates/frontend/srinque_pay_modal_form.php:91
    73 msgid "AuthCreditExceededError"
    74 msgstr ""
    75 
    76 #: templates/frontend/srinque_pay_modal_form.php:91
    77 msgid "AuthBuyerNotFoundError"
    78 msgstr ""
    79 
    80 #: templates/frontend/srinque_pay_modal_form.php:91
    81 msgid "AuthBuyerBlockedError"
    82 msgstr ""
    83 
    84 #: templates/frontend/srinque_pay_modal_form.php:91
    85 msgid "AuthBuyerInactiveError"
    86 msgstr ""
    87 
    88 #: templates/frontend/srinque_pay_modal_form.php:91
    89 msgid "AuthCreditNotFoundError"
    90 msgstr ""
    91 
    92 #: templates/frontend/srinque_pay_modal_form.php:91
    93 msgid "AuthCreditRejectedError"
    94 msgstr ""
    95 
    96 #: templates/frontend/srinque_pay_modal_form.php:91
    97 msgid "AuthAmountMoreThanDefault"
    98 msgstr ""
    99 
    10071#: templates/frontend/srinque_pay_modal_form.php:31
    10172msgid "VAT ID"
  • sprinque/trunk/languages/sprinque.pot

    r2919808 r2932350  
    3333msgstr ""
    3434
    35 #: templates/frontend/srinque_pay_modal_form.php:116
    36 msgid "AuthAmountMoreThanDefault"
    37 msgstr ""
    38 
    39 #: templates/frontend/srinque_pay_modal_form.php:119
    40 msgid "AuthBuyerBlockedError"
    41 msgstr ""
    42 
    43 #: templates/frontend/srinque_pay_modal_form.php:118
    44 msgid "AuthBuyerInactiveError"
    45 msgstr ""
    46 
    47 #: templates/frontend/srinque_pay_modal_form.php:120
    48 msgid "AuthBuyerNotFoundError"
    49 msgstr ""
    50 
    51 #: templates/frontend/srinque_pay_modal_form.php:114
    52 msgid "AuthCreditExceededError"
    53 msgstr ""
    54 
    55 #: templates/frontend/srinque_pay_modal_form.php:117
    56 msgid "AuthCreditNotFoundError"
    57 msgstr ""
    58 
    59 #: templates/frontend/srinque_pay_modal_form.php:115
    60 msgid "AuthCreditRejectedError"
    61 msgstr ""
    62 
    6335#: sprinque.php:499 sprinque.php:525
    6436msgid "Awaiting Review"
  • sprinque/trunk/readme.txt

    r2922962 r2932350  
    66Tested up to: 6.0
    77Requires PHP: 5.3
    8 Stable tag: 1.3.5
     8Stable tag: 1.3.6
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5050
    5151== Changelog ==
     52
     53= 1.3.6 - June 29, 2023 =
     54* Deleted session_cache_limiter('public') in requests;
     55* Verified Polish translations;
     56* Used b2b-sprinque-tools for local errors translations;
     57* Pass business buyer name to metadata for auth call;
     58* Bumped b2b-sprinque-tools to v.1.3.6;
    5259
    5360= 1.3.5 - June 7, 2023 =
  • sprinque/trunk/sprinque.php

    r2922962 r2932350  
    55Description: Sprinque for WordPress is a plugin that allows you to offer your business buyers net payment terms (15, 30, 60, 90 days) and thereby grow conversion and retention.
    66Author: Sprinque
    7 Version: 1.3.5
     7Version: 1.3.6
    88Text Domain: sprinque
    99Domain Path: /languages
    1010*/
    1111
    12 define( 'PLUGIN_SRINQUE_VERSION', '1.3.5' );
     12define( 'PLUGIN_SRINQUE_VERSION', '1.3.6' );
    1313define( 'PLUGIN_SRINQUE_DIR', __DIR__ );
    1414define( 'PLUGIN_SRINQUE_PATH', plugins_url( '', __FILE__ ) );
     
    421421                        $total = round($total, 2);
    422422
     423                        // Get buyer
     424                        $buyer = $this->srinque_api( [], 'GET', "/buyers/{$webhook['buyer_id']}" );
     425
    423426                        // Prepare Data to Send
    424427                        $data = [
     
    435438                            'metadata' => [
    436439                                'IPv4' => !strpos($ip_address, ':') !== false ? $ip_address : '',
    437                                 'IPv6' => strpos($ip_address, ':') !== false ? $ip_address : ''
     440                                'IPv6' => strpos($ip_address, ':') !== false ? $ip_address : '',
     441                                'business_name' => $buyer['business_name']
    438442                            ]
    439443                        ];
     
    614618            // Register scripts
    615619            $settings = get_option( 'woocommerce_wpm_srinque_pay_settings', true );
    616             wp_enqueue_script( 'wpm_srinque_tools', 'https://unpkg.com/b2b-sprinque-tools@1.3.2/dist/index.umd.min.js', array( ), PLUGIN_SRINQUE_VERSION, 'all' );
     620            wp_enqueue_script( 'wpm_srinque_tools', 'https://unpkg.com/b2b-sprinque-tools@1.3.6/dist/index.umd.min.js', array( ), PLUGIN_SRINQUE_VERSION, 'all' );
    617621            wp_enqueue_script( 'wpm_srinque_pay', PLUGIN_SRINQUE_PATH . '/assets/js/frontend.js', array( 'jquery', 'wpm_srinque_tools' ), PLUGIN_SRINQUE_VERSION, 'all' );
    618622
  • sprinque/trunk/templates/frontend/srinque_pay_modal_form.php

    r2919712 r2932350  
    119119                    <div class="cant-complete-autorization" style="display: none;">
    120120                        <div class="verify-error"></div>
    121                         <div class="verify-error-explanation verify-credit-exceeded"><?php _e( "AuthCreditExceededError", 'sprinque' ); ?></div>
    122                         <div class="verify-error-explanation auth-credit-rejected-error"><?php _e( "AuthCreditRejectedError", 'sprinque' ); ?></div>
    123                         <div class="verify-error-explanation auth-amount-more-then-default-error"><?php _e( "AuthAmountMoreThanDefault", 'sprinque' ); ?></div>
    124                         <div class="verify-error-explanation auth-credit-not-found-error"><?php _e( "AuthCreditNotFoundError", 'sprinque' ); ?></div>
    125                         <div class="verify-error-explanation auth-buyer-inactive-error"><?php _e( "AuthBuyerInactiveError", 'sprinque' ); ?></div>
    126                         <div class="verify-error-explanation auth-buyer-blocked-error"><?php _e( "AuthBuyerBlockedError", 'sprinque' ); ?></div>
    127                         <div class="verify-error-explanation auth-buyer-not-found-error"><?php _e( "AuthBuyerNotFoundError", 'sprinque' ); ?></div>
    128121                        <div class="pagination-btns">
    129122                            <button type="button" class="wpm-btn wpm-btn_outline-primary white_btn_pay to_select_companies"><?php _e( "Go Back", 'sprinque' ); ?></button>
Note: See TracChangeset for help on using the changeset viewer.