Changeset 3269720
- Timestamp:
- 04/09/2025 01:13:03 PM (12 months ago)
- Location:
- sepay-gateway
- Files:
-
- 5 deleted
- 3 edited
- 10 copied
-
tags/1.1.4 (copied) (copied from sepay-gateway/trunk)
-
tags/1.1.4/assets/css/sepay.css (copied) (copied from sepay-gateway/trunk/assets/css/sepay.css)
-
tags/1.1.4/assets/js/sepay.js (copied) (copied from sepay-gateway/trunk/assets/js/sepay.js)
-
tags/1.1.4/css (deleted)
-
tags/1.1.4/imgs (deleted)
-
tags/1.1.4/includes/block (deleted)
-
tags/1.1.4/includes/class-sepay-woocommerce-block-checkout.php (deleted)
-
tags/1.1.4/includes/class-wc-gateway-sepay.php (copied) (copied from sepay-gateway/trunk/includes/class-wc-gateway-sepay.php) (4 diffs)
-
tags/1.1.4/includes/class-wc-sepay-api.php (copied) (copied from sepay-gateway/trunk/includes/class-wc-sepay-api.php)
-
tags/1.1.4/includes/class-wc-sepay-blocks-support.php (copied) (copied from sepay-gateway/trunk/includes/class-wc-sepay-blocks-support.php)
-
tags/1.1.4/includes/views (copied) (copied from sepay-gateway/trunk/includes/views)
-
tags/1.1.4/includes/views/oauth2-connect.php (copied) (copied from sepay-gateway/trunk/includes/views/oauth2-connect.php)
-
tags/1.1.4/js (deleted)
-
tags/1.1.4/readme.txt (copied) (copied from sepay-gateway/trunk/readme.txt) (2 diffs)
-
tags/1.1.4/sepay-gateway.php (copied) (copied from sepay-gateway/trunk/sepay-gateway.php) (3 diffs)
-
trunk/includes/class-wc-gateway-sepay.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sepay-gateway.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sepay-gateway/tags/1.1.4/includes/class-wc-gateway-sepay.php
r3262651 r3269720 363 363 'type' => 'select', 364 364 'description' => 'Chọn trạng thái đơn hàng khi thanh toán hoàn tất. Nếu chọn "Không chỉ định", trạng thái đơn hàng sẽ được xử lý theo luồng của WooCommerce.', 365 'options' => [ 366 'not_set' => 'Không chỉ định', 367 'processing' => 'Đang xử lý', 368 'completed' => 'Hoàn thành', 369 ], 365 'options' => $this->getWcOrderStatuses(), 370 366 'default' => 'processing', 371 367 'desc_tip' => true, … … 504 500 'desc_tip' => true, 505 501 'description' => 'Trạng thái đơn hàng sau khi thanh toán thành công. Nếu bạn không chỉ định, trạng thái đơn hàng sẽ được xử lý theo luồng của WooCommerce.', 506 'options' => array( 507 'not_set' => 'Không chỉ định', 508 'processing' => 'Đang xử lý (Processing)', 509 'completed' => 'Đã hoàn tất (Completed)', 510 ), 502 'options' => $this->getWcOrderStatuses(), 503 'default' => 'processing', 511 504 ), 512 505 'download_mode' => array( … … 533 526 ), 534 527 ); 528 } 529 530 public function getWcOrderStatuses(): array 531 { 532 $statuses = wc_get_order_statuses(); 533 $result = []; 534 535 foreach ($statuses as $key => $label) { 536 $result[str_replace('wc-', '', $key)] = $label; 537 } 538 539 return $result; 535 540 } 536 541 … … 654 659 'ajax_url' => esc_url(admin_url('admin-ajax.php')), 655 660 'order_code' => $this->get_option('pay_code_prefix') . $order_id, 656 'account_number' => $this->api->is_connected() ? $this->cached_bank_account_data['account_number']: $this->get_option('bank_account_number'),661 'account_number' => $this->api->is_connected() ? ($this->get_option('sub_account') ?: $this->cached_bank_account_data['account_number']) : $this->get_option('bank_account_number'), 657 662 'remark' => $this->get_remark($order_id), 658 663 'amount' => $order->get_total(), -
sepay-gateway/tags/1.1.4/readme.txt
r3262651 r3269720 4 4 - Tags: woocommerce, payment gateway, vietqr, ngan hang, thanh toan 5 5 - Requires WooCommerce at least: 2.1 6 - Stable Tag: 1.1. 37 - Version: 1.1. 36 - Stable Tag: 1.1.4 7 - Version: 1.1.4 8 8 - Tested up to: 6.6 9 9 - Requires at least: 5.6 … … 52 52 53 53 == CHANGELOG == 54 10/04/2025: 55 - [Cập nhật] Mở rộng tùy chọn trạng thái đơn hàng sau khi thanh toán thành công. Giờ đây có thể chọn từ tất cả các trạng thái đơn hàng của WooCommerce thay vì chỉ giới hạn ở "Đang xử lý" và "Hoàn thành". 56 - [Fix lỗi] Copy số tài khoản không đúng ở trang thanh toán 54 57 55 58 11/03/2025: -
sepay-gateway/tags/1.1.4/sepay-gateway.php
r3262651 r3269720 6 6 * Author: SePay Team 7 7 * Author URI: https://sepay.vn/ 8 * Version: 1.1. 38 * Version: 1.1.4 9 9 * Requires Plugins: woocommerce 10 10 * Text Domain: sepay-gateway … … 340 340 ); 341 341 342 $order_status_when_completed = $sepay_gateway->get_option('order_when_completed') ?: OrderStatus::PROCESSING; 342 343 if ($order_total === $parameters['transferAmount']) { 343 if (in_array($ sepay_gateway->get_option('order_when_completed'), ['processing', 'completed'])) {344 $order->update_status($ sepay_gateway->get_option('order_when_completed'));344 if (in_array($order_status_when_completed, array_keys($sepay_gateway->getWcOrderStatuses()))) { 345 $order->update_status($order_status_when_completed); 345 346 } else { 346 347 $order->payment_complete(); … … 352 353 $order_note, 353 354 wc_get_order_status_name($order_status), 354 wc_get_order_status_name( OrderStatus::COMPLETED)355 wc_get_order_status_name($order_status_when_completed) 355 356 ); 356 357 } else if ($order_total > $parameters['transferAmount']) { -
sepay-gateway/trunk/includes/class-wc-gateway-sepay.php
r3262651 r3269720 363 363 'type' => 'select', 364 364 'description' => 'Chọn trạng thái đơn hàng khi thanh toán hoàn tất. Nếu chọn "Không chỉ định", trạng thái đơn hàng sẽ được xử lý theo luồng của WooCommerce.', 365 'options' => [ 366 'not_set' => 'Không chỉ định', 367 'processing' => 'Đang xử lý', 368 'completed' => 'Hoàn thành', 369 ], 365 'options' => $this->getWcOrderStatuses(), 370 366 'default' => 'processing', 371 367 'desc_tip' => true, … … 504 500 'desc_tip' => true, 505 501 'description' => 'Trạng thái đơn hàng sau khi thanh toán thành công. Nếu bạn không chỉ định, trạng thái đơn hàng sẽ được xử lý theo luồng của WooCommerce.', 506 'options' => array( 507 'not_set' => 'Không chỉ định', 508 'processing' => 'Đang xử lý (Processing)', 509 'completed' => 'Đã hoàn tất (Completed)', 510 ), 502 'options' => $this->getWcOrderStatuses(), 503 'default' => 'processing', 511 504 ), 512 505 'download_mode' => array( … … 533 526 ), 534 527 ); 528 } 529 530 public function getWcOrderStatuses(): array 531 { 532 $statuses = wc_get_order_statuses(); 533 $result = []; 534 535 foreach ($statuses as $key => $label) { 536 $result[str_replace('wc-', '', $key)] = $label; 537 } 538 539 return $result; 535 540 } 536 541 … … 654 659 'ajax_url' => esc_url(admin_url('admin-ajax.php')), 655 660 'order_code' => $this->get_option('pay_code_prefix') . $order_id, 656 'account_number' => $this->api->is_connected() ? $this->cached_bank_account_data['account_number']: $this->get_option('bank_account_number'),661 'account_number' => $this->api->is_connected() ? ($this->get_option('sub_account') ?: $this->cached_bank_account_data['account_number']) : $this->get_option('bank_account_number'), 657 662 'remark' => $this->get_remark($order_id), 658 663 'amount' => $order->get_total(), -
sepay-gateway/trunk/readme.txt
r3262651 r3269720 4 4 - Tags: woocommerce, payment gateway, vietqr, ngan hang, thanh toan 5 5 - Requires WooCommerce at least: 2.1 6 - Stable Tag: 1.1. 37 - Version: 1.1. 36 - Stable Tag: 1.1.4 7 - Version: 1.1.4 8 8 - Tested up to: 6.6 9 9 - Requires at least: 5.6 … … 52 52 53 53 == CHANGELOG == 54 10/04/2025: 55 - [Cập nhật] Mở rộng tùy chọn trạng thái đơn hàng sau khi thanh toán thành công. Giờ đây có thể chọn từ tất cả các trạng thái đơn hàng của WooCommerce thay vì chỉ giới hạn ở "Đang xử lý" và "Hoàn thành". 56 - [Fix lỗi] Copy số tài khoản không đúng ở trang thanh toán 54 57 55 58 11/03/2025: -
sepay-gateway/trunk/sepay-gateway.php
r3262651 r3269720 6 6 * Author: SePay Team 7 7 * Author URI: https://sepay.vn/ 8 * Version: 1.1. 38 * Version: 1.1.4 9 9 * Requires Plugins: woocommerce 10 10 * Text Domain: sepay-gateway … … 340 340 ); 341 341 342 $order_status_when_completed = $sepay_gateway->get_option('order_when_completed') ?: OrderStatus::PROCESSING; 342 343 if ($order_total === $parameters['transferAmount']) { 343 if (in_array($ sepay_gateway->get_option('order_when_completed'), ['processing', 'completed'])) {344 $order->update_status($ sepay_gateway->get_option('order_when_completed'));344 if (in_array($order_status_when_completed, array_keys($sepay_gateway->getWcOrderStatuses()))) { 345 $order->update_status($order_status_when_completed); 345 346 } else { 346 347 $order->payment_complete(); … … 352 353 $order_note, 353 354 wc_get_order_status_name($order_status), 354 wc_get_order_status_name( OrderStatus::COMPLETED)355 wc_get_order_status_name($order_status_when_completed) 355 356 ); 356 357 } else if ($order_total > $parameters['transferAmount']) {
Note: See TracChangeset
for help on using the changeset viewer.