Plugin Directory

Changeset 3194833


Ignore:
Timestamp:
11/22/2024 10:19:44 AM (17 months ago)
Author:
locbt
Message:

Tagging version 1.0.6

Location:
payos/tags/1.0.6
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • payos/tags/1.0.6

    • Property svn:ignore
      •  

        old new  
        1 deploy.sh
         1*.sh
        22README.md
        3 makepot.sh
        43.git
        54.gitignore
  • payos/tags/1.0.6/assets/js/payos-checkout.js

    r3143315 r3194833  
    6161        if (eventData.type !== "payment_response") return;
    6262        const responseData = eventData.data;
    63         if (responseData?.status === "PAID") {
     63        if (responseData && responseData.status === "PAID") {
    6464          window.removeEventListener("beforeunload", beforeUnloadHandler);
    6565          showUI(content, payos_checkout_data.message, payos_checkout_data.icon);
     66          if (payos_checkout_data.refresh_when_paid === 'yes') {
     67            setInterval(() => {
     68              window.location.reload();
     69            }, 5000);
     70          }
    6671        }
    6772      };
  • payos/tags/1.0.6/classes/class-payos.php

    r3146385 r3194833  
    4949    static private $PAYOS_ORDER_EXIST = 231;
    5050    static private $PAYOS_WEBHOOK_ENDPOINT = "verify_payos_webhook";
    51     static private $payos_default_settings = array(
     51    static public $payos_default_settings = array(
    5252        'use_payment_gateway'         => 'yes',
    5353        'client_id' => '',
     
    6060        ),
    6161        'transaction_prefix' => 'DH',
    62         'redirect' => 'yes',
    6362        'link_webhook' => 'no',
    6463        'gateway_info' => array(
     
    6766            'account_name' => '',
    6867            'bank_name' => ''
    69         )
     68        ),
     69        'refresh_upon_successful_payment' => 'no'
    7070    );
    7171    static private $PAYOS_BLACK_LIST_PREFIX = array("FT", "TF", "TT", "VQR");
     
    210210    public function payos_save_settings_and_reset_webhook()
    211211    {
    212         if (is_array($_REQUEST['payos_gateway_settings'])) {
     212        if (isset($_REQUEST['payos_gateway_settings']) && is_array($_REQUEST['payos_gateway_settings'])) {
    213213            // Sanitize each field
    214             $client_id = sanitize_text_field($_REQUEST['payos_gateway_settings']['client_id']);
    215             $api_key = sanitize_text_field($_REQUEST['payos_gateway_settings']['api_key']);
    216             $checksum_key = sanitize_text_field($_REQUEST['payos_gateway_settings']['checksum_key']);
    217             $transaction_prefix = sanitize_text_field($_REQUEST['payos_gateway_settings']['transaction_prefix']);
     214            $client_id = isset($_REQUEST['payos_gateway_settings']['client_id']) ? sanitize_text_field($_REQUEST['payos_gateway_settings']['client_id']) : '';
     215            $api_key = isset($_REQUEST['payos_gateway_settings']['api_key']) ? sanitize_text_field($_REQUEST['payos_gateway_settings']['api_key']) : '';
     216            $checksum_key = isset($_REQUEST['payos_gateway_settings']['checksum_key']) ? sanitize_text_field($_REQUEST['payos_gateway_settings']['checksum_key']) : '';
     217            $transaction_prefix = isset($_REQUEST['payos_gateway_settings']['transaction_prefix']) ? sanitize_text_field($_REQUEST['payos_gateway_settings']['transaction_prefix']) : '';
     218            $refresh_upon_successful_payment = isset($_REQUEST['payos_gateway_settings']['refresh_upon_successful_payment']) ? $_REQUEST['payos_gateway_settings']['refresh_upon_successful_payment'] : 'no';
    218219
    219220            if (
     
    249250                'transaction_prefix' => $transaction_prefix,
    250251                'order_status' => $sanitized_order_status,
    251                 'link_webhook' => sanitize_text_field($_REQUEST['payos_gateway_settings']['link_webhook'])
     252                'order_status' => $sanitized_order_status,
     253                'link_webhook' => isset($_REQUEST['payos_gateway_settings']['link_webhook']) ? sanitize_text_field($_REQUEST['payos_gateway_settings']['link_webhook']) : 'no',
     254                'refresh_upon_successful_payment' => $refresh_upon_successful_payment
    252255            ));
    253256        }
     
    339342                'id' => [],
    340343                'onclick' => [],
    341                 'class' => []
     344                'class' => [],
     345                'checked' => []
    342346            ],
    343347            'select' => [
     
    462466            $payment_gateway_config .= '</select>
    463467                </td>
    464             </tr>
    465             <tr id="payos_gateway_settings_redirect" valign="top">
    466                 <th scope="row">' . esc_html(__('Redirect payOS:', 'payos')) . '</th>
     468            </tr>';
     469
     470            $payment_gateway_config .= '<tr id="payos_gateway_settings_refresh" valign="top">
     471                <th scope="row">' . esc_html(__('Enable refresh upon successful payment:', 'payos')) . '</th>
    467472                <td id="payos_gateway_settings">
    468                     <input name="payos_gateway_settings[redirect]" type="hidden" value="no">
    469                     <input name="payos_gateway_settings[redirect]" type="checkbox" value="yes" id="redirect" ' . checked($this->payos_gateway_settings['redirect'], 'yes', false) . ' />
    470                     <label for="payos_gateway_settings[redirect]">' . esc_html(__('On/Off', 'payos')) . '</label>
     473                    <input name="payos_gateway_settings[refresh_upon_successful_payment]" type="hidden" value="no">
     474                    <input name="payos_gateway_settings[refresh_upon_successful_payment]" type="checkbox" value="yes" id="refresh" ' . checked($this->payos_gateway_settings['refresh_upon_successful_payment'], 'yes', false) . ' />
     475                    <label for="payos_gateway_settings[refresh_upon_successful_payment]">' . esc_html(__('Enable', 'payos')) . '</label>
    471476                </td>
    472477            </tr>';
     
    486491            'redirect_url' => '',
    487492            'checkout_url' => '',
    488             'status' => isset($attributes['status']) ? $attributes['status'] : 'DEFAULT'
     493            'status' => isset($attributes['status']) ? $attributes['status'] : 'DEFAULT',
     494            'refresh_when_paid' => $this->payos_gateway_settings['refresh_upon_successful_payment']
    489495        );
    490496
     
    501507            $payos_data['icon'] = PAYOS_GATEWAY_URL . '/assets/img/success.png';
    502508            $payos_data['message'] = __('Order has been successfully paid.', 'payos');
     509            $payos_data['refresh_when_paid'] = 'no';
    503510        } elseif ($payos_data['status'] === 'ERROR') {
    504511            $payos_data['icon'] = PAYOS_GATEWAY_URL . '/assets/img/failed.png';
     
    519526        return '<div id="payos-checkout-container"></div>';
    520527    }
    521 
    522528
    523529    public function use_payment_gateway_template(string $status = null, string $checkout_url = null, $order = null)
     
    775781        $txtBody = file_get_contents('php://input');
    776782        $body = json_decode(str_replace('\\', '\\\\', $txtBody), true);
     783        $is_test_webhook = $body['desc'] == 'Giao dich thu nghiem' || $body['data']['description'] == 'VQRIO123' || $body['data']['reference'] == 'MA_GIAO_DICH_THU_NGHIEM';
    777784        try {
    778             if ($body['desc'] == 'Giao dich thu nghiem' || $body['data']['description'] == 'VQRIO123' || $body['data']['reference'] == 'MA_GIAO_DICH_THU_NGHIEM') {
    779                 echo esc_html__('Webhook delivered successfully', 'payos');
    780                 die();
    781             }
    782 
    783785            if ($body['code'] !== self::$PAYOS_SUCCESS) {
    784786                throw new Exception(strval($body['desc']), intval($body['code']));
     
    795797            $signature = $this->create_signature($transaction);
    796798            if (!$body['signature'] || $signature !== $body['signature']) {
    797                 $order->update_status($payos_gateway_settings['order_status']['order_status_after_failed']);
    798                 $order->add_order_note(__('Order has been cancelled', 'payos'));
     799                if (!$is_test_webhook) {
     800                    $order->update_status($payos_gateway_settings['order_status']['order_status_after_failed']);
     801                    $order->add_order_note(__('Order has been cancelled', 'payos'));
     802                }
    799803                throw new Exception(__('Data not integrity', 'payos'));
     804            }
     805            if ($is_test_webhook) {
     806                echo esc_html__('Webhook delivered successfully', 'payos');
     807                die();
    800808            }
    801809            // ---------------------------------------------------------
     
    849857            $logger->error(wc_print_r($body, true), array('error' => $e->getMessage(), 'source' => 'payos-webhook'));
    850858            $response = array('code' => $e->getCode(), 'message' => $e->getMessage());
     859            http_response_code(500);
    851860            echo wp_json_encode($response);
    852861            die();
     
    895904        }
    896905
    897         $logger->warning(__('Webhook creation response did not meet success criteria.', 'payos'), array('source' => 'payos-webhook'));
     906        $logger->warning(__('Webhook creation response did not meet success criteria.', 'payos'), array('source' => 'payos-webhook', 'error' => $response));
    898907        return null;
    899908    }
  • payos/tags/1.0.6/languages/payos-vi.po

    r3146385 r3194833  
    1111"Content-Transfer-Encoding: 8bit\n"
    1212"POT-Creation-Date: 2024-08-19T11:53:04+02:00\n"
    13 "PO-Revision-Date: 2024-09-04 08:08+0000\n"
     13"PO-Revision-Date: 2024-09-20 08:17+0000\n"
    1414"X-Generator: Loco https://localise.biz/\n"
    1515"X-Domain: payos\n"
     
    1919
    2020#. translators: 1: order code, 2: amount, 3: description, 4: account number, 5: reference
    21 #: classes/class-payos.php:854
     21#: classes/class-payos.php:844
    2222msgid ""
    2323"<b>Transaction Information:</b> <br> Order Code: %1$s <br> Amount: %2$s <br> "
     
    2727"Mô tả: %3$s <br> Số tài khoản: %4$s <br > Mã tham chiếu: %5$s"
    2828
    29 #: classes/class-payos.php:383
     29#: classes/class-payos.php:386
    3030msgid "Account name"
    3131msgstr "Tên tài khoản"
    3232
    33 #: classes/class-payos.php:382
     33#: classes/class-payos.php:385
    3434msgid "Account number"
    3535msgstr "Số tài khoản"
    3636
    37 #: classes/class-payos.php:404
     37#: classes/class-payos.php:407
    3838msgid "API Key"
    3939msgstr "API Key"
    4040
    41 #: classes/class-payos.php:630
     41#: classes/class-payos.php:608
    4242msgid "Awaiting payment"
    4343msgstr "Chờ thanh toán"
    4444
    45 #: classes/class-payos.php:384
     45#: classes/class-payos.php:387
    4646msgid "Bank"
    4747msgstr "Ngân hàng"
     
    5151msgstr "Không thể lưu thiết lập! Vui lòng tải lại trang"
    5252
    53 #: classes/class-payos.php:485 classes/class-payos.php:506
     53#: classes/class-payos.php:489 classes/class-payos.php:511
    5454msgid "Cannot show payment link"
    5555msgstr "Không thể hiển thị link thanh toán"
    5656
    57 #: classes/class-payos.php:417
     57#: classes/class-payos.php:420
    5858msgid "Check connection payOS"
    5959msgstr "Kiểm tra kết nối payOS"
    6060
    61 #: classes/class-payos.php:411
     61#: classes/class-payos.php:414
    6262msgid "Checksum Key"
    6363msgstr "Checksum Key"
    6464
    65 #: classes/class-payos.php:397
     65#: classes/class-payos.php:400
    6666msgid "Client ID"
    6767msgstr "Client ID"
    6868
    69 #: classes/class-payos.php:296 classes/class-payos.php:378
     69#: classes/class-payos.php:298 classes/class-payos.php:381
    7070msgid "Connected"
    7171msgstr "Đã kết nối"
    7272
    73 #: classes/class-payos.php:371
     73#: classes/class-payos.php:374
    7474msgid "Connection Information"
    7575msgstr "Thông tin kết nối"
    7676
    77 #: classes/class-payos.php:815 classes/class-payos.php:984
     77#: classes/class-payos.php:805 classes/class-payos.php:974
    7878msgid "Data not integrity"
    7979msgstr "Dữ liệu không toàn vẹn"
    8080
    81 #: classes/class-payos.php:278
     81#: classes/class-payos.php:280
    8282msgid "Description"
    8383msgstr "Mô tả"
    8484
    85 #: classes/class-payos.php:267
     85#: classes/class-payos.php:475
     86msgid "Enable"
     87msgstr "Kích hoạt"
     88
     89#: classes/class-payos.php:269
    8690msgid "Enable bank transfer"
    8791msgstr "Kích hoạt chuyển khoản ngân hàng"
    8892
    89 #: classes/class-payos.php:265
     93#: classes/class-payos.php:471
     94msgid "Enable refresh upon successful payment:"
     95msgstr "Tải lại trang khi thanh toán thành công:"
     96
     97#: classes/class-payos.php:267
    9098msgid "Enable/Disable"
    9199msgstr "Kích hoạt/Vô hiệu hóa"
    92100
    93 #: classes/class-payos.php:392
     101#: classes/class-payos.php:395
    94102msgid "Enter information of payOS"
    95103msgstr "Nhập thông tin của payOS"
    96104
    97105#. translators: %d: order code
    98 #: classes/class-payos.php:807
     106#: classes/class-payos.php:797
    99107msgid "Error when get order #%d"
    100108msgstr "Lỗi khi lấy mã đơn hàng #%d"
    101109
    102 #: classes/class-payos.php:381
     110#: classes/class-payos.php:384
    103111msgid "Gateway name"
    104112msgstr "Tên cổng thanh toán"
    105113
    106 #: classes/class-payos.php:297
     114#: classes/class-payos.php:299
    107115msgid "Hide"
    108116msgstr "Ẩn"
     
    118126msgstr "https://payos.vn/docs/tich-hop-webhook/woocommerce/"
    119127
    120 #: classes/class-payos.php:418
     128#: classes/class-payos.php:421
    121129msgid "Instructions to get Client ID and API Key"
    122130msgstr "Hướng dẫn lấy Client ID và API Key"
    123131
    124 #: classes/class-payos.php:427
     132#: classes/class-payos.php:430
    125133msgid ""
    126134"Maximum 3 characters, no spaces and no special characters. If contained, it "
     
    130138" Vui lòng không bắt đầu bằng FT, TF, TT, VQR"
    131139
    132 #: classes/class-payos.php:296 classes/class-payos.php:376
     140#: classes/class-payos.php:298 classes/class-payos.php:379
    133141msgid "No Connection"
    134142msgstr "Không có kết nối"
    135143
    136 #: classes/class-payos.php:650
     144#: classes/class-payos.php:628
    137145msgid "Not use PayOS as payment method"
    138146msgstr "Không sử dụng payOS làm phương thức thanh toán"
    139147
    140 #: classes/class-payos.php:653
     148#: classes/class-payos.php:631
    141149msgid "Not use PayOS payment gateway"
    142150msgstr "Không sử dụng cổng thanh toán payOS"
    143151
    144 #: classes/class-payos.php:471
    145 msgid "On/Off"
    146 msgstr "Bật/Tắt"
    147 
    148 #: classes/class-payos.php:814
     152#: classes/class-payos.php:804
    149153msgid "Order has been cancelled"
    150154msgstr "Đơn hàng đã bị hủy"
    151155
    152 #: classes/class-payos.php:835
     156#: classes/class-payos.php:825
    153157msgid "Order has been overpaid"
    154158msgstr "Đơn hàng đã thanh toán dư"
    155159
    156 #: classes/class-payos.php:499 classes/class-payos.php:503
     160#: classes/class-payos.php:504 classes/class-payos.php:508
    157161msgid "Order has been successfully paid."
    158162msgstr "Đơn hàng đã thanh toán thành công."
    159163
    160 #: classes/class-payos.php:842
     164#: classes/class-payos.php:832
    161165msgid "Order has been underpaid"
    162166msgstr "Đơn hàng bị thanh toán thiếu."
    163167
    164 #: classes/class-payos.php:281
     168#: classes/class-payos.php:283
    165169msgid "Pay for orders via payOS. Supported by almost Vietnamese banking apps"
    166170msgstr "Thanh toán thông qua payOS. Hỗ trợ hầu hết các ngân hàng tại Việt Nam."
    167171
    168 #: classes/class-payos.php:77 classes/class-payos.php:274
     172#: classes/class-payos.php:77 classes/class-payos.php:276
    169173msgid "Payment by bank transfer (Scan VietQR)"
    170174msgstr "Thanh toán bằng chuyển khoản ngân hàng (quét mã QR)"
    171175
    172 #: classes/class-payos.php:280
     176#: classes/class-payos.php:282
    173177msgid "Payment method description that the customer will see on your checkout."
    174178msgstr "Mô tả phương thức thanh toán mà khách hàng sẽ thấy khi thanh toán."
     
    196200msgstr "payOS Team"
    197201
    198 #: classes/class-payos.php:484
     202#: classes/class-payos.php:488
    199203msgid "Please wait..."
    200204msgstr "Vui lòng chờ..."
    201205
    202 #: classes/class-payos.php:424
     206#: classes/class-payos.php:427
    203207msgid "Prefix:"
    204208msgstr "Tiền tố"
     
    215219"TPBank, Digimi, MSB... Được phát triển cho WooCommerce."
    216220
    217 #: classes/class-payos.php:467
    218 msgid "Redirect payOS:"
    219 msgstr "Chuyển hướng tới payOS:"
    220 
    221 #: payos.php:79
     221#: payos.php:80
    222222msgid "Setting"
    223223msgstr "Cài đặt"
     
    227227msgstr "Cài đặt được lưu"
    228228
    229 #: classes/class-payos.php:298 classes/class-payos.php:400
    230 #: classes/class-payos.php:407 classes/class-payos.php:414
     229#: classes/class-payos.php:300 classes/class-payos.php:403
     230#: classes/class-payos.php:410 classes/class-payos.php:417
    231231msgid "Show"
    232232msgstr "Hiện"
    233233
    234 #: classes/class-payos.php:295
     234#: classes/class-payos.php:297
    235235msgid "Show less"
    236236msgstr "Hiện ít lại"
    237237
    238 #: classes/class-payos.php:455
     238#: classes/class-payos.php:458
    239239msgid "Status if payment is failed:"
    240240msgstr "Trạng thái nếu thanh toán thất bại:"
    241241
    242 #: classes/class-payos.php:431
     242#: classes/class-payos.php:434
    243243msgid "Status if payment is successful:"
    244244msgstr "Trạng thái nếu thanh toán thành công:"
    245245
    246 #: classes/class-payos.php:443
     246#: classes/class-payos.php:446
    247247msgid "Status if payment is underpaid:"
    248248msgstr "Trạng thái nếu thanh toán thiếu:"
     
    260260"hầu hết các ngân hàng lớn tại Việt Nam"
    261261
    262 #: classes/class-payos.php:714
     262#: classes/class-payos.php:704
    263263msgid "Thank you. Your order has been fulfilled."
    264264msgstr "Cảm ơn. Đơn đặt hàng của bạn đã được thực hiện."
    265265
    266 #: classes/class-payos.php:716
     266#: classes/class-payos.php:706
    267267msgid "Thank you. Your order is processing."
    268268msgstr "Cảm ơn. Đơn hàng của bạn đang được xử lý."
    269269
    270 #: classes/class-payos.php:273
     270#: classes/class-payos.php:275
    271271msgid "This controls the title which the user sees during checkout."
    272272msgstr "Kiểm soát tiêu đề mà người dùng nhìn thấy trong quá trình thanh toán."
    273273
    274 #: classes/class-payos.php:271
     274#: classes/class-payos.php:273
    275275msgid "Title"
    276276msgstr "Tiêu đề"
    277277
    278 #: payos.php:68 payos.php:73 payos.php:96
     278#: payos.php:68 payos.php:73 payos.php:97
    279279msgid "Underpaid"
    280280msgstr "Thanh toán thiếu"
    281281
    282 #: classes/class-payos.php:908
     282#: classes/class-payos.php:898
    283283msgid "Webhook confirmed"
    284284msgstr "Đã xác nhận webhook"
     
    288288msgstr "Tạo webhook thất bại"
    289289
    290 #: classes/class-payos.php:902
     290#: classes/class-payos.php:892
    291291msgid "Webhook creation request failed: "
    292292msgstr "Yêu cầu tạo webhook không thành công: "
    293293
    294 #: classes/class-payos.php:913
     294#: classes/class-payos.php:903
    295295msgid "Webhook creation response did not meet success criteria."
    296296msgstr "Phản hồi tạo webhook không đáp ứng tiêu chí thành công."
    297297
    298 #: classes/class-payos.php:795 classes/class-payos.php:862
     298#: classes/class-payos.php:785 classes/class-payos.php:852
    299299msgid "Webhook delivered successfully"
    300300msgstr "Webhook chuyển thành công"
    301301
    302 #: classes/class-payos.php:708
     302#: classes/class-payos.php:698
    303303msgid "Your order has been cancelled."
    304304msgstr "Đơn hàng của bạn đã bị hủy."
    305305
    306 #: classes/class-payos.php:710
     306#: classes/class-payos.php:700
    307307msgid "Your order is underpaid."
    308308msgstr "Đơn hàng của bạn đang thanh toán thiếu."
  • payos/tags/1.0.6/languages/payos.pot

    r3146385 r3194833  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: payOS 1.0.4\n"
     5"Project-Id-Version: payOS 1.0.6\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/payos-woo\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-09-04T10:07:29+02:00\n"
     12"POT-Creation-Date: 2024-09-20T10:15:41+02:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.10.0\n"
     
    4141
    4242#: classes/class-payos.php:77
    43 #: classes/class-payos.php:274
     43#: classes/class-payos.php:276
    4444msgid "Payment by bank transfer (Scan VietQR)"
    4545msgstr ""
     
    7373msgstr ""
    7474
    75 #: classes/class-payos.php:265
     75#: classes/class-payos.php:267
    7676msgid "Enable/Disable"
    7777msgstr ""
    7878
    79 #: classes/class-payos.php:267
     79#: classes/class-payos.php:269
    8080msgid "Enable bank transfer"
    8181msgstr ""
    8282
    83 #: classes/class-payos.php:271
     83#: classes/class-payos.php:273
    8484msgid "Title"
    8585msgstr ""
    8686
    87 #: classes/class-payos.php:273
     87#: classes/class-payos.php:275
    8888msgid "This controls the title which the user sees during checkout."
    8989msgstr ""
    9090
    91 #: classes/class-payos.php:278
     91#: classes/class-payos.php:280
    9292msgid "Description"
    9393msgstr ""
    9494
    95 #: classes/class-payos.php:280
     95#: classes/class-payos.php:282
    9696msgid "Payment method description that the customer will see on your checkout."
    9797msgstr ""
    9898
    99 #: classes/class-payos.php:281
     99#: classes/class-payos.php:283
    100100msgid "Pay for orders via payOS. Supported by almost Vietnamese banking apps"
    101101msgstr ""
    102102
    103 #: classes/class-payos.php:295
     103#: classes/class-payos.php:297
    104104msgid "Show less"
    105105msgstr ""
    106106
    107 #: classes/class-payos.php:296
    108 #: classes/class-payos.php:376
     107#: classes/class-payos.php:298
     108#: classes/class-payos.php:379
    109109msgid "No Connection"
    110110msgstr ""
    111111
    112 #: classes/class-payos.php:296
    113 #: classes/class-payos.php:378
     112#: classes/class-payos.php:298
     113#: classes/class-payos.php:381
    114114msgid "Connected"
    115115msgstr ""
    116116
    117 #: classes/class-payos.php:297
     117#: classes/class-payos.php:299
    118118msgid "Hide"
    119119msgstr ""
    120120
    121 #: classes/class-payos.php:298
     121#: classes/class-payos.php:300
     122#: classes/class-payos.php:403
     123#: classes/class-payos.php:410
     124#: classes/class-payos.php:417
     125msgid "Show"
     126msgstr ""
     127
     128#: classes/class-payos.php:374
     129msgid "Connection Information"
     130msgstr ""
     131
     132#: classes/class-payos.php:384
     133msgid "Gateway name"
     134msgstr ""
     135
     136#: classes/class-payos.php:385
     137msgid "Account number"
     138msgstr ""
     139
     140#: classes/class-payos.php:386
     141msgid "Account name"
     142msgstr ""
     143
     144#: classes/class-payos.php:387
     145msgid "Bank"
     146msgstr ""
     147
     148#: classes/class-payos.php:395
     149msgid "Enter information of payOS"
     150msgstr ""
     151
    122152#: classes/class-payos.php:400
     153msgid "Client ID"
     154msgstr ""
     155
    123156#: classes/class-payos.php:407
     157msgid "API Key"
     158msgstr ""
     159
    124160#: classes/class-payos.php:414
    125 msgid "Show"
    126 msgstr ""
    127 
    128 #: classes/class-payos.php:371
    129 msgid "Connection Information"
    130 msgstr ""
    131 
    132 #: classes/class-payos.php:381
    133 msgid "Gateway name"
    134 msgstr ""
    135 
    136 #: classes/class-payos.php:382
    137 msgid "Account number"
    138 msgstr ""
    139 
    140 #: classes/class-payos.php:383
    141 msgid "Account name"
    142 msgstr ""
    143 
    144 #: classes/class-payos.php:384
    145 msgid "Bank"
    146 msgstr ""
    147 
    148 #: classes/class-payos.php:392
    149 msgid "Enter information of payOS"
    150 msgstr ""
    151 
    152 #: classes/class-payos.php:397
    153 msgid "Client ID"
    154 msgstr ""
    155 
    156 #: classes/class-payos.php:404
    157 msgid "API Key"
    158 msgstr ""
    159 
    160 #: classes/class-payos.php:411
    161161msgid "Checksum Key"
    162162msgstr ""
    163163
    164 #: classes/class-payos.php:417
     164#: classes/class-payos.php:420
    165165msgid "Check connection payOS"
    166166msgstr ""
    167167
    168 #: classes/class-payos.php:418
     168#: classes/class-payos.php:421
    169169msgid "Instructions to get Client ID and API Key"
    170170msgstr ""
    171171
    172 #: classes/class-payos.php:424
     172#: classes/class-payos.php:427
    173173msgid "Prefix:"
    174174msgstr ""
    175175
    176 #: classes/class-payos.php:427
     176#: classes/class-payos.php:430
    177177msgid "Maximum 3 characters, no spaces and no special characters. If contained, it will be deleted. Please do not prefix starting with FT, TF, TT, VQR"
    178178msgstr ""
    179179
    180 #: classes/class-payos.php:431
     180#: classes/class-payos.php:434
    181181msgid "Status if payment is successful:"
    182182msgstr ""
    183183
    184 #: classes/class-payos.php:443
     184#: classes/class-payos.php:446
    185185msgid "Status if payment is underpaid:"
    186186msgstr ""
    187187
    188 #: classes/class-payos.php:455
     188#: classes/class-payos.php:458
    189189msgid "Status if payment is failed:"
    190190msgstr ""
    191191
    192 #: classes/class-payos.php:467
    193 msgid "Redirect payOS:"
    194 msgstr ""
    195 
    196192#: classes/class-payos.php:471
    197 msgid "On/Off"
    198 msgstr ""
    199 
    200 #: classes/class-payos.php:484
     193msgid "Enable refresh upon successful payment:"
     194msgstr ""
     195
     196#: classes/class-payos.php:475
     197msgid "Enable"
     198msgstr ""
     199
     200#: classes/class-payos.php:488
    201201msgid "Please wait..."
    202202msgstr ""
    203203
    204 #: classes/class-payos.php:485
    205 #: classes/class-payos.php:506
     204#: classes/class-payos.php:489
     205#: classes/class-payos.php:511
    206206msgid "Cannot show payment link"
    207207msgstr ""
    208208
    209 #: classes/class-payos.php:499
    210 #: classes/class-payos.php:503
     209#: classes/class-payos.php:504
     210#: classes/class-payos.php:508
    211211msgid "Order has been successfully paid."
    212212msgstr ""
    213213
    214 #: classes/class-payos.php:630
     214#: classes/class-payos.php:608
    215215msgid "Awaiting payment"
    216216msgstr ""
    217217
    218 #: classes/class-payos.php:650
     218#: classes/class-payos.php:628
    219219msgid "Not use PayOS as payment method"
    220220msgstr ""
    221221
    222 #: classes/class-payos.php:653
     222#: classes/class-payos.php:631
    223223msgid "Not use PayOS payment gateway"
    224224msgstr ""
    225225
    226 #: classes/class-payos.php:708
     226#: classes/class-payos.php:698
    227227msgid "Your order has been cancelled."
    228228msgstr ""
    229229
    230 #: classes/class-payos.php:710
     230#: classes/class-payos.php:700
    231231msgid "Your order is underpaid."
    232232msgstr ""
    233233
    234 #: classes/class-payos.php:714
     234#: classes/class-payos.php:704
    235235msgid "Thank you. Your order has been fulfilled."
    236236msgstr ""
    237237
    238 #: classes/class-payos.php:716
     238#: classes/class-payos.php:706
    239239msgid "Thank you. Your order is processing."
    240240msgstr ""
    241241
    242 #: classes/class-payos.php:795
    243 #: classes/class-payos.php:862
     242#: classes/class-payos.php:785
     243#: classes/class-payos.php:852
    244244msgid "Webhook delivered successfully"
    245245msgstr ""
    246246
    247247#. translators: %d: order code
    248 #: classes/class-payos.php:807
     248#: classes/class-payos.php:797
    249249msgid "Error when get order #%d"
    250250msgstr ""
    251251
    252 #: classes/class-payos.php:814
     252#: classes/class-payos.php:804
    253253msgid "Order has been cancelled"
    254254msgstr ""
    255255
    256 #: classes/class-payos.php:815
    257 #: classes/class-payos.php:984
     256#: classes/class-payos.php:805
     257#: classes/class-payos.php:974
    258258msgid "Data not integrity"
    259259msgstr ""
    260260
    261 #: classes/class-payos.php:835
     261#: classes/class-payos.php:825
    262262msgid "Order has been overpaid"
    263263msgstr ""
    264264
    265 #: classes/class-payos.php:842
     265#: classes/class-payos.php:832
    266266msgid "Order has been underpaid"
    267267msgstr ""
    268268
    269269#. translators: 1: order code, 2: amount, 3: description, 4: account number, 5: reference
    270 #: classes/class-payos.php:854
     270#: classes/class-payos.php:844
    271271msgid "<b>Transaction Information:</b> <br> Order Code: %1$s <br> Amount: %2$s <br> Description: %3$s <br> Account Number: %4$s <br> Reference: %5$s"
    272272msgstr ""
    273273
    274 #: classes/class-payos.php:902
     274#: classes/class-payos.php:892
    275275msgid "Webhook creation request failed: "
    276276msgstr ""
    277277
    278 #: classes/class-payos.php:908
     278#: classes/class-payos.php:898
    279279msgid "Webhook confirmed"
    280280msgstr ""
    281281
    282 #: classes/class-payos.php:913
     282#: classes/class-payos.php:903
    283283msgid "Webhook creation response did not meet success criteria."
    284284msgstr ""
     
    286286#: payos.php:68
    287287#: payos.php:73
    288 #: payos.php:96
     288#: payos.php:97
    289289msgid "Underpaid"
    290290msgstr ""
    291291
    292 #: payos.php:79
     292#: payos.php:80
    293293msgid "Setting"
    294294msgstr ""
  • payos/tags/1.0.6/payos.php

    r3146385 r3194833  
    1010 * Requires Plugins: woocommerce
    1111 * Domain Path: /languages
    12  * Version: 1.0.5
     12 * Version: 1.0.6
    1313 * Tested up to: 6.6
    1414 * License: GNU General Public License v3.0
     
    1717
    1818defined('ABSPATH') or exit;
    19 define('PAYOS_GATEWAY_VERSION', '1.0.5');
     19define('PAYOS_GATEWAY_VERSION', '1.0.6');
    2020define('PAYOS_GATEWAY_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
    2121define('PAYOS_GATEWAY_PATH', untrailingslashit(plugin_dir_path(__FILE__)));
     
    7373            'label_count' => _n_noop(__('Underpaid', 'payos') . ' (%s)', __('Underpaid', 'payos') . ' (%s)', 'payos')
    7474        ));
     75        update_setting_options();
    7576    }
    7677}
     
    99100    return $new_order_statuses;
    100101}
     102
     103function update_setting_options()
     104{
     105    $old_setting_options = get_option('payos_gateway_settings', WC_payOS_Payment_Gateway::$payos_default_settings);
     106
     107    if (!array_key_exists('refresh_upon_successful_payment', $old_setting_options)) {
     108        $new_setting_options = array('refresh_upon_successful_payment' => 'no');
     109        $updated_setting_options = array_merge($old_setting_options, $new_setting_options);
     110        update_option('payos_gateway_settings', $updated_setting_options);
     111    }
     112}
  • payos/tags/1.0.6/readme.txt

    r3146385 r3194833  
    11=== payOS ===
    22Plugin Name: payOS
    3 Contributors: diepmagik, locbt, hungnd, khanhnm
     3Contributors: diepmagik, locbt, hungndcasso, khanhnm
    44Tags: payos, vietqr, casso, woocommerce, payment
    55Requires at least: 4.7
    66Tested up to: 6.6
    7 Stable tag: 1.0.5
    8 Version: 1.0.5
     7Stable tag: 1.0.6
     8Version: 1.0.6
    99Requires PHP: 7.0
    1010License: GNU General Public License v3.0
     
    9292* Added: Add new status UNDERPAID for order.
    9393
     94= 1.0.6 =
     95* Added: Add option for refresh page after payment success.
     96
    9497== Upgrade Notice ==
    9598
Note: See TracChangeset for help on using the changeset viewer.