Plugin Directory

Changeset 3268688


Ignore:
Timestamp:
04/08/2025 11:14:26 AM (11 months ago)
Author:
imoje
Message:

v4.8.0

Location:
imoje/trunk
Files:
19 added
10 edited

Legend:

Unmodified
Added
Removed
  • imoje/trunk/assets/css/imoje-gateway.css

    r3116816 r3268688  
    1 .imoje-installments__wrapper iframe{width:100%}.imoje-payment-method-container{margin-top:10px}.imoje-payment-method-container .imoje-channels{list-style-type:none;display:flex;flex-wrap:wrap;margin:0;padding:0;justify-content:center}.imoje-payment-method-container .imoje-channels li{padding:5px 3px 0 !important;border:none !important}.imoje-payment-method-container .imoje-channels li label{display:flex;border:2px solid #e7e7e7;border-radius:2px;width:83px !important;height:50px !important;justify-content:center;align-items:center;padding:10px !important;transition:transform .2s}.imoje-payment-method-container .imoje-channels li label:before,.imoje-payment-method-container .imoje-channels li label:after{content:none !important}.imoje-payment-method-container .imoje-channels li label.imoje-active,.imoje-payment-method-container .imoje-channels li label.imoje-c-active:hover{border-color:#ff6200;transform:scale(1.03);cursor:pointer}.imoje-payment-method-container .imoje-channels li label.imoje-c-no-active{filter:grayscale(1);background:#e7e7e7;pointer-events:none}.imoje-payment-method-container .imoje-channels li label img{width:auto;height:35px;object-fit:contain;margin:0 !important}.imoje-payment-method-container .imoje-channels li label input{display:none}.imoje-payment-method-container .imoje-pbl-error{padding-top:0.5em;padding-bottom:0.5em;margin-top:0.5em;margin-bottom:0.5em;display:none}.imoje-payment-method-container .imoje-pbl-error:before{top:0.5em}.imoje-blik-code-container{display:flex;justify-content:center;align-items:center;letter-spacing:5px;margin-top:10px}.imoje-blik-code-container input{font-size:24px;padding:10px;text-align:center;border:2px solid #ff6200;border-radius:5px;margin:0 5px;width:160px;box-sizing:border-box;outline:none;color:#ff6200}.imoje-loading{margin-left:50%;margin-right:50%}.imoje-check-payment{text-align:center;border:2px solid #ff6200;padding:20px}.imoje-regulations{margin-top:15px}.imoje-regulations a{text-decoration:none !important;color:#ff6200;text-decoration-color:#ff6200;outline:none}.imoje-regulations a:hover{text-decoration:underline !important}.imoje-display-none{display:none}.imoje-card{margin-left:auto;margin-right:auto;max-width:460px;background:#ffffff;border-radius:10px;box-shadow:0 0 2px 0 rgba(0,0,0,0.12),0 2px 2px 0 rgba(0,0,0,0.24)}.imoje-card .imoje-card-content{text-align:center;padding:40px 20px}.imoje-card .imoje-card-content img{margin-left:auto;margin-right:auto;margin-bottom:20px;width:80px}
     1.imoje-installments__wrapper iframe{width:100%}.imoje-installments__wrapper #imoje-installments-container iframe{width:100%}.imoje-payment-method-container{margin-top:10px}.imoje-payment-method-container .imoje-channels{list-style-type:none;display:flex;flex-wrap:wrap;margin:0;padding:0;justify-content:center}.imoje-payment-method-container .imoje-channels li{padding:5px 3px 0 !important;border:none !important}.imoje-payment-method-container .imoje-channels li label{display:flex;border:2px solid #e7e7e7;border-radius:2px;width:83px !important;height:50px !important;justify-content:center;align-items:center;padding:10px !important;transition:transform .2s}.imoje-payment-method-container .imoje-channels li label:before,.imoje-payment-method-container .imoje-channels li label:after{content:none !important}.imoje-payment-method-container .imoje-channels li label.imoje-active,.imoje-payment-method-container .imoje-channels li label.imoje-c-active:hover{border-color:#ff6200;transform:scale(1.03);cursor:pointer}.imoje-payment-method-container .imoje-channels li label.imoje-c-no-active{filter:grayscale(1);background:#e7e7e7;pointer-events:none}.imoje-payment-method-container .imoje-channels li label img{width:auto;height:35px;object-fit:contain;margin:0 !important}.imoje-payment-method-container .imoje-channels li label input{display:none}.imoje-payment-method-container .imoje-pbl-error{padding-top:0.5em;padding-bottom:0.5em;margin-top:0.5em;margin-bottom:0.5em;display:none}.imoje-payment-method-container .imoje-pbl-error:before{top:0.5em}.imoje-payment-method-container__title{display:flex;justify-content:center;align-items:center;padding-bottom:15px}.imoje-payment-method-container__label{display:flex;align-items:center;justify-content:center;border-radius:5px;padding:10px;width:83px !important;height:50px !important;cursor:pointer;border:1px solid #e7e7e7}.imoje-payment-method-container__label--active{display:flex;align-items:center;justify-content:center;border-radius:5px;padding:10px;width:83px !important;height:50px !important;cursor:pointer;border:2px solid #ff6200}.imoje-payment-method-container__label--not-available{display:flex;align-items:center;justify-content:center;border-radius:5px;padding:10px;width:83px !important;height:50px !important;border:1px solid #e7e7e7;opacity:0.5;cursor:not-allowed}.imoje-payment-method-container__wrapper{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:10px 0}.imoje-payment-method-container__method-wrapper{position:relative}.imoje-payment-method-container__blik-code-wrapper{margin-bottom:15px}.imoje-payment-method-container__tooltip{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background-color:#e7e7e7;padding:5px;border-radius:4px;font-size:12px;white-space:nowrap;z-index:10}.imoje-payment-method-container__img{height:35px !important;width:auto;object-fit:contain}.imoje-payment-method-container__twisto{display:flex;justify-content:center;align-items:center;text-align:center;padding:15px}.imoje-payment-method-container__legal{display:flex;justify-content:center;align-items:center}.imoje-payment-method-container__legal span{text-align:center}.imoje-payment-method-container__legal span a{color:#ff6200;border-color:#ff6200;transform:scale(1.03);cursor:pointer}.imoje-blik-code-container{display:flex;justify-content:center;align-items:center;letter-spacing:5px;margin-top:10px}.imoje-blik-code-container input{font-size:24px;padding:10px;text-align:center;border:2px solid #ff6200;border-radius:5px;margin:0 5px;width:160px;box-sizing:border-box;outline:none;color:#ff6200}.imoje-loading{margin-left:50%;margin-right:50%}.imoje-check-payment{text-align:center;border:2px solid #ff6200;padding:20px}.imoje-regulations{margin-top:15px}.imoje-regulations a{text-decoration:none !important;color:#ff6200;text-decoration-color:#ff6200;outline:none}.imoje-regulations a:hover{text-decoration:underline !important}.imoje-display-none{display:none}.imoje-card{margin-left:auto;margin-right:auto;max-width:460px;background:#ffffff;border-radius:10px;box-shadow:0 0 2px 0 rgba(0,0,0,0.12),0 2px 2px 0 rgba(0,0,0,0.24)}.imoje-card .imoje-card-content{text-align:center;padding:40px 20px}.imoje-card .imoje-card-content img{margin-left:auto;margin-right:auto;margin-bottom:20px;width:80px}#imoje-installments-container iframe{width:100%}.imoje-block-checkout__header{display:flex;gap:10px}
  • imoje/trunk/assets/css/imoje-gateway.min.css

    r3116816 r3268688  
    1 .imoje-installments__wrapper iframe{width:100%}.imoje-payment-method-container{margin-top:10px}.imoje-payment-method-container .imoje-channels{list-style-type:none;display:flex;flex-wrap:wrap;margin:0;padding:0;justify-content:center}.imoje-payment-method-container .imoje-channels li{padding:5px 3px 0!important;border:0!important}.imoje-payment-method-container .imoje-channels li label{display:flex;border:2px solid #e7e7e7;border-radius:2px;width:83px!important;height:50px!important;justify-content:center;align-items:center;padding:10px!important;transition:transform .2s}.imoje-payment-method-container .imoje-channels li label:after,.imoje-payment-method-container .imoje-channels li label:before{content:none!important}.imoje-payment-method-container .imoje-channels li label.imoje-active,.imoje-payment-method-container .imoje-channels li label.imoje-c-active:hover{border-color:#ff6200;transform:scale(1.03);cursor:pointer}.imoje-payment-method-container .imoje-channels li label.imoje-c-no-active{filter:grayscale(1);background:#e7e7e7;pointer-events:none}.imoje-payment-method-container .imoje-channels li label img{width:auto;height:35px;object-fit:contain;margin:0!important}.imoje-payment-method-container .imoje-channels li label input{display:none}.imoje-payment-method-container .imoje-pbl-error{padding-top:.5em;padding-bottom:.5em;margin-top:.5em;margin-bottom:.5em;display:none}.imoje-payment-method-container .imoje-pbl-error:before{top:.5em}.imoje-blik-code-container{display:flex;justify-content:center;align-items:center;letter-spacing:5px;margin-top:10px}.imoje-blik-code-container input{font-size:24px;padding:10px;text-align:center;border:2px solid #ff6200;border-radius:5px;margin:0 5px;width:160px;box-sizing:border-box;outline:0;color:#ff6200}.imoje-loading{margin-left:50%;margin-right:50%}.imoje-check-payment{text-align:center;border:2px solid #ff6200;padding:20px}.imoje-regulations{margin-top:15px}.imoje-regulations a{text-decoration:none!important;color:#ff6200;text-decoration-color:#ff6200;outline:0}.imoje-regulations a:hover{text-decoration:underline!important}.imoje-display-none{display:none}.imoje-card{margin-left:auto;margin-right:auto;max-width:460px;background:#fff;border-radius:10px;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24)}.imoje-card .imoje-card-content{text-align:center;padding:40px 20px}.imoje-card .imoje-card-content img{margin-left:auto;margin-right:auto;margin-bottom:20px;width:80px}
     1#imoje-installments-container iframe,.imoje-installments__wrapper #imoje-installments-container iframe,.imoje-installments__wrapper iframe{width:100%}.imoje-payment-method-container{margin-top:10px}.imoje-payment-method-container .imoje-channels{list-style-type:none;display:flex;flex-wrap:wrap;margin:0;padding:0;justify-content:center}.imoje-payment-method-container .imoje-channels li{padding:5px 3px 0!important;border:0!important}.imoje-payment-method-container .imoje-channels li label{display:flex;border:2px solid #e7e7e7;border-radius:2px;width:83px!important;height:50px!important;justify-content:center;align-items:center;padding:10px!important;transition:transform .2s}.imoje-payment-method-container .imoje-channels li label:after,.imoje-payment-method-container .imoje-channels li label:before{content:none!important}.imoje-payment-method-container .imoje-channels li label.imoje-active,.imoje-payment-method-container .imoje-channels li label.imoje-c-active:hover,.imoje-payment-method-container__legal span a{border-color:#ff6200;transform:scale(1.03);cursor:pointer}.imoje-payment-method-container .imoje-channels li label.imoje-c-no-active{filter:grayscale(1);background:#e7e7e7;pointer-events:none}.imoje-payment-method-container .imoje-channels li label img{width:auto;height:35px;object-fit:contain;margin:0!important}.imoje-payment-method-container .imoje-channels li label input{display:none}.imoje-payment-method-container .imoje-pbl-error{padding-top:.5em;padding-bottom:.5em;margin-top:.5em;margin-bottom:.5em;display:none}.imoje-payment-method-container .imoje-pbl-error:before{top:.5em}.imoje-payment-method-container__title{display:flex;justify-content:center;align-items:center;padding-bottom:15px}.imoje-payment-method-container__label,.imoje-payment-method-container__label--active,.imoje-payment-method-container__label--not-available{display:flex;align-items:center;justify-content:center;border-radius:5px;padding:10px;width:83px!important;height:50px!important;cursor:pointer;border:1px solid #e7e7e7}.imoje-payment-method-container__label--active,.imoje-payment-method-container__label--not-available{border:2px solid #ff6200}.imoje-payment-method-container__label--not-available{border:1px solid #e7e7e7;opacity:.5;cursor:not-allowed}.imoje-payment-method-container__wrapper{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:10px 0}.imoje-payment-method-container__method-wrapper{position:relative}.imoje-payment-method-container__blik-code-wrapper{margin-bottom:15px}.imoje-payment-method-container__tooltip{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background-color:#e7e7e7;padding:5px;border-radius:4px;font-size:12px;white-space:nowrap;z-index:10}.imoje-payment-method-container__img{height:35px!important;width:auto;object-fit:contain}.imoje-payment-method-container__twisto{text-align:center;padding:15px}.imoje-blik-code-container,.imoje-payment-method-container__legal,.imoje-payment-method-container__twisto{display:flex;justify-content:center;align-items:center}.imoje-payment-method-container__legal span{text-align:center}.imoje-payment-method-container__legal span a{color:#ff6200}.imoje-blik-code-container{letter-spacing:5px;margin-top:10px}.imoje-blik-code-container input{font-size:24px;padding:10px;text-align:center;border:2px solid #ff6200;border-radius:5px;margin:0 5px;width:160px;box-sizing:border-box;outline:0;color:#ff6200}.imoje-loading{margin-left:50%;margin-right:50%}.imoje-check-payment{text-align:center;border:2px solid #ff6200;padding:20px}.imoje-regulations{margin-top:15px}.imoje-regulations a{text-decoration:none!important;color:#ff6200;text-decoration-color:#ff6200;outline:0}.imoje-regulations a:hover{text-decoration:underline!important}.imoje-display-none{display:none}.imoje-card{margin-left:auto;margin-right:auto;max-width:460px;background:#fff;border-radius:10px;box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 2px 2px 0 rgba(0,0,0,.24)}.imoje-card .imoje-card-content{text-align:center;padding:40px 20px}.imoje-card .imoje-card-content img{margin-left:auto;margin-right:auto;margin-bottom:20px;width:80px}.imoje-block-checkout__header{display:flex;gap:10px}
  • imoje/trunk/includes/gateway/WC_Gateway_ImojeBlik.php

    r3205609 r3268688  
    3939     */
    4040    public function process_payment( $order_id ) {
    41 
    4241        if ( ! $this->blik0 ) {
    4342            return parent::process_payment( $order_id );
     
    183182        }
    184183    }
     184
     185    /**
     186     * @return array
     187     */
     188    public function get_payment_channels()
     189    {
     190        return $this->prepare_payment_methods_block_checkout('blik');
     191    }
    185192}
  • imoje/trunk/includes/gateway/WC_Gateway_ImojeInstallments.php

    r3205609 r3268688  
    5555
    5656        if ( $this->render_calculator() ) {
    57 
    5857            $this->render_regulations();
    5958        }
     
    6160
    6261    /**
    63      * @return bool
     62     *
     63     * @return Installments
    6464     */
    65     private function render_calculator() {
    66 
    67         global $wp_query;
    68 
    69         $this->imoje_service = $this->get_service_active();
    70 
    71         if ( ! $this->imoje_service ) {
    72             $this->render_unavailable_template();
    73 
    74             return false;
    75         }
    76 
    77         $installments = new Installments(
     65    private function get_installments_instance() {
     66        return new Installments(
    7867            $this->get_option( 'merchant_id' ),
    7968            $this->get_option( 'service_id' ),
    8069            $this->get_option( 'service_key' ),
    81             $this->sandbox
    82                 ? Util::ENVIRONMENT_SANDBOX
    83                 : Util::ENVIRONMENT_PRODUCTION
     70            $this->sandbox ? Util::ENVIRONMENT_SANDBOX : Util::ENVIRONMENT_PRODUCTION
    8471        );
     72    }
     73
     74    /**
     75     *
     76     * @return array
     77     */
     78    private function fetch_installments_data() {
     79        $installments = $this->get_installments_instance();
    8580
    8681        $installments_data = $installments->getData(
     
    9186        $installments_data['url'] = $installments->getScriptUrl();
    9287
    93         $wp_query->query_vars['installments_data'] = $installments_data;
     88        return $installments_data;
     89    }
     90
     91    /**
     92     *
     93     * @return bool
     94     */
     95    private function render_calculator() {
     96        global $wp_query;
     97
     98        $this->imoje_service = $this->get_service_active();
     99
     100        if ( ! $this->imoje_service ) {
     101            $this->render_unavailable_template();
     102            return false;
     103        }
     104
     105        $wp_query->query_vars['installments_data'] = $this->fetch_installments_data();
    94106
    95107        load_template( dirname( __DIR__ ) . '/templates/installments.php', false );
     
    97109        return true;
    98110    }
     111
     112    /**
     113     *
     114     * @return array
     115     */
     116    public function get_calculator_data() {
     117        return $this->fetch_installments_data();
     118    }
    99119}
  • imoje/trunk/includes/gateway/WC_Gateway_ImojePbl.php

    r3205609 r3268688  
    5656        }
    5757    }
     58
     59
     60    /**
     61     * @return array
     62     */
     63    public function get_payment_channels()
     64    {
     65        return $this->prepare_payment_methods_block_checkout('pbl');
     66    }
     67
    5868}
  • imoje/trunk/includes/gateway/WC_Gateway_Imoje_Api_Abstract.php

    r3205609 r3268688  
    307307     * @param array  $payment_method
    308308     * @param number $cart_total
     309     * @param bool   $add_currency
    309310     *
    310311     * @return array
    311312     */
    312     protected function get_payment_channel_to_array( $payment_method, $cart_total ) {
     313    protected function get_payment_channel_to_array( $payment_method, $cart_total, $add_currency = false ) {
    313314        $logo = Util::getPaymentMethodCodeLogo( $payment_method['paymentMethodCode'] );
    314315
     
    356357        }
    357358
     359        if($add_currency) {
     360            $array['currency'] = $payment_method['currency'];
     361        }
     362
    358363        return $array;
    359364    }
     
    365370     */
    366371    public function process_payment( $order_id ) {
    367 
    368372        $customer_notice_error = __( 'Payment error. Contact with shop administrator.', 'imoje' );
    369373
     
    421425            empty( $_POST['imoje-installments-period'] )
    422426                ? 0
    423                 : $_POST['imoje-installments-period']
     427                : (int) $_POST['imoje-installments-period']
    424428        );
    425429
     
    463467        load_template( dirname( __DIR__ ) . '/templates/twisto/regulation.php', false );
    464468    }
    465 }
     469
     470    /**
     471     * @return array
     472     */
     473    public function get_payment_channels()
     474    {
     475        return $this->prepare_payment_methods_block_checkout(static::PAYMENT_METHOD_NAME);
     476    }
     477
     478    /**
     479     * @param string $payment_method_name
     480     *
     481     * @return array
     482     */
     483    protected function prepare_payment_methods_block_checkout( $payment_method_name ){
     484        $child_payment_method_name = static::PAYMENT_METHOD_NAME;
     485        $currencies = get_option("woocommerce_{$child_payment_method_name}_settings", [])['currencies'] ?? [];
     486        $cart_total = WC()->cart->get_cart_contents_total();
     487
     488        if (!is_array($currencies)) {
     489            $currencies = [$currencies];
     490        }
     491
     492
     493        $currencies = array_map('strtolower', $currencies);
     494        $imoje_service = $this->get_service_active();
     495
     496        if (!isset($imoje_service['paymentMethods']) || !is_array($imoje_service['paymentMethods'])) {
     497            return [];
     498        }
     499
     500        $filtered_methods = array_filter($imoje_service['paymentMethods'], function ($method) use ($currencies, $payment_method_name) {
     501            return isset($method['paymentMethod'])
     502                && $method['paymentMethod'] === $payment_method_name
     503                && in_array(strtolower($method['currency']), $currencies, true)
     504                && $method['isActive'];
     505        });
     506
     507        $prepared_methods = [];
     508        foreach($filtered_methods as $key => $paymentMethod) {
     509            $prepared_methods[$key] = $this->get_payment_channel_to_array($paymentMethod, $cart_total, true);
     510        }
     511
     512        return $prepared_methods;
     513    }
     514 }
  • imoje/trunk/langs/imoje-pl_PL.po

    r3205609 r3268688  
    22msgstr ""
    33"Project-Id-Version: \n"
    4 "POT-Creation-Date: 2024-11-04 13:39+0100\n"
    5 "PO-Revision-Date: 2024-11-04 13:39+0100\n"
     4"POT-Creation-Date: 2025-03-04 10:46+0100\n"
     5"PO-Revision-Date: 2025-03-04 11:11+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: \n"
     
    1212"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
    1313"|| n%100>=20) ? 1 : 2);\n"
    14 "X-Generator: Poedit 3.2\n"
     14"X-Generator: Poedit 3.5\n"
    1515"X-Poedit-Basepath: ..\n"
    1616"X-Poedit-KeywordsList: __;esc_html__;esc_html_e\n"
     
    5757msgstr "poniżej"
    5858
    59 #: includes/gateway/WC_Gateway_ImojeBlik.php:46
    60 #: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:368
     59#: includes/gateway/WC_Gateway_ImojeBlik.php:49
     60#: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:374
    6161msgid "Payment error. Contact with shop administrator."
    6262msgstr "Spróbuj ponownie później lub skontaktuj się z obsługą sklepu."
    6363
    64 #: includes/gateway/WC_Gateway_ImojeBlik.php:166
     64#: includes/gateway/WC_Gateway_ImojeBlik.php:171
    6565msgid "Display field"
    6666msgstr "Wyświetlaj pole"
    6767
    68 #: includes/gateway/WC_Gateway_ImojeBlik.php:169
     68#: includes/gateway/WC_Gateway_ImojeBlik.php:174
    6969msgid "Display field on the checkout"
    7070msgstr "Wyświetlanie pola BLIK na stronie sklepu"
     
    268268msgstr "Sklep jest nieaktywny w imoje"
    269269
    270 #: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:273
     270#: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:274
    271271msgid "No payment channel available. Choose another payment method."
    272272msgstr "Brak dostępnego kanału płatności. Wybierz inną metodę płatności."
     273
     274#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:75
     275#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:114
     276#: includes/templates/regulation.php:17
     277msgid "Regulations of imoje"
     278msgstr "Regulamin imoje"
     279
     280#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:76
     281#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:115
     282#: includes/templates/regulation.php:22
     283msgid "Information on personal data imoje"
     284msgstr "Informację o danych osobowych imoje"
     285
     286#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:77
     287#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:116
     288msgid "I declare that I have read and accept {regulation} and {iodo}."
     289msgstr "Oświadczam, że zapoznałem się i akceptuję {regulation} i {iodo}."
     290
     291#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:79
     292#: includes/templates/payment_method_list.php:14
     293msgid ""
     294"Choose payment channel if is available. In other way choose another payment "
     295"method"
     296msgstr ""
     297"Wybierz kanał płatności, jeśli jest dostępny. W przeciwnym razie wybierz "
     298"inną metodę płatności"
     299
     300#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:110
     301msgid "Enter the correct 6-digit BLIK code."
     302msgstr "Wprowadź prawidłowy 6-cyfrowy kod BLIK."
     303
     304#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:180
     305#: includes/templates/twisto/regulation.php:10
     306msgid ""
     307"I agree to provide Twisto S.A. with my transaction details in the imoje "
     308"payment gateway in order to make an offer to finance my purchases."
     309msgstr ""
     310"Wyrażam zgodę na przekazanie Twisto S.A. moich danych transakcji w bramce "
     311"płatności imoje w celu przedstawienia oferty finansowania moich zakupów."
    273312
    274313#: includes/templates/blik/check.php:14
     
    292331"Twoja płatność została poprawnie przeprocesowana. Zostaniesz poinformowany o "
    293332"następnych krokach."
    294 
    295 #: includes/templates/payment_method_list.php:14
    296 msgid ""
    297 "Choose payment channel if is available. In other way choose another payment "
    298 "method"
    299 msgstr ""
    300 "Wybierz kanał płatności, jeśli jest dostępny. W przeciwnym razie wybierz "
    301 "inną metodę płatności"
    302333
    303334#: includes/templates/payment_method_list.php:31
     
    310341msgstr "Oświadczam, że zapoznałem się i akceptuję %s i %s."
    311342
    312 #: includes/templates/regulation.php:17
    313 msgid "Regulations of imoje"
    314 msgstr "Regulamin imoje"
    315 
    316 #: includes/templates/regulation.php:22
    317 msgid "Information on personal data imoje"
    318 msgstr "Informację o danych osobowych imoje"
    319 
    320 #: includes/templates/twisto/regulation.php:10
    321 msgid ""
    322 "I agree to provide Twisto S.A. with my transaction details in the imoje "
    323 "payment gateway in order to make an offer to finance my purchases."
    324 msgstr ""
    325 "Wyrażam zgodę na przekazanie Twisto S.A. moich danych transakcji w bramce "
    326 "płatności imoje w celu przedstawienia oferty finansowania moich zakupów."
    327 
    328343#: includes/templates/unavailable_payment_method.php:12
    329344msgid "Payment method is unavailable, please select another one."
    330345msgstr "Metoda płatności jest niedostępna, wybierz inną."
    331346
    332 #: woocommerce-imoje.php:226
     347#: woocommerce-imoje.php:243
    333348msgid "Transaction could not be initialized, error: "
    334349msgstr "Transakcja nie mogła zostać zainicjowana, błędy: "
    335350
    336 #: woocommerce-imoje.php:403
     351#: woocommerce-imoje.php:420
    337352msgid "Insert BLIK code."
    338353msgstr "Wprowadź kod BLIK."
    339354
    340 #: woocommerce-imoje.php:404
     355#: woocommerce-imoje.php:421
    341356msgid "Please try again."
    342357msgstr "Proszę spróbować ponownie."
    343358
    344 #: woocommerce-imoje.php:408 woocommerce-imoje.php:467
     359#: woocommerce-imoje.php:425 woocommerce-imoje.php:484
    345360msgid "Payment failed."
    346361msgstr "Płatność nieudana."
    347362
    348 #: woocommerce-imoje.php:410
     363#: woocommerce-imoje.php:427
    349364msgid ""
    350365"Technical break in your bank. Pay later or use another bank's application."
     
    353368"innego banku."
    354369
    355 #: woocommerce-imoje.php:412
     370#: woocommerce-imoje.php:429
    356371msgid "Alias not found. To proceed the payment you need to pay with BLIK code."
    357372msgstr ""
     
    359374"BLIK."
    360375
    361 #: woocommerce-imoje.php:415
     376#: woocommerce-imoje.php:432
    362377msgid "Alias declined. To proceed the payment you need to pay with BLIK code."
    363378msgstr ""
    364379"Alias został odrzucony. Aby kontynuować płatność należy zapłacić kodem BLIK."
    365380
    366 #: woocommerce-imoje.php:417
     381#: woocommerce-imoje.php:434
    367382msgid "You have entered wrong BLIK code."
    368383msgstr "Wprowadziłeś błędny kod BLIK."
    369384
    370 #: woocommerce-imoje.php:420
     385#: woocommerce-imoje.php:437
    371386msgid "BLIK code expired."
    372387msgstr "Kod BLIK stracił ważność."
    373388
    374 #: woocommerce-imoje.php:424
     389#: woocommerce-imoje.php:441
    375390msgid "Something went wrong with BLIK code."
    376391msgstr "Coś poszło nie tak z kodem BLIK."
    377392
    378 #: woocommerce-imoje.php:427
     393#: woocommerce-imoje.php:444
    379394msgid "Payment declined at the banking application."
    380395msgstr "Płatność została odrzucona w aplikacji bankowej."
    381396
    382 #: woocommerce-imoje.php:431
     397#: woocommerce-imoje.php:448
    383398msgid "Payment failed - not confirmed on time in the banking application."
    384399msgstr ""
    385400"Płatność nie powiodła się - nie potwierdzono na czas w aplikacji bankowej."
    386401
    387 #: woocommerce-imoje.php:434
     402#: woocommerce-imoje.php:451
    388403msgid "Inserted wrong PIN code in banking application."
    389404msgstr "Wprowadzono błędny kod PIN w aplikacji bankowej."
    390405
    391 #: woocommerce-imoje.php:437
     406#: woocommerce-imoje.php:454
    392407msgid "Payment failed (security)."
    393408msgstr "Płatność nie powiodła się (bezpieczeństwo)."
    394409
    395 #: woocommerce-imoje.php:440
     410#: woocommerce-imoje.php:457
    396411msgid "Limit exceeded in your banking application."
    397412msgstr "Przekroczono limit w Twojej aplikacji bankowej."
    398413
    399 #: woocommerce-imoje.php:443
     414#: woocommerce-imoje.php:460
    400415msgid "Insufficient funds in your bank account."
    401416msgstr "Niewystarczające środki na Twoim koncie bankowym."
    402417
    403 #: woocommerce-imoje.php:446
     418#: woocommerce-imoje.php:463
    404419msgid "Issuer declined."
    405420msgstr "Odmowa issuera."
    406421
    407 #: woocommerce-imoje.php:449
     422#: woocommerce-imoje.php:466
    408423msgid "Transaction not found."
    409424msgstr "Transakcja nie została znaleziona."
    410425
    411 #: woocommerce-imoje.php:452
     426#: woocommerce-imoje.php:469
    412427msgid "Bad IBAN."
    413428msgstr "Zły IBAN."
    414429
    415 #: woocommerce-imoje.php:455
     430#: woocommerce-imoje.php:472
    416431msgid "Transfer not possible."
    417432msgstr "Transfer nie jest możliwy."
    418433
    419 #: woocommerce-imoje.php:458
     434#: woocommerce-imoje.php:475
    420435msgid "Return late."
    421436msgstr "Zwrot za późno."
    422437
    423 #: woocommerce-imoje.php:461
     438#: woocommerce-imoje.php:478
    424439msgid "Return amount exceeded."
    425440msgstr "Przekroczona kwota zwrotu."
    426441
    427 #: woocommerce-imoje.php:464
     442#: woocommerce-imoje.php:481
    428443msgid "Transfer late."
    429444msgstr "Transfer za późno."
  • imoje/trunk/readme.txt

    r3205609 r3268688  
    22Contributors: imoje
    33Tags: imoje, woocommerce, payments, payment gateway, checkout
    4 Tested up to: 6.7.1
     4Tested up to: 6.7.2
    55Requires PHP: 5.6.0
    66License: GPLv2
    7 Stable tag: 4.7.2
     7Stable tag: 4.8.0
    88
    99Add payment via imoje to WooCommerce
     
    7373
    7474== Changelog ==
     75= 4.8.0 =
     76* added support for WooCommerce block checkout
    7577= 4.7.2 =
    7678* minor fixes for imoje installments payment method
  • imoje/trunk/woocommerce-imoje.php

    r3205609 r3268688  
    44Plugin URI: https://imoje.pl
    55Description: Add payment via imoje to WooCommerce
    6 Version: 4.7.2
     6Version: 4.8.0
    77Author: imoje <kontakt.tech@imoje.pl>
    88Author URI: https://imoje.pl
     
    1212use Imoje\Payment\Api;
    1313use Imoje\Payment\Util;
     14use Automattic\WooCommerce\Blocks\Utils\CartCheckoutUtils;
    1415
    1516const WOOCOMMERCE_IMOJE_PLUGIN_DIR = __FILE__;
     
    3536    require_once( 'includes/gateway/WC_Gateway_Imoje_Abstract.php' );
    3637    require_once( 'includes/gateway/WC_Gateway_Imoje_Api_Abstract.php' );
     38    require_once('includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php');
    3739
    3840    foreach ( imoje_get_gateways() as $method ) {
     
    4042    }
    4143
     44    add_action( 'before_woocommerce_init', function() {
     45        if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
     46            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
     47        }
     48    } );
     49
    4250    add_filter( 'woocommerce_payment_gateways', 'imoje_add_gateways' );
     51
     52    if (CartCheckoutUtils::is_checkout_block_default() ) {
     53        add_action('woocommerce_blocks_payment_method_type_registration', function($payment_method_registry) {
     54                $payment_method_registry->register(new WC_Gateway_Imoje_RestApi_Blocks());
     55        });
     56    }
     57
     58
     59
    4360}
    4461
Note: See TracChangeset for help on using the changeset viewer.