Changeset 2269448
- Timestamp:
- 03/27/2020 08:27:41 PM (6 years ago)
- Location:
- transact
- Files:
-
- 3 edited
- 12 copied
-
tags/4.2.3 (copied) (copied from transact/trunk)
-
tags/4.2.3/admin/controllers/transact-admin-settings-post.php (copied) (copied from transact/trunk/admin/controllers/transact-admin-settings-post.php)
-
tags/4.2.3/admin/controllers/transact-shortcode.php (copied) (copied from transact/trunk/admin/controllers/transact-shortcode.php)
-
tags/4.2.3/frontend/assets/style.css (copied) (copied from transact/trunk/frontend/assets/style.css)
-
tags/4.2.3/frontend/assets/transact_post.js (copied) (copied from transact/trunk/frontend/assets/transact_post.js)
-
tags/4.2.3/frontend/controllers/transact-api.php (copied) (copied from transact/trunk/frontend/controllers/transact-api.php) (6 diffs)
-
tags/4.2.3/frontend/controllers/transact-handle-buttons-shortcode.php (copied) (copied from transact/trunk/frontend/controllers/transact-handle-buttons-shortcode.php)
-
tags/4.2.3/frontend/controllers/transact-handle-buttons.php (copied) (copied from transact/trunk/frontend/controllers/transact-handle-buttons.php)
-
tags/4.2.3/frontend/controllers/transact-single-post.php (copied) (copied from transact/trunk/frontend/controllers/transact-single-post.php)
-
tags/4.2.3/readme.txt (copied) (copied from transact/trunk/readme.txt) (2 diffs)
-
tags/4.2.3/transact-plugin.php (copied) (copied from transact/trunk/transact-plugin.php) (1 diff)
-
tags/4.2.3/vendors/transact-io-php/transact-io.php (copied) (copied from transact/trunk/vendors/transact-io-php/transact-io.php)
-
trunk/frontend/controllers/transact-api.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/transact-plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
transact/tags/4.2.3/frontend/controllers/transact-api.php
r2264141 r2269448 120 120 function get_token() 121 121 { 122 $this->init_sale_parameters($this->transact); 122 $valid = $this->init_sale_parameters($this->transact); 123 if(!$valid) { 124 return array(); 125 } 123 126 124 127 $response = array( … … 135 138 function get_subscription_token() 136 139 { 137 $this->init_sale_parameters($this->transact); 140 $valid = $this->init_sale_parameters($this->transact); 141 if(!$valid) { 142 return array(); 143 } 138 144 139 145 $price = 1; // FIXME get price … … 156 162 function get_donation_token($price, $affiliate_id = null) 157 163 { 158 $this->init_sale_parameters($this->transact); 164 $valid = $this->init_sale_parameters($this->transact); 165 if(!$valid || $price <= 0) { 166 return array(); 167 } 159 168 $this->transact->setPrice($price); 160 169 $this->transact->setDonation(TRUE); … … 196 205 function init_sale_parameters($transact) 197 206 { 207 if($this->price <= 0 || $this->price > 100000) { 208 return false; 209 } 210 198 211 $transact->setSecret($this->secret_id); 199 212 $transact->setAlg($this->alg); … … 203 216 204 217 // Required: Set the price of the sale 205 //todo: what is max value?206 218 $transact->setPrice($this->price); 207 219 … … 229 241 $transact->setAffiliate($this->affiliate); 230 242 243 return true; 231 244 } 232 245 -
transact/tags/4.2.3/readme.txt
r2266126 r2269448 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.3.2 8 Stable tag: 4.2. 28 Stable tag: 4.2.3 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 81 81 == Changelog == 82 82 83 = 4.2.3 = 84 * Fix with price of 0 85 83 86 = 4.2.2 = 84 87 * Multiple donations fix. -
transact/tags/4.2.3/transact-plugin.php
r2266126 r2269448 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 4.2. 25 * Version: 4.2.3 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io -
transact/trunk/frontend/controllers/transact-api.php
r2264141 r2269448 120 120 function get_token() 121 121 { 122 $this->init_sale_parameters($this->transact); 122 $valid = $this->init_sale_parameters($this->transact); 123 if(!$valid) { 124 return array(); 125 } 123 126 124 127 $response = array( … … 135 138 function get_subscription_token() 136 139 { 137 $this->init_sale_parameters($this->transact); 140 $valid = $this->init_sale_parameters($this->transact); 141 if(!$valid) { 142 return array(); 143 } 138 144 139 145 $price = 1; // FIXME get price … … 156 162 function get_donation_token($price, $affiliate_id = null) 157 163 { 158 $this->init_sale_parameters($this->transact); 164 $valid = $this->init_sale_parameters($this->transact); 165 if(!$valid || $price <= 0) { 166 return array(); 167 } 159 168 $this->transact->setPrice($price); 160 169 $this->transact->setDonation(TRUE); … … 196 205 function init_sale_parameters($transact) 197 206 { 207 if($this->price <= 0 || $this->price > 100000) { 208 return false; 209 } 210 198 211 $transact->setSecret($this->secret_id); 199 212 $transact->setAlg($this->alg); … … 203 216 204 217 // Required: Set the price of the sale 205 //todo: what is max value?206 218 $transact->setPrice($this->price); 207 219 … … 229 241 $transact->setAffiliate($this->affiliate); 230 242 243 return true; 231 244 } 232 245 -
transact/trunk/readme.txt
r2266126 r2269448 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.3.2 8 Stable tag: 4.2. 28 Stable tag: 4.2.3 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 81 81 == Changelog == 82 82 83 = 4.2.3 = 84 * Fix with price of 0 85 83 86 = 4.2.2 = 84 87 * Multiple donations fix. -
transact/trunk/transact-plugin.php
r2266126 r2269448 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 4.2. 25 * Version: 4.2.3 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io
Note: See TracChangeset
for help on using the changeset viewer.