Changeset 3360177
- Timestamp:
- 09/11/2025 10:23:34 PM (7 months ago)
- Location:
- startbutton-for-woocommerce
- Files:
-
- 51 added
- 19 edited
-
tags/1.1,1 (added)
-
tags/1.1,1/._.DS_Store (added)
-
tags/1.1,1/._assets (added)
-
tags/1.1,1/._changelog.txt (added)
-
tags/1.1,1/._includes (added)
-
tags/1.1,1/._readme.txt (added)
-
tags/1.1,1/._templates (added)
-
tags/1.1,1/._woo-startbutton.php (added)
-
tags/1.1,1/assets (added)
-
tags/1.1,1/assets/._.DS_Store (added)
-
tags/1.1,1/assets/._css (added)
-
tags/1.1,1/assets/._images (added)
-
tags/1.1,1/assets/._js (added)
-
tags/1.1,1/assets/css (added)
-
tags/1.1,1/assets/css/._currency-switcher.css (added)
-
tags/1.1,1/assets/css/currency-switcher.css (added)
-
tags/1.1,1/assets/images (added)
-
tags/1.1,1/assets/images/._screenshot-1.png (added)
-
tags/1.1,1/assets/images/._screenshot-2.png (added)
-
tags/1.1,1/assets/images/._screenshot-3.png (added)
-
tags/1.1,1/assets/images/logo.png (added)
-
tags/1.1,1/assets/images/screenshot-1.png (added)
-
tags/1.1,1/assets/images/screenshot-2.png (added)
-
tags/1.1,1/assets/images/screenshot-3.png (added)
-
tags/1.1,1/assets/js (added)
-
tags/1.1,1/assets/js/._blocks (added)
-
tags/1.1,1/assets/js/._currency-switcher.js (added)
-
tags/1.1,1/assets/js/._sb-web-sdk.min.js (added)
-
tags/1.1,1/assets/js/._startbutton.js (added)
-
tags/1.1,1/assets/js/admin.js (added)
-
tags/1.1,1/assets/js/blocks (added)
-
tags/1.1,1/assets/js/blocks/._frontend (added)
-
tags/1.1,1/assets/js/blocks/frontend (added)
-
tags/1.1,1/assets/js/blocks/frontend/._blocks.asset.php (added)
-
tags/1.1,1/assets/js/blocks/frontend/blocks.asset.php (added)
-
tags/1.1,1/assets/js/blocks/frontend/blocks.js (added)
-
tags/1.1,1/assets/js/currency-switcher.js (added)
-
tags/1.1,1/assets/js/sb-web-sdk.min.js (added)
-
tags/1.1,1/assets/js/startbutton.js (added)
-
tags/1.1,1/changelog.txt (added)
-
tags/1.1,1/includes (added)
-
tags/1.1,1/includes/._class-wc-gateway-startbutton-blocks-support.php (added)
-
tags/1.1,1/includes/._class-wc-gateway-startbutton.php (added)
-
tags/1.1,1/includes/class-wc-gateway-startbutton-blocks-support.php (added)
-
tags/1.1,1/includes/class-wc-gateway-startbutton.php (added)
-
tags/1.1,1/readme.txt (added)
-
tags/1.1,1/templates (added)
-
tags/1.1,1/templates/._currency-switcher.php (added)
-
tags/1.1,1/templates/currency-switcher.php (added)
-
tags/1.1,1/woo-startbutton.php (added)
-
trunk/assets/._css (modified) (previous)
-
trunk/assets/._images (modified) (previous)
-
trunk/assets/._js (modified) (previous)
-
trunk/assets/css/._currency-switcher.css (modified) (previous)
-
trunk/assets/images/._screenshot-1.png (modified) (previous)
-
trunk/assets/images/._screenshot-2.png (modified) (previous)
-
trunk/assets/images/._screenshot-3.png (modified) (previous)
-
trunk/assets/js/._blocks (modified) (previous)
-
trunk/assets/js/._currency-switcher.js (modified) (previous)
-
trunk/assets/js/._sb-web-sdk.min.js (added)
-
trunk/assets/js/._startbutton.js (modified) (previous)
-
trunk/assets/js/blocks/._frontend (modified) (previous)
-
trunk/assets/js/blocks/frontend/._blocks.asset.php (modified) (previous)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/._class-wc-gateway-startbutton-blocks-support.php (modified) (previous)
-
trunk/includes/._class-wc-gateway-startbutton.php (modified) (previous)
-
trunk/includes/class-wc-gateway-startbutton.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/._currency-switcher.php (modified) (previous)
-
trunk/woo-startbutton.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
startbutton-for-woocommerce/trunk/changelog.txt
r3360145 r3360177 9 9 * Security improvements 10 10 * Bug fixes 11 12 2025-09-11 - version 1.1.1 13 * Bug fixes -
startbutton-for-woocommerce/trunk/includes/class-wc-gateway-startbutton.php
r3360145 r3360177 380 380 if (!empty($api_rates) && !isset($api_rates['error'])) { 381 381 $rates = $api_rates; 382 error_log('api_rates: ' . print_r($api_rates, true)); 382 383 }else{ 383 384 $error_message = $api_rates['error']; 385 error_log('error_message: ' . $error_message); 384 386 } 385 387 // update rate with current time … … 406 408 } 407 409 $api_url = STARTBUTTON_WC_API_URL[$this->environment] . '/transaction/exchange-rate/list?base=' . strtoupper($base_currency); 408 410 error_log('connecting... to ' . $api_url); 409 411 $response = wp_remote_get($api_url, array( 410 'timeout' => 10,412 'timeout' => 30, 411 413 'headers' => array( 412 414 'Authorization' => 'Bearer ' . $this->public_key … … 428 430 $body = wp_remote_retrieve_body($response); 429 431 $rates_data = json_decode($body, true); 430 // error_log(print_r($rates_data, true));431 // error_log('success: ' . $rates_data['success']);432 // error_log('data: ' . print_r($rates_data['data'], true));433 // error_log('message: ' . $rates_data['message']);434 432 435 433 // Check if response is valid and has success status … … 1143 1141 // Check if we have the required rate 1144 1142 if ( isset( $rates[$to_currency] ) ) { 1143 // error_log('rates[$to_currency]: ' . print_r($rates[$to_currency], true)); 1145 1144 // rate from API is typically the base currency to 1 unit of the target currency 1146 $rate = isset( $rates[$to_currency]['rate'] ) ? 1/$rates[$to_currency]['rate'] : 0; 1147 1145 $rate = isset( $rates[$to_currency]['rate'] ) ? $rates[$to_currency]['rate'] : 0; 1148 1146 // The new rate is how much of the target currency you get for 1 unit of base currency 1149 1147 // So we multiply the price by the rate directly -
startbutton-for-woocommerce/trunk/readme.txt
r3360160 r3360177 4 4 Requires at least: 6.2 5 5 Tested up to: 6.7 6 Stable tag: 1.1. 06 Stable tag: 1.1.1 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 108 108 * Bug fixes 109 109 110 = 1.1.1 - September 11, 2025 = 111 * Bug fixes 112 110 113 == Screenshots == 111 114 -
startbutton-for-woocommerce/trunk/woo-startbutton.php
r3360145 r3360177 4 4 * Plugin URI: https://startbutton.africa 5 5 * Description: Startbutton payment gateway for WooCommerce. 6 * Version: 1.1. 06 * Version: 1.1.1 7 7 * Author: Sommysab 8 8 * License: GPL-2.0+ … … 29 29 'prod' => 'https://api.startbutton.tech', 30 30 ]); 31 define( 'STARTBUTTON_WC_VERSION', '1.1. 0' );31 define( 'STARTBUTTON_WC_VERSION', '1.1.1' ); 32 32 33 33 /**
Note: See TracChangeset
for help on using the changeset viewer.