Changeset 3182876
- Timestamp:
- 11/06/2024 06:42:42 AM (17 months ago)
- Location:
- unify/trunk
- Files:
-
- 3 edited
-
Models/PlatformApiModel.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
unify.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
unify/trunk/Models/PlatformApiModel.php
r3181354 r3182876 1 <?php namespace CodeClouds\Unify\Model;class PlatformApiModel{private static $platform_endpoint=UNIFY_PLATFORM_ENDPOINT;private static $testing_domain='';public static function getDomain($testing_domain){self::$platform_endpoint=empty($testing_domain)?self::$platform_endpoint:$testing_domain;}public static function callPlatformToProcess($param,$testing_domain){self::getDomain($testing_domain);$method='validate-wordpress-license';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[] ,'sslverify'=>false);$response=wp_remote_post($curl_url,$args);return $response;}public static function callToPostWpConfig($param,$testing_domain){self::getDomain($testing_domain);$method='api/wordpress/import/products';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>$param,'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreData($domain_name,$param){self::$platform_endpoint=$domain_name;$method='checkout';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreDataGet($param){$method='checkout';$curl_url=self::$platform_endpoint.$method.'/?fallback='.$param;$args=array('body'=>[],'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[],'sslverify'=>false);$response=wp_remote_get($curl_url,$args);echo esc_html($response);}public function requestCancellation($fields,$endpoint){$api_method='auth/cancel/checkout-pro';$curl_url=$endpoint.$api_method;$auth_token=md5($fields["email"]);$header=['Content-Type'=>'application/json','X-Auth-token'=>$auth_token,];$args=array('timeout'=>'5000','httpversion'=>'1.1','cookies'=>[],'data_format'=>'body','sslverify'=>false);$response=\Requests::post($curl_url,$header,json_encode($fields));return $response;}}1 <?php namespace CodeClouds\Unify\Model;class PlatformApiModel{private static $platform_endpoint=UNIFY_PLATFORM_ENDPOINT;private static $testing_domain='';public static function getDomain($testing_domain){self::$platform_endpoint=empty($testing_domain)?self::$platform_endpoint:$testing_domain;}public static function callPlatformToProcess($param,$testing_domain){self::getDomain($testing_domain);$method='validate-wordpress-license';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[]);$response=wp_remote_post($curl_url,$args);return $response;}public static function callToPostWpConfig($param,$testing_domain){self::getDomain($testing_domain);$method='api/wordpress/import/products';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>$param,'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json'],'cookies'=>[]);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreData($domain_name,$param){self::$platform_endpoint=$domain_name;$method='checkout';$curl_url=self::$platform_endpoint.$method;$args=array('body'=>json_encode($param),'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[]);$response=wp_remote_post($curl_url,$args);return $response;}public static function sendStoreDataGet($param){$method='checkout';$curl_url=self::$platform_endpoint.$method.'/?fallback='.$param;$args=array('body'=>[],'httpversion'=>'1.0','headers'=>['Content-Type'=>'application/json','X-Requested-With'=>'XMLHttpRequest'],'cookies'=>[]);$response=wp_remote_get($curl_url,$args);echo esc_html($response);}public function requestCancellation($fields,$endpoint){$api_method='auth/cancel/checkout-pro';$curl_url=$endpoint.$api_method;$auth_token=md5($fields["email"]);$header=['Content-Type'=>'application/json','X-Auth-token'=>$auth_token,];$args=array('timeout'=>'5000','httpversion'=>'1.1','cookies'=>[],'data_format'=>'body');$response=\Requests::post($curl_url,$header,json_encode($fields));return $response;}} -
unify/trunk/readme.txt
r3181412 r3182876 5 5 Tested up to: 6.4 6 6 Requires PHP: 5.6 7 Stable tag: 3.4. 47 Stable tag: 3.4.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html\ … … 95 95 == Changelog == 96 96 97 = 3.4.5 = 98 * Security - Update some API calls. 99 97 100 = 3.4.4 = 98 * Add - Introduced a provision in the settings to manage the default order status 101 * Add - Introduced a provision in the settings to manage the default order status. 99 102 * Enhacement - Optimization for managing the license key. 100 103 -
unify/trunk/unify.php
r3181354 r3182876 7 7 * Author: CodeClouds <sales@codeclouds.com> 8 8 * Author URI: https://www.CodeClouds.com/ 9 * Version: 3.4. 49 * Version: 3.4.5 10 10 * License: GPLv2 or later 11 11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 60 60 define('UNIFY_PLATFORM_LOGIN', 'https://accounts.unify.to/login'); 61 61 define('UNIFY_WP_HOME_URL', home_url()); 62 define('UNIFY_JS_VERSION', '3.4. 4');62 define('UNIFY_JS_VERSION', '3.4.5');
Note: See TracChangeset
for help on using the changeset viewer.