Plugin Directory

Changeset 3284131


Ignore:
Timestamp:
04/29/2025 01:19:34 PM (11 months ago)
Author:
imoje
Message:

v4.9.0

Location:
imoje/trunk
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • imoje/trunk/includes/Helper.php

    r3091413 r3284131  
    327327
    328328    /**
    329      * @param string $service_id
    330      * @param string $service_key
    331      * @param string $debug_mode
    332      *
    333      * @throws Exception
    334      */
    335     public static function check_notification( $service_id, $service_key, $debug_mode ) {
    336         $notification = new Notification(
    337             $service_id,
    338             $service_key,
    339             self::check_is_config_value_selected( $debug_mode )
    340         );
    341 
    342         // it can be order data or notification code - depends on verification notification
    343         $result_check_request_notification = $notification->checkRequest();
    344 
    345         if ( is_int( $result_check_request_notification ) ) {
    346             echo $notification->formatResponse( Notification::NS_ERROR, $result_check_request_notification );
    347             exit();
    348         }
    349 
    350         if ( ! ( $order = wc_get_order( $result_check_request_notification['transaction']['orderId'] ) ) ) {
    351 
    352             echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_ORDER_NOT_FOUND );
    353             exit();
    354         }
    355 
    356         $order_status = $order->get_status();
    357 
    358         if ( $result_check_request_notification['transaction']['type'] === Notification::TRT_REFUND ) {
    359 
    360             if ( $result_check_request_notification['transaction']['status'] !== Notification::TRS_SETTLED ) {
    361                 echo $notification->formatResponse( Notification::NS_OK, Notification::NC_IMOJE_REFUND_IS_NOT_SETTLED );
    362 
    363                 exit();
    364             }
    365 
    366             if ( $order_status === 'refunded' ) {
    367                 echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_ORDER_STATUS_IS_INVALID_FOR_REFUND );
    368                 exit();
    369             }
    370 
    371             $refund = wc_create_refund( [
    372                 'amount'         => Util::convertAmountToMain( $result_check_request_notification['transaction']['amount'] ),
    373                 'reason'         => 'imoje API',
    374                 'order_id'       => $result_check_request_notification['transaction']['orderId'],
    375                 'refund_payment' => true,
    376             ] );
    377 
    378             if ( $refund->errors ) {
    379 
    380                 echo $notification->formatResponse( Notification::NS_ERROR );
    381                 exit();
    382             }
    383 
    384             $order->add_order_note(
    385                 sprintf(
    386                     __( 'Refund for amount %s with UUID %s has been correctly processed.', 'imoje' ),
    387                     $result_check_request_notification['transaction']['amount'],
    388                     $result_check_request_notification['transaction']['id']
    389                 )
    390             );
    391 
    392             echo $notification->formatResponse( Notification::NS_OK );
    393             exit;
    394         }
    395 
    396         if ( $order_status === 'completed' || $order_status === 'processing' ) {
    397 
    398             echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_INVALID_ORDER_STATUS );
    399             exit();
    400         }
    401 
    402         if ( ! Notification::checkRequestAmount(
    403             $result_check_request_notification,
    404             Util::convertAmountToFractional( $order->data['total'] ),
    405             $order->data['currency']
    406         ) ) {
    407 
    408             echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_AMOUNT_NOT_MATCH );
    409             exit();
    410         }
    411 
    412         $transactionStatuses = Util::getTransactionStatuses();
    413 
    414         if ( ! isset( $transactionStatuses[ $result_check_request_notification['transaction']['status'] ] ) ) {
    415             echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_UNHANDLED_STATUS );
    416             exit;
    417         }
    418 
    419         switch ( $result_check_request_notification['transaction']['status'] ) {
    420             case Notification::TRS_SETTLED:
    421 
    422                 $order->update_status( $order->needs_processing()
    423                     ? 'processing'
    424                     : 'completed',
    425                     __( 'Transaction reference', 'imoje' ) . ': ' . $result_check_request_notification['transaction']['id'] );
    426 
    427                 $order->update_meta_data( 'imoje_transaction_uuid', $result_check_request_notification['transaction']['id'] );
    428                 $order->save_meta_data();
    429 
    430                 echo $notification->formatResponse( Notification::NS_OK );
    431                 exit;
    432             case Notification::TRS_REJECTED:
    433                 $order->update_status( 'failed' );
    434                 $order->add_order_note( __( 'Transaction reference', 'imoje' ) . ': ' . $result_check_request_notification['transaction']['id'] );
    435                 echo $notification->formatResponse( Notification::NS_OK );
    436                 exit;
    437             default:
    438                 echo $notification->formatResponse( Notification::NS_OK, Notification::NC_UNHANDLED_STATUS );
    439                 exit;
    440         }
    441     }
    442 
    443     /**
    444329     * @param int    $order_id
    445330     * @param string $authorization_token
  • imoje/trunk/includes/gateway/WC_Gateway_Imoje_Abstract.php

    r3205609 r3284131  
    22
    33use Imoje\Payment\Util;
     4use Imoje\Payment\Notification;
    45
    56/**
     
    129130                true
    130131            ),
    131             WC_Gateway_ImojeInstallments::PAYMENT_METHOD_NAME         => Helper::get_gateway_details(
     132            WC_Gateway_ImojeInstallments::PAYMENT_METHOD_NAME => Helper::get_gateway_details(
    132133                __( 'imoje - installments', 'imoje' ),
    133134                __( 'imoje installments', 'imoje' ),
    134135                __( 'imoje installments', 'imoje' ),
     136                false
     137            ),
     138            WC_Gateway_ImojeWallet::PAYMENT_METHOD_NAME       => Helper::get_gateway_details(
     139                __( 'imoje - electronic wallet', 'imoje' ),
     140                __( 'Electronic wallet', 'imoje' ),
     141                __( 'Pay with electronic wallet via imoje.', 'imoje' ),
    135142                false
    136143            ),
     
    233240                'type'    => 'checkbox',
    234241                'label'   => __( 'Enable', 'imoje' ),
    235                 'default' => 'no',
    236             ],
    237             'debug_mode'              => [
    238                 'title'   => __( 'Debug mode', 'imoje' ),
    239                 'type'    => 'checkbox',
    240                 'label'   => __( 'Enable debug mode', 'imoje' ),
    241242                'default' => 'no',
    242243            ],
     
    359360    public function process_notification() {
    360361
    361         Helper::check_notification(
     362        $notification = new Notification(
    362363            $this->get_option( 'service_id' ),
    363             $this->get_option( 'service_key' ),
    364             $this->get_option( 'debug_mode' )
     364            $this->get_option( 'service_key' )
    365365        );
     366
     367        // it can be order data or notification code - depends on verification notification
     368        $result_check_request_notification = $notification->checkRequest();
     369
     370        if ( is_int( $result_check_request_notification ) ) {
     371            echo $notification->formatResponse( Notification::NS_ERROR, $result_check_request_notification );
     372            exit();
     373        }
     374
     375        if ( ! ( $order = wc_get_order( $result_check_request_notification['transaction']['orderId'] ) ) ) {
     376
     377            echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_ORDER_NOT_FOUND );
     378            exit();
     379        }
     380
     381        $order_status = $order->get_status();
     382
     383        if ( $result_check_request_notification['transaction']['type'] === Notification::TRT_REFUND ) {
     384
     385            if ( $result_check_request_notification['transaction']['status'] !== Notification::TRS_SETTLED ) {
     386                echo $notification->formatResponse( Notification::NS_OK, Notification::NC_IMOJE_REFUND_IS_NOT_SETTLED );
     387
     388                exit();
     389            }
     390
     391            if ( $order_status === 'refunded' ) {
     392                echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_ORDER_STATUS_IS_INVALID_FOR_REFUND );
     393                exit();
     394            }
     395
     396            $refund = wc_create_refund( [
     397                'amount'         => Util::convertAmountToMain( $result_check_request_notification['transaction']['amount'] ),
     398                'reason'         => 'imoje API',
     399                'order_id'       => $result_check_request_notification['transaction']['orderId'],
     400                'refund_payment' => true,
     401            ] );
     402
     403            if ( $refund->errors ) {
     404
     405                echo $notification->formatResponse( Notification::NS_ERROR );
     406                exit();
     407            }
     408
     409            $order->add_order_note(
     410                sprintf(
     411                    __( 'Refund for amount %s with UUID %s has been correctly processed.', 'imoje' ),
     412                    $result_check_request_notification['transaction']['amount'],
     413                    $result_check_request_notification['transaction']['id']
     414                )
     415            );
     416
     417            echo $notification->formatResponse( Notification::NS_OK );
     418            exit;
     419        }
     420
     421        if ( $order_status === 'completed' || $order_status === 'processing' ) {
     422
     423            echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_INVALID_ORDER_STATUS );
     424            exit();
     425        }
     426
     427        if ( ! Notification::checkRequestAmount(
     428            $result_check_request_notification,
     429            Util::convertAmountToFractional( $order->data['total'] ),
     430            $order->data['currency']
     431        ) ) {
     432
     433            echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_AMOUNT_NOT_MATCH );
     434            exit();
     435        }
     436
     437        $transactionStatuses = Util::getTransactionStatuses();
     438
     439        if ( ! isset( $transactionStatuses[ $result_check_request_notification['transaction']['status'] ] ) ) {
     440            echo $notification->formatResponse( Notification::NS_ERROR, Notification::NC_UNHANDLED_STATUS );
     441            exit;
     442        }
     443
     444        switch ( $result_check_request_notification['transaction']['status'] ) {
     445            case Notification::TRS_SETTLED:
     446
     447                $order->update_status( $order->needs_processing()
     448                    ? 'processing'
     449                    : 'completed',
     450                    __( 'Transaction reference', 'imoje' ) . ': ' . $result_check_request_notification['transaction']['id'] );
     451
     452                if ( Helper::check_is_config_value_selected( $this->get_option( 'override_method_name' ) ) && $order->get_payment_method() !== $this->payment_method_name && $order->get_payment_method_title() !== $this->get_payment_method_data( 'display_name' ) ) {
     453
     454                    $order->set_payment_method( $this->payment_method_name );
     455                    $order->set_payment_method_title( $this->get_payment_method_data( 'display_name' ) );
     456                    $order->save();
     457                };
     458
     459                $order->update_meta_data( 'imoje_transaction_uuid', $result_check_request_notification['transaction']['id'] );
     460                $order->save_meta_data();
     461
     462                echo $notification->formatResponse( Notification::NS_OK );
     463                exit;
     464            case Notification::TRS_REJECTED:
     465                $order->update_status( 'failed' );
     466                $order->add_order_note( __( 'Transaction reference', 'imoje' ) . ': ' . $result_check_request_notification['transaction']['id'] );
     467                echo $notification->formatResponse( Notification::NS_OK );
     468                exit;
     469            default:
     470                echo $notification->formatResponse( Notification::NS_OK, Notification::NC_UNHANDLED_STATUS );
     471                exit;
     472        }
    366473    }
    367474
  • imoje/trunk/includes/gateway/WC_Gateway_Imoje_Api_Abstract.php

    r3272390 r3284131  
    266266        $payment_method_list_online    = [];
    267267        $payment_method_list_no_online = [];
     268        $pm_wallet                     = Util::getPaymentMethod( 'wallet' );
     269        $pmc_gpay                      = Util::getPaymentMethodCode( 'gpay' );
     270        $pmc_applepay                  = Util::getPaymentMethodCode( 'applepay' );
     271        $pmc_blik                      = Util::getPaymentMethodCode( 'blik' );
    268272
    269273        foreach ( $this->imoje_service['paymentMethods'] as $payment_method ) {
     
    272276                 || strtolower( $payment_method['currency'] ) !== strtolower( $currency_iso_code )
    273277                 || ! in_array( $payment_method['paymentMethod'], $pm )
     278                 || $this->check_payment_method_with_inclusions( $payment_method['paymentMethod'], $payment_method['paymentMethodCode'], $pm_wallet, [ $pmc_gpay, $pmc_applepay ] )
     279                 || $this->check_payment_method_with_inclusions( $payment_method['paymentMethod'], $payment_method['paymentMethodCode'], $pm_blik, [ $pmc_blik ] )
    274280            ) {
    275281                continue;
     
    498504    protected function prepare_payment_methods_block_checkout( $payment_method_name ) {
    499505        $child_payment_method_name = static::PAYMENT_METHOD_NAME;
    500         $currencies                = get_option( "woocommerce_{$child_payment_method_name}_settings", [] )['currencies'] ?? [];
    501         $cart_total                = WC()->cart->get_cart_contents_total();
     506        $settings                  = get_option( "woocommerce_" . $child_payment_method_name . "_settings" );
     507        $currencies                = ( is_array( $settings ) && isset( $settings['currencies'] ) )
     508            ? $settings['currencies']
     509            : [];
     510        $cart_total                = WC()->cart->get_cart_contents_total() + WC()->cart->get_cart_contents_tax();
    502511
    503512        if ( ! is_array( $currencies ) ) {
     
    520529
    521530        $prepared_methods = [];
    522         foreach ( $filtered_methods as $key => $paymentMethod ) {
    523             $prepared_methods[ $key ] = $this->get_payment_channel_to_array( $paymentMethod, $cart_total, true );
     531        $wallet           = Util::getPaymentMethod( 'wallet' );
     532        $pmc_gpay         = Util::getPaymentMethodCode( 'gpay' );
     533        $pmc_applepay     = Util::getPaymentMethodCode( 'applepay' );
     534        $pm_blik          = Util::getPaymentMethod( 'blik' );
     535        $pmc_blik         = Util::getPaymentMethodCode( 'blik' );
     536
     537        foreach ( $filtered_methods as $key => $payment_method ) {
     538
     539            if ( $this->check_payment_method_with_inclusions( $payment_method['paymentMethod'], $payment_method['paymentMethodCode'], $wallet, [ $pmc_gpay, $pmc_applepay ] )
     540                 || $this->check_payment_method_with_inclusions( $payment_method['paymentMethod'], $payment_method['paymentMethodCode'], $pm_blik, [ $pmc_blik ] ) ) {
     541                continue;
     542            }
     543
     544            $prepared_methods[ $key ] = $this->get_payment_channel_to_array( $payment_method, $cart_total, true );
    524545        }
    525546
    526547        return $prepared_methods;
    527548    }
     549
     550    /**
     551     * @param string $payment_method
     552     * @param string $payment_method_code
     553     * @param string $expected_method
     554     * @param array  $excluded_payment_method_codes
     555     *
     556     * @return bool
     557     */
     558    private function check_payment_method_with_inclusions( $payment_method, $payment_method_code, $expected_method, $excluded_payment_method_codes ) {
     559        return $payment_method === $expected_method
     560               && ! in_array( $payment_method_code, $excluded_payment_method_codes );
     561    }
    528562}
  • imoje/trunk/includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php

    r3269477 r3284131  
    5252            $this->enqueue_imoje_visa_payment_script();
    5353            $this->enqueue_imoje_installments_payment_script();
     54            $this->enqueue_imoje_wallet_payment_script();
    5455        }
    5556    }
     
    104105            'imoje_blik_js_object',
    105106            [
    106                 'name_blik'            => 'imoje_blik',
     107                'name_blik'            => WC_Gateway_ImojeBlik::PAYMENT_METHOD_NAME,
    107108                'logo_blik'            => plugins_url( '../../assets/images/imoje_blik.png', __FILE__ ),
    108109                'logo_blik_oneclick'   => '',
     
    134135            'imoje_js_object',
    135136            [
    136                 'name_imoje'     => 'imoje',
     137                'name_imoje'     => WC_Gateway_Imoje::PAYMENT_METHOD_NAME,
    137138                'logo_imoje'     => plugins_url( '../../assets/images/imoje.png', __FILE__ ),
    138139                'settings_imoje' => get_option( 'woocommerce_imoje_settings', [] ),
     
    156157        );
    157158
    158         $imojePaylater   = new WC_Gateway_ImojePaylater();
     159        $imojePaylater = new WC_Gateway_ImojePaylater();
    159160
    160161        wp_localize_script(
     
    162163            'imoje_paylater_js_object',
    163164            [
    164                 'name_paylater'            => 'imoje_paylater',
     165                'name_paylater'            => WC_Gateway_ImojePaylater::PAYMENT_METHOD_NAME,
    165166                'logo_paylater'            => plugins_url( '../../assets/images/imoje_paylater.png', __FILE__ ),
    166167                'settings_paylater'        => get_option( 'woocommerce_imoje_paylater_settings', [] ),
     
    190191            'imoje_cards_js_object',
    191192            [
    192                 'name_cards'     => 'imoje_cards',
     193                'name_cards'     => WC_Gateway_ImojeCards::PAYMENT_METHOD_NAME,
    193194                'logo_cards'     => plugins_url( '../../assets/images/imoje_cards.png', __FILE__ ),
    194195                'settings_cards' => get_option( 'woocommerce_imoje_cards_settings', [] ),
     
    212213        );
    213214
    214         $imojePbl        = new WC_Gateway_ImojePbl;
     215        $imojePbl = new WC_Gateway_ImojePbl;
    215216
    216217        wp_localize_script(
     
    218219            'imoje_pbl_js_object',
    219220            [
    220                 'name_pbl'            => 'imoje_pbl',
     221                'name_pbl'            => WC_Gateway_ImojePbl::PAYMENT_METHOD_NAME,
    221222                'logo_pbl'            => plugins_url( '../../assets/images/imoje_pbl.png', __FILE__ ),
    222223                'settings_pbl'        => get_option( 'woocommerce_imoje_pbl_settings', [] ),
     
    245246            'imoje_visa_js_object',
    246247            [
    247                 'name_visa'     => 'imoje_visa',
     248                'name_visa'     => WC_Gateway_ImojeVisa::PAYMENT_METHOD_NAME,
    248249                'logo_visa'     => plugins_url( '../../assets/images/imoje_visa.png', __FILE__ ),
    249250                'settings_visa' => get_option( 'woocommerce_imoje_visa_settings', [] ),
     
    273274            'imoje_installments_js_object',
    274275            [
    275                 'name_installments'     => 'imoje_installments',
     276                'name_installments'     => WC_Gateway_ImojeInstallments::PAYMENT_METHOD_NAME,
    276277                'logo_installments'     => plugins_url( '../../assets/images/imoje_installments.png', __FILE__ ),
    277278                'settings_installments' => get_option( 'woocommerce_imoje_installments_settings', [] ),
    278279                'calculator_data'       => $imojeInstallments->get_calculator_data(),
     280            ]
     281        );
     282    }
     283
     284    /**
     285     * @return void
     286     */
     287    private function enqueue_imoje_wallet_payment_script() {
     288        wp_enqueue_script(
     289            'imoje-wallet-payment-block',
     290            plugins_url( '../../assets/js/checkout/imoje-wallet-block.min.js', __FILE__ ),
     291            [
     292                'wp-element',
     293                'wc-blocks-registry',
     294            ],
     295            '1.0.0',
     296            true
     297        );
     298
     299        $imojeWallet = new WC_Gateway_ImojeWallet();
     300
     301        wp_localize_script(
     302            'imoje-wallet-payment-block',
     303            'imoje_wallet_js_object',
     304            [
     305                'name_wallet'            => WC_Gateway_ImojeWallet::PAYMENT_METHOD_NAME,
     306                'logo_wallet'            => plugins_url( '../../assets/images/imoje_wallet.png', __FILE__ ),
     307                'settings_wallet'        => get_option( 'woocommerce_imoje_wallet_settings', [] ),
     308                'payment_methods_wallet' => $this->get_block_checkout_tooltip( $imojeWallet->get_payment_channels() ),
    279309            ]
    280310        );
  • imoje/trunk/includes/libs/payment-core/src/Notification.php

    r3116816 r3284131  
    196196
    197197    /**
    198      * @var string
    199      */
    200     private $isDebugMode = '';
    201 
    202     /**
    203198     * @var string|bool
    204199     */
     
    210205     * @param string $serviceId
    211206     * @param string $serviceKey
    212      * @param bool   $isDebugMode
    213      */
    214     public function __construct($serviceId, $serviceKey, $isDebugMode, $orderArrangement = false)
     207     */
     208    public function __construct($serviceId, $serviceKey, $orderArrangement = false)
    215209    {
    216210        $this->serviceId = $serviceId;
    217211        $this->serviceKey = $serviceKey;
    218         $this->isDebugMode = $isDebugMode;
    219212
    220213        if($orderArrangement) {
     
    237230        ];
    238231
    239         if($this->isDebugMode && $code) {
     232        if($code) {
    240233            $response['data'] = [
    241234                'code' => $code,
  • imoje/trunk/includes/libs/payment-core/src/Util.php

    r3116816 r3284131  
    9797        'ing'                => 'ing',
    9898        'imoje_installments' => 'imoje_installments',
     99        'wallet'             => 'wallet',
    99100    ];
    100101
     
    136137        'inbank'         => 'inbank',
    137138        'inbank_0'       => 'inbank_0',
     139        'applepay'       => 'applepay',
     140        'gpay'           => 'gpay',
    138141    ];
    139142
     
    165168        'pragma_go'      => 'pragma_go.svg',
    166169        'blik_paylater'  => 'blik_paylater.png',
     170        'applepay'       => 'applepay.png',
     171        'gpay'           => 'gpay.png',
    167172    ];
    168173
  • imoje/trunk/langs/imoje-pl_PL.po

    r3269477 r3284131  
    22msgstr ""
    33"Project-Id-Version: \n"
    4 "POT-Creation-Date: 2025-03-04 10:46+0100\n"
    5 "PO-Revision-Date: 2025-03-04 11:11+0100\n"
     4"POT-Creation-Date: 2025-04-04 10:35+0200\n"
     5"PO-Revision-Date: 2025-04-04 10:38+0200\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.5\n"
     14"X-Generator: Poedit 3.2.2\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:49
    60 #: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:374
     59#: includes/gateway/WC_Gateway_ImojeBlik.php:45
     60#: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:379
    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:171
     64#: includes/gateway/WC_Gateway_ImojeBlik.php:165
    6565msgid "Display field"
    6666msgstr "Wyświetlaj pole"
    6767
    68 #: includes/gateway/WC_Gateway_ImojeBlik.php:174
     68#: includes/gateway/WC_Gateway_ImojeBlik.php:168
    6969msgid "Display field on the checkout"
    7070msgstr "Wyświetlanie pola BLIK na stronie sklepu"
     
    152152msgstr "imoje raty"
    153153
    154 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:185
     154#: includes/gateway/WC_Gateway_Imoje_Abstract.php:138
     155msgid "imoje - electronic wallet"
     156msgstr "imoje - portfel elektroniczny"
     157
     158#: includes/gateway/WC_Gateway_Imoje_Abstract.php:139
     159msgid "Electronic wallet"
     160msgstr "Portfel elektroniczny"
     161
     162#: includes/gateway/WC_Gateway_Imoje_Abstract.php:140
     163msgid "Pay with electronic wallet via imoje."
     164msgstr "Płać portfelem elektronicznym z imoje"
     165
     166#: includes/gateway/WC_Gateway_Imoje_Abstract.php:191
    155167msgid "ING Lease Now"
    156168msgstr "ING Lease Now"
    157169
    158 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:188
    159 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:234
    160 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:259
     170#: includes/gateway/WC_Gateway_Imoje_Abstract.php:194
     171#: includes/gateway/WC_Gateway_Imoje_Abstract.php:240
     172#: includes/gateway/WC_Gateway_Imoje_Abstract.php:265
    161173msgid "Enable"
    162174msgstr "Włącz"
    163175
    164 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:221
     176#: includes/gateway/WC_Gateway_Imoje_Abstract.php:227
    165177msgid "Sandbox is enabled"
    166178msgstr "Tryb sandbox jest włączony"
    167179
    168 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:226
     180#: includes/gateway/WC_Gateway_Imoje_Abstract.php:232
    169181msgid "Hint"
    170182msgstr "Wskazówka"
    171183
    172 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:229
     184#: includes/gateway/WC_Gateway_Imoje_Abstract.php:235
    173185msgid ""
    174186"The module requires a configuration in the imoje administration panel. <br/> "
     
    184196"opisane poniżej."
    185197
    186 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:232
     198#: includes/gateway/WC_Gateway_Imoje_Abstract.php:238
    187199msgid "Enable / Disable"
    188200msgstr "Włącz / Wyłącz"
    189201
    190 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:238
     202#: includes/gateway/WC_Gateway_Imoje_Abstract.php:244
    191203msgid "Debug mode"
    192204msgstr "Tryb debugowania"
    193205
    194 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:240
     206#: includes/gateway/WC_Gateway_Imoje_Abstract.php:246
    195207msgid "Enable debug mode"
    196208msgstr "Włącz tryb debugowania"
    197209
    198 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:244
     210#: includes/gateway/WC_Gateway_Imoje_Abstract.php:250
    199211msgid "Sandbox"
    200212msgstr "Tryb sandbox"
    201213
    202 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:247
     214#: includes/gateway/WC_Gateway_Imoje_Abstract.php:253
    203215msgid "Enable sandbox"
    204216msgstr "Włącz tryb sandbox"
    205217
    206 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:250
     218#: includes/gateway/WC_Gateway_Imoje_Abstract.php:256
    207219msgid "Display brand"
    208220msgstr "Wyświetlanie loga"
    209221
    210 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:253
     222#: includes/gateway/WC_Gateway_Imoje_Abstract.php:259
    211223msgid "Hide brand"
    212224msgstr "Ukryj logo"
    213225
    214 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:256
     226#: includes/gateway/WC_Gateway_Imoje_Abstract.php:262
    215227msgid "ING Księgowość"
    216228msgstr "ING Księgowość"
    217229
    218 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:262
     230#: includes/gateway/WC_Gateway_Imoje_Abstract.php:268
    219231msgid "Payment title"
    220232msgstr "Nazwa metody płatności"
    221233
    222 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:267
     234#: includes/gateway/WC_Gateway_Imoje_Abstract.php:273
    223235msgid "Description"
    224236msgstr "Opis"
    225237
    226 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:269
     238#: includes/gateway/WC_Gateway_Imoje_Abstract.php:275
    227239msgid "Text that users will see on checkout"
    228240msgstr "Ten tekst zobaczą użytkownicy na podsumowaniu zamówienia"
    229241
    230 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:274
     242#: includes/gateway/WC_Gateway_Imoje_Abstract.php:280
    231243msgid "Merchant ID"
    232244msgstr "Identyfikator klienta"
    233245
    234 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:279
     246#: includes/gateway/WC_Gateway_Imoje_Abstract.php:285
    235247msgid "Service ID"
    236248msgstr "Identyfikator sklepu"
    237249
    238 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:284
     250#: includes/gateway/WC_Gateway_Imoje_Abstract.php:290
    239251msgid "Service Key"
    240252msgstr "Klucz sklepu"
    241253
    242 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:289
     254#: includes/gateway/WC_Gateway_Imoje_Abstract.php:295
    243255msgid "Authorization token"
    244256msgstr "Token autoryzacyjny"
    245257
    246 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:294
     258#: includes/gateway/WC_Gateway_Imoje_Abstract.php:300
    247259msgid "Currency"
    248260msgstr "Waluta"
    249261
    250 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:300
     262#: includes/gateway/WC_Gateway_Imoje_Abstract.php:306
    251263msgid "Meta name for VAT"
    252264msgstr "Nazwa meta dla pola NIP"
    253265
    254 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:324
     266#: includes/gateway/WC_Gateway_Imoje_Abstract.php:330
    255267msgid "Refund amount must be higher than 0"
    256268msgstr "Kwota zwrotu musi być większa od 0"
    257269
    258 #: includes/gateway/WC_Gateway_Imoje_Abstract.php:409
     270#: includes/gateway/WC_Gateway_Imoje_Abstract.php:415
    259271msgid "You must insert exactly 6 numbers as BLIK code!"
    260272msgstr "Musisz wprowadzić dokładnie 6 cyfr jako kod BLIK!"
     
    268280msgstr "Sklep jest nieaktywny w imoje"
    269281
    270 #: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:274
     282#: includes/gateway/WC_Gateway_Imoje_Api_Abstract.php:280
    271283msgid "No payment channel available. Choose another payment method."
    272284msgstr "Brak dostępnego kanału płatności. Wybierz inną metodę płatności."
    273285
    274 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:75
    275 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:114
     286#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:81
    276287#: includes/templates/regulation.php:17
    277288msgid "Regulations of imoje"
    278289msgstr "Regulamin imoje"
    279290
    280 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:76
    281 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:115
     291#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:82
    282292#: includes/templates/regulation.php:22
    283293msgid "Information on personal data imoje"
    284294msgstr "Informację o danych osobowych imoje"
    285295
    286 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:77
    287 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:116
     296#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:83
    288297msgid "I declare that I have read and accept {regulation} and {iodo}."
    289298msgstr "Oświadczam, że zapoznałem się i akceptuję {regulation} i {iodo}."
    290299
    291 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:79
     300#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:85
    292301#: includes/templates/payment_method_list.php:14
    293302msgid ""
     
    298307"inną metodę płatności"
    299308
    300 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:110
     309#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:119
    301310msgid "Enter the correct 6-digit BLIK code."
    302311msgstr "Wprowadź prawidłowy 6-cyfrowy kod BLIK."
    303312
    304 #: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:180
     313#: includes/gateway_block/WC_Gateway_Imoje_RestApi_Blocks.php:183
    305314#: includes/templates/twisto/regulation.php:10
    306315msgid ""
     
    345354msgstr "Metoda płatności jest niedostępna, wybierz inną."
    346355
    347 #: woocommerce-imoje.php:243
     356#: woocommerce-imoje.php:244
    348357msgid "Transaction could not be initialized, error: "
    349358msgstr "Transakcja nie mogła zostać zainicjowana, błędy: "
    350359
    351 #: woocommerce-imoje.php:420
     360#: woocommerce-imoje.php:421
    352361msgid "Insert BLIK code."
    353362msgstr "Wprowadź kod BLIK."
    354363
    355 #: woocommerce-imoje.php:421
     364#: woocommerce-imoje.php:422
    356365msgid "Please try again."
    357366msgstr "Proszę spróbować ponownie."
    358367
    359 #: woocommerce-imoje.php:425 woocommerce-imoje.php:484
     368#: woocommerce-imoje.php:426 woocommerce-imoje.php:485
    360369msgid "Payment failed."
    361370msgstr "Płatność nieudana."
    362371
    363 #: woocommerce-imoje.php:427
     372#: woocommerce-imoje.php:428
    364373msgid ""
    365374"Technical break in your bank. Pay later or use another bank's application."
     
    368377"innego banku."
    369378
    370 #: woocommerce-imoje.php:429
     379#: woocommerce-imoje.php:430
    371380msgid "Alias not found. To proceed the payment you need to pay with BLIK code."
    372381msgstr ""
     
    374383"BLIK."
    375384
    376 #: woocommerce-imoje.php:432
     385#: woocommerce-imoje.php:433
    377386msgid "Alias declined. To proceed the payment you need to pay with BLIK code."
    378387msgstr ""
    379388"Alias został odrzucony. Aby kontynuować płatność należy zapłacić kodem BLIK."
    380389
    381 #: woocommerce-imoje.php:434
     390#: woocommerce-imoje.php:435
    382391msgid "You have entered wrong BLIK code."
    383392msgstr "Wprowadziłeś błędny kod BLIK."
    384393
    385 #: woocommerce-imoje.php:437
     394#: woocommerce-imoje.php:438
    386395msgid "BLIK code expired."
    387396msgstr "Kod BLIK stracił ważność."
    388397
    389 #: woocommerce-imoje.php:441
     398#: woocommerce-imoje.php:442
    390399msgid "Something went wrong with BLIK code."
    391400msgstr "Coś poszło nie tak z kodem BLIK."
    392401
    393 #: woocommerce-imoje.php:444
     402#: woocommerce-imoje.php:445
    394403msgid "Payment declined at the banking application."
    395404msgstr "Płatność została odrzucona w aplikacji bankowej."
    396405
    397 #: woocommerce-imoje.php:448
     406#: woocommerce-imoje.php:449
    398407msgid "Payment failed - not confirmed on time in the banking application."
    399408msgstr ""
    400409"Płatność nie powiodła się - nie potwierdzono na czas w aplikacji bankowej."
    401410
    402 #: woocommerce-imoje.php:451
     411#: woocommerce-imoje.php:452
    403412msgid "Inserted wrong PIN code in banking application."
    404413msgstr "Wprowadzono błędny kod PIN w aplikacji bankowej."
    405414
    406 #: woocommerce-imoje.php:454
     415#: woocommerce-imoje.php:455
    407416msgid "Payment failed (security)."
    408417msgstr "Płatność nie powiodła się (bezpieczeństwo)."
    409418
    410 #: woocommerce-imoje.php:457
     419#: woocommerce-imoje.php:458
    411420msgid "Limit exceeded in your banking application."
    412421msgstr "Przekroczono limit w Twojej aplikacji bankowej."
    413422
    414 #: woocommerce-imoje.php:460
     423#: woocommerce-imoje.php:461
    415424msgid "Insufficient funds in your bank account."
    416425msgstr "Niewystarczające środki na Twoim koncie bankowym."
    417426
    418 #: woocommerce-imoje.php:463
     427#: woocommerce-imoje.php:464
    419428msgid "Issuer declined."
    420429msgstr "Odmowa issuera."
    421430
    422 #: woocommerce-imoje.php:466
     431#: woocommerce-imoje.php:467
    423432msgid "Transaction not found."
    424433msgstr "Transakcja nie została znaleziona."
    425434
    426 #: woocommerce-imoje.php:469
     435#: woocommerce-imoje.php:470
    427436msgid "Bad IBAN."
    428437msgstr "Zły IBAN."
    429438
    430 #: woocommerce-imoje.php:472
     439#: woocommerce-imoje.php:473
    431440msgid "Transfer not possible."
    432441msgstr "Transfer nie jest możliwy."
    433442
    434 #: woocommerce-imoje.php:475
     443#: woocommerce-imoje.php:476
    435444msgid "Return late."
    436445msgstr "Zwrot za późno."
    437446
    438 #: woocommerce-imoje.php:478
     447#: woocommerce-imoje.php:479
    439448msgid "Return amount exceeded."
    440449msgstr "Przekroczona kwota zwrotu."
    441450
    442 #: woocommerce-imoje.php:481
     451#: woocommerce-imoje.php:482
    443452msgid "Transfer late."
    444453msgstr "Transfer za późno."
  • imoje/trunk/readme.txt

    r3272390 r3284131  
    22Contributors: imoje
    33Tags: imoje, woocommerce, payments, payment gateway, checkout
    4 Tested up to: 6.7.2
     4Tested up to: 6.8.0
    55Requires PHP: 5.6.0
    66License: GPLv2
    7 Stable tag: 4.8.2
     7Stable tag: 4.9.0
    88
    99Add payment via imoje to WooCommerce
     
    7373
    7474== Changelog ==
     75= 4.9.0 =
     76* added Electronic wallet payment method
     77* minor fixes
    7578= 4.8.2 =
    7679* fixed an issue with repayment of unpaid orders
  • imoje/trunk/woocommerce-imoje.php

    r3272390 r3284131  
    44Plugin URI: https://imoje.pl
    55Description: Add payment via imoje to WooCommerce
    6 Version: 4.8.2
     6Version: 4.9.0
    77Author: imoje <kontakt.tech@imoje.pl>
    88Author URI: https://imoje.pl
     
    2828    }
    2929
    30     @include_once __DIR__ . "/includes/libs/payment-core/vendor/autoload.php";
    31     @include_once __DIR__ . "/includes/libs/Payment-core/vendor/autoload.php";
     30    $pathToAutoload = __DIR__ . "/includes/libs/payment-core/vendor/autoload.php";
     31
     32    if (file_exists($pathToAutoload)) {
     33        include_once $pathToAutoload;
     34    } else {
     35        include_once __DIR__ . "/includes/libs/Payment-core/vendor/autoload.php";
     36    }
     37
    3238    @include_once __DIR__ . "/includes/Helper.php";
    3339
     
    6975        'WC_Gateway_ImojeVisa',
    7076        'WC_Gateway_ImojeInstallments',
     77        'WC_Gateway_ImojeWallet',
    7178    ];
    7279}
Note: See TracChangeset for help on using the changeset viewer.