Changeset 3257439
- Timestamp:
- 03/18/2025 01:57:17 AM (13 months ago)
- Location:
- sepay-gateway/trunk
- Files:
-
- 3 edited
-
includes/class-wc-sepay-api.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
sepay-gateway.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sepay-gateway/trunk/includes/class-wc-sepay-api.php
r3253700 r3257439 320 320 } 321 321 322 if (isset($response[' data']['id'])) {323 update_option('wc_sepay_webhook_id', $response['data']['id'] );322 if (isset($response['status']) && $response['status'] === 'success') { 323 update_option('wc_sepay_webhook_id', $response['data']['id'] ?? $webhook_id ?? null); 324 324 update_option('wc_sepay_webhook_api_key', $api_key); 325 325 } … … 389 389 public function disconnect() 390 390 { 391 $settings = get_option('woocommerce_sepay_settings'); 392 393 if ($settings) { 394 $settings['api_key'] = get_option('wc_sepay_webhook_api_key'); 395 update_option('woocommerce_sepay_settings', $settings); 396 } 397 391 398 delete_option('wc_sepay_access_token'); 392 399 delete_option('wc_sepay_refresh_token'); -
sepay-gateway/trunk/readme.txt
r3254400 r3257439 4 4 - Tags: woocommerce, payment gateway, vietqr, ngan hang, thanh toan 5 5 - Requires WooCommerce at least: 2.1 6 - Stable Tag: 1.1. 17 - Version: 1.1. 16 - Stable Tag: 1.1.2 7 - Version: 1.1.2 8 8 - Tested up to: 6.6 9 9 - Requires at least: 5.6 -
sepay-gateway/trunk/sepay-gateway.php
r3254400 r3257439 6 6 * Author: SePay Team 7 7 * Author URI: https://sepay.vn/ 8 * Version: 1.1. 18 * Version: 1.1.2 9 9 * Requires Plugins: woocommerce 10 10 * Text Domain: sepay-gateway … … 120 120 $webhook_url = home_url('/wp-json/sepay-gateway/v'); 121 121 122 $response = $api->create_webhook($bank_account_id, null); 123 124 if (! isset($response['data']['id'])) { 122 $webhooks = $api->get_webhooks([ 123 'webhook_url' => $webhook_url, 124 'api_key' => $api_token, 125 ]); 126 127 $webhook_id = isset($webhooks[0]['id']) ? $webhooks[0]['id'] : null; 128 129 $response = $api->create_webhook($bank_account_id, $webhook_id); 130 131 if ($response['status'] !== 'success') { 125 132 wp_send_json_error(['message' => 'Có lỗi xảy ra khi tạo webhook. Vui lòng thử lại sau.']); 126 133 }
Note: See TracChangeset
for help on using the changeset viewer.