Changeset 2368117
- Timestamp:
- 08/24/2020 08:45:11 PM (6 years ago)
- Location:
- transact
- Files:
-
- 10 edited
- 6 copied
-
tags/5.2.0 (copied) (copied from transact/trunk)
-
tags/5.2.0/admin/controllers/transact-admin-settings-post.php (modified) (2 diffs)
-
tags/5.2.0/config.ini (modified) (1 diff)
-
tags/5.2.0/frontend/assets/transact_post.js (copied) (copied from transact/trunk/frontend/assets/transact_post.js)
-
tags/5.2.0/frontend/controllers/transact-api.php (copied) (copied from transact/trunk/frontend/controllers/transact-api.php) (2 diffs)
-
tags/5.2.0/frontend/controllers/transact-single-post.php (copied) (copied from transact/trunk/frontend/controllers/transact-single-post.php) (1 diff)
-
tags/5.2.0/readme.txt (copied) (copied from transact/trunk/readme.txt) (2 diffs)
-
tags/5.2.0/transact-plugin.php (copied) (copied from transact/trunk/transact-plugin.php) (1 diff)
-
tags/5.2.0/utils/transact-utils-config-parser.php (modified) (2 diffs)
-
trunk/admin/controllers/transact-admin-settings-post.php (modified) (2 diffs)
-
trunk/config.ini (modified) (1 diff)
-
trunk/frontend/controllers/transact-api.php (modified) (2 diffs)
-
trunk/frontend/controllers/transact-single-post.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/transact-plugin.php (modified) (1 diff)
-
trunk/utils/transact-utils-config-parser.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
transact/tags/5.2.0/admin/controllers/transact-admin-settings-post.php
r2328310 r2368117 6 6 7 7 use Transact\Admin\Settings\Shortcode\transactShortcode; 8 use Transact\Utils\Config\Parser\ConfigParser; 9 8 10 require_once plugin_dir_path(__FILE__) . 'transact-shortcode.php'; 9 11 … … 51 53 public function __construct($post_id = null) 52 54 { 55 $config = new ConfigParser(); 56 53 57 if ($post_id) { 54 58 $this->post_id = $post_id; -
transact/tags/5.2.0/config.ini
r2344350 r2368117 7 7 api_subscription_validate = "group/{{account_id}}/subscriber/valid/{{subscription_id}}" 8 8 xsact_purchase_url = "https://transact.io/purchase/" 9 postd_url = "https://www.postd.io/api/" 10 postd_regex = "#https?://(www\.)?postd.io/post/.*#i" 9 11 10 12 js_xsact_library = "//transact.io/assets/js/transact.js" -
transact/tags/5.2.0/frontend/controllers/transact-api.php
r2348646 r2368117 280 280 $url = str_replace(self::ACCOUNT_ID_KEY, $account_id, $validate_url); 281 281 $url = str_replace(self::SUBSCRIPTION_ID_KEY, $subscription_id, $url); 282 283 $this->transact->setSecret($this->secret_id); 284 $this->transact->setAlg($this->alg); 285 282 286 $secret = $this->transact->getSubscriptionValidationToken($account_id); 283 287 … … 298 302 299 303 if ($body->expires > time() * 1000) { 304 // TODO if the expiration date has changed should we update meta? 300 305 return true; 301 306 } else { -
transact/tags/5.2.0/frontend/controllers/transact-single-post.php
r2367448 r2368117 556 556 add_action( 'wp_head', array($this, 'add_wp_nonce') ); 557 557 558 wp_oembed_add_provider( 559 $this->config->getPostdPostRegex(), 560 $this->config->getPostdUrl() . 'services/oembed?url=', 561 true 562 ); 563 558 564 if(!self::INLINE_COMMENTS_OUTPUT) { 559 565 /** -
transact/tags/5.2.0/readme.txt
r2367448 r2368117 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.4.2 8 Stable tag: 5. 1.48 Stable tag: 5.2.0 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 82 82 83 83 84 = 5.2.0 = 85 * Add oembed support 86 * fix for subscription validation 87 84 88 = 5.1.4 = 85 89 * Check for already exising email registration. -
transact/tags/5.2.0/transact-plugin.php
r2367448 r2368117 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 5. 1.45 * Version: 5.2.0 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io -
transact/tags/5.2.0/utils/transact-utils-config-parser.php
r2344350 r2368117 45 45 46 46 /** 47 * Key for POSTD_URL 48 */ 49 const POSTD_URL = 'postd_url'; 50 51 /** 52 * Key for POSTD_REGEX 53 */ 54 const POSTD_REGEX = 'postd_regex'; 55 56 /** 47 57 * Parses config.ini 48 58 */ … … 83 93 84 94 /** 95 * Returning Postd api url for oembed 96 * 97 * @return string transact purchase url 98 */ 99 public function getPostdUrl() 100 { 101 return $this->config[self::POSTD_URL]; 102 } 103 104 /** 105 * Returning Postd api url for oembed 106 * 107 * @return string transact purchase url 108 */ 109 public function getPostdPostRegex() 110 { 111 return $this->config[self::POSTD_REGEX]; 112 } 113 114 /** 85 115 * Retrieves Api authentication url 86 116 * -
transact/trunk/admin/controllers/transact-admin-settings-post.php
r2328310 r2368117 6 6 7 7 use Transact\Admin\Settings\Shortcode\transactShortcode; 8 use Transact\Utils\Config\Parser\ConfigParser; 9 8 10 require_once plugin_dir_path(__FILE__) . 'transact-shortcode.php'; 9 11 … … 51 53 public function __construct($post_id = null) 52 54 { 55 $config = new ConfigParser(); 56 53 57 if ($post_id) { 54 58 $this->post_id = $post_id; -
transact/trunk/config.ini
r2344350 r2368117 7 7 api_subscription_validate = "group/{{account_id}}/subscriber/valid/{{subscription_id}}" 8 8 xsact_purchase_url = "https://transact.io/purchase/" 9 postd_url = "https://www.postd.io/api/" 10 postd_regex = "#https?://(www\.)?postd.io/post/.*#i" 9 11 10 12 js_xsact_library = "//transact.io/assets/js/transact.js" -
transact/trunk/frontend/controllers/transact-api.php
r2348646 r2368117 280 280 $url = str_replace(self::ACCOUNT_ID_KEY, $account_id, $validate_url); 281 281 $url = str_replace(self::SUBSCRIPTION_ID_KEY, $subscription_id, $url); 282 283 $this->transact->setSecret($this->secret_id); 284 $this->transact->setAlg($this->alg); 285 282 286 $secret = $this->transact->getSubscriptionValidationToken($account_id); 283 287 … … 298 302 299 303 if ($body->expires > time() * 1000) { 304 // TODO if the expiration date has changed should we update meta? 300 305 return true; 301 306 } else { -
transact/trunk/frontend/controllers/transact-single-post.php
r2367448 r2368117 556 556 add_action( 'wp_head', array($this, 'add_wp_nonce') ); 557 557 558 wp_oembed_add_provider( 559 $this->config->getPostdPostRegex(), 560 $this->config->getPostdUrl() . 'services/oembed?url=', 561 true 562 ); 563 558 564 if(!self::INLINE_COMMENTS_OUTPUT) { 559 565 /** -
transact/trunk/readme.txt
r2367448 r2368117 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.4.2 8 Stable tag: 5. 1.48 Stable tag: 5.2.0 9 9 License: APACHE-2.0 10 10 License URI: https://www.apache.org/licenses/LICENSE-2.0 … … 82 82 83 83 84 = 5.2.0 = 85 * Add oembed support 86 * fix for subscription validation 87 84 88 = 5.1.4 = 85 89 * Check for already exising email registration. -
transact/trunk/transact-plugin.php
r2367448 r2368117 3 3 * Plugin Name: transact.io 4 4 * Description: Integrates transact.io services into WP 5 * Version: 5. 1.45 * Version: 5.2.0 6 6 * Author: transact.io 7 7 * Author URI: https://transact.io -
transact/trunk/utils/transact-utils-config-parser.php
r2344350 r2368117 45 45 46 46 /** 47 * Key for POSTD_URL 48 */ 49 const POSTD_URL = 'postd_url'; 50 51 /** 52 * Key for POSTD_REGEX 53 */ 54 const POSTD_REGEX = 'postd_regex'; 55 56 /** 47 57 * Parses config.ini 48 58 */ … … 83 93 84 94 /** 95 * Returning Postd api url for oembed 96 * 97 * @return string transact purchase url 98 */ 99 public function getPostdUrl() 100 { 101 return $this->config[self::POSTD_URL]; 102 } 103 104 /** 105 * Returning Postd api url for oembed 106 * 107 * @return string transact purchase url 108 */ 109 public function getPostdPostRegex() 110 { 111 return $this->config[self::POSTD_REGEX]; 112 } 113 114 /** 85 115 * Retrieves Api authentication url 86 116 *
Note: See TracChangeset
for help on using the changeset viewer.