Changeset 3351029
- Timestamp:
- 08/27/2025 09:22:40 AM (7 months ago)
- Location:
- simpler-checkout
- Files:
-
- 22 edited
- 1 copied
-
tags/1.2.1 (copied) (copied from simpler-checkout/trunk)
-
tags/1.2.1/README.txt (modified) (1 diff)
-
tags/1.2.1/includes/Http/Controllers/OrderController.php (modified) (4 diffs)
-
tags/1.2.1/includes/Http/Controllers/ProductController.php (modified) (5 diffs)
-
tags/1.2.1/includes/Http/Controllers/QuotationController.php (modified) (2 diffs)
-
tags/1.2.1/includes/Services/OrderService.php (modified) (1 diff)
-
tags/1.2.1/includes/constants.php (modified) (1 diff)
-
tags/1.2.1/simpler.php (modified) (1 diff)
-
tags/1.2.1/vendor/autoload.php (modified) (1 diff)
-
tags/1.2.1/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/1.2.1/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.2.1/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/README.txt (modified) (1 diff)
-
trunk/includes/Http/Controllers/OrderController.php (modified) (4 diffs)
-
trunk/includes/Http/Controllers/ProductController.php (modified) (5 diffs)
-
trunk/includes/Http/Controllers/QuotationController.php (modified) (2 diffs)
-
trunk/includes/Services/OrderService.php (modified) (1 diff)
-
trunk/includes/constants.php (modified) (1 diff)
-
trunk/simpler.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simpler-checkout/tags/1.2.1/README.txt
r3348516 r3351029 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
simpler-checkout/tags/1.2.1/includes/Http/Controllers/OrderController.php
r3347564 r3351029 46 46 public function handle($request) 47 47 { 48 ob_start(); 48 49 $validation = \rest_validate_value_from_schema($body = $request->get_json_params(), OrderSchema::SCHEMA); 49 50 if (\is_wp_error($validation)) { 51 ob_end_clean(); 50 52 return new WP_REST_Response(json_encode($validation), 422); 51 53 } 52 $GLOBALS['simpler_api_request']=['type'=>'submit','data'=>$body]; 54 55 $GLOBALS['simpler_api_request'] = ['type' => 'submit', 'data' => $body]; 53 56 $order_request = new OrderRequest( 54 57 User::from_json($body['user']), … … 65 68 'error' => 'could not store order due to exception', 66 69 'code' => 'ORDCRE001', 67 'detail' => $e->getMessage() 70 'detail' => $e->getMessage(), 71 'output' => ob_get_clean() 68 72 ], 500); 69 73 } … … 73 77 'error' => 'could not store order due to wp error', 74 78 'code' => 'ORDCRE002', 75 'detail' => $order->get_error_codes() 79 'detail' => $order->get_error_codes(), 80 'output' => ob_get_clean() 76 81 ], 500); 77 82 } … … 82 87 ]; 83 88 89 $unwanted_output = ob_get_clean(); 90 if (!empty($unwanted_output)) { 91 error_log("order controller discarded unwanted output : " . $unwanted_output); 92 } 84 93 return new WP_REST_Response($response, 201); 85 94 } -
simpler-checkout/tags/1.2.1/includes/Http/Controllers/ProductController.php
r3347564 r3351029 48 48 public function handle($request): WP_REST_Response 49 49 { 50 ob_start(); 50 51 do_action('simplerwc_product_controller_request_before'); 51 52 $this->request = $request; … … 56 57 'code' => '400', 57 58 'message' => 'Bad Request', 58 'error' => 'Bad Request' 59 'error' => 'Bad Request', 60 'output' => ob_get_clean() 59 61 ], 60 62 400 … … 62 64 } 63 65 $ids = $params['product_ids']; 64 $GLOBALS['simpler_api_request'] =['type'=>'product','data'=>['product_ids'=>$ids]];66 $GLOBALS['simpler_api_request'] = ['type' => 'product', 'data' => ['product_ids' => $ids]]; 65 67 66 68 if (!is_array($ids) || (sizeof($ids) == 0)) { … … 69 71 'code' => '400', 70 72 'message' => 'Bad Request', 71 'error' => 'Bad Request' 73 'error' => 'Bad Request', 74 'output' => ob_get_clean() 72 75 ], 73 76 400 … … 109 112 $res = $this->products_to_response($products); 110 113 114 $unwanted_output = ob_get_clean(); 115 if (!empty($unwanted_output)) { 116 error_log("products controller discarded unwanted output : " . $unwanted_output); 117 } 111 118 return $res; 112 119 } -
simpler-checkout/tags/1.2.1/includes/Http/Controllers/QuotationController.php
r3347564 r3351029 44 44 public function handle($request) 45 45 { 46 ob_start(); 46 47 $this->request = $request; 47 48 $validation = \rest_validate_value_from_schema($body = $this->request->get_json_params(), QuotationSchema::SCHEMA); 48 49 if (\is_wp_error($validation)) { 50 ob_end_clean(); 49 51 return new WP_REST_Response(json_encode($validation), 422); 50 52 } 51 $GLOBALS['simpler_api_request'] =['type'=>'quote','data'=>$body];53 $GLOBALS['simpler_api_request'] = ['type' => 'quote', 'data' => $body]; 52 54 try { 53 55 $quotations = $this->quote(); … … 58 60 'message' => 'Failed to quote cart', 59 61 'error' => $e->getMessage(), 62 'output' => ob_get_clean() 60 63 ], 61 64 400 62 65 ); 66 } 67 68 $unwanted_output = ob_get_clean(); 69 if (!empty($unwanted_output)) { 70 error_log("quote controller discarded unwanted output : " . $unwanted_output); 63 71 } 64 72 return new WP_REST_Response((new QuotationResponse($quotations))->to_array()); -
simpler-checkout/tags/1.2.1/includes/Services/OrderService.php
r3318023 r3351029 45 45 $order->set_currency($currency); 46 46 $order->update_meta_data('_order_currency', $currency); 47 47 48 48 $paymentMethodId = $this->get_payment_method_id($order_request); 49 49 WC()->session->set('chosen_payment_method', $paymentMethodId); -
simpler-checkout/tags/1.2.1/includes/constants.php
r3348516 r3351029 1 1 <?php 2 2 3 const SIMPLERWC_VERSION = '1.2. 0';3 const SIMPLERWC_VERSION = '1.2.1'; 4 4 5 5 function simplerwc_get_sdk_uri() -
simpler-checkout/tags/1.2.1/simpler.php
r3348516 r3351029 8 8 * Description: Simpler Checkout lets your customers complete their purchases in seconds, with any payment method they want, in any device or browser and without a password. 9 9 * Tags: woocommerce, checkout, payments, conversion rate 10 * Version: 1.2. 010 * Version: 1.2.1 11 11 * Requires at least: 5.1 12 12 * Tested up to: 6.8.1 -
simpler-checkout/tags/1.2.1/vendor/autoload.php
r3348516 r3351029 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc::getLoader();7 return ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a::getLoader(); -
simpler-checkout/tags/1.2.1/vendor/composer/autoload_real.php
r3348516 r3351029 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc5 class ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
simpler-checkout/tags/1.2.1/vendor/composer/autoload_static.php
r3348516 r3351029 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc7 class ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 89 89 { 90 90 return \Closure::bind(function () use ($loader) { 91 $loader->prefixLengthsPsr4 = ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::$prefixLengthsPsr4;92 $loader->prefixDirsPsr4 = ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::$prefixDirsPsr4;93 $loader->classMap = ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::$classMap;91 $loader->prefixLengthsPsr4 = ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::$prefixLengthsPsr4; 92 $loader->prefixDirsPsr4 = ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::$prefixDirsPsr4; 93 $loader->classMap = ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::$classMap; 94 94 95 95 }, null, ClassLoader::class); -
simpler-checkout/tags/1.2.1/vendor/composer/installed.php
r3348516 r3351029 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '1.2. 0',4 'version' => '1.2. 0.0',3 'pretty_version' => '1.2.1', 4 'version' => '1.2.1.0', 5 5 'type' => 'wordpress-plugin', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' bf7a20ac177443046dde61ceaf759b0d93a9a678',8 'reference' => 'eada8cdf290bdf9fefac59715efb1b8f4987828e', 9 9 'name' => 'simpler-checkout/woo', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'simpler-checkout/woo' => array( 14 'pretty_version' => '1.2. 0',15 'version' => '1.2. 0.0',14 'pretty_version' => '1.2.1', 15 'version' => '1.2.1.0', 16 16 'type' => 'wordpress-plugin', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' bf7a20ac177443046dde61ceaf759b0d93a9a678',19 'reference' => 'eada8cdf290bdf9fefac59715efb1b8f4987828e', 20 20 'dev_requirement' => false, 21 21 ), -
simpler-checkout/trunk/README.txt
r3348516 r3351029 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
simpler-checkout/trunk/includes/Http/Controllers/OrderController.php
r3347564 r3351029 46 46 public function handle($request) 47 47 { 48 ob_start(); 48 49 $validation = \rest_validate_value_from_schema($body = $request->get_json_params(), OrderSchema::SCHEMA); 49 50 if (\is_wp_error($validation)) { 51 ob_end_clean(); 50 52 return new WP_REST_Response(json_encode($validation), 422); 51 53 } 52 $GLOBALS['simpler_api_request']=['type'=>'submit','data'=>$body]; 54 55 $GLOBALS['simpler_api_request'] = ['type' => 'submit', 'data' => $body]; 53 56 $order_request = new OrderRequest( 54 57 User::from_json($body['user']), … … 65 68 'error' => 'could not store order due to exception', 66 69 'code' => 'ORDCRE001', 67 'detail' => $e->getMessage() 70 'detail' => $e->getMessage(), 71 'output' => ob_get_clean() 68 72 ], 500); 69 73 } … … 73 77 'error' => 'could not store order due to wp error', 74 78 'code' => 'ORDCRE002', 75 'detail' => $order->get_error_codes() 79 'detail' => $order->get_error_codes(), 80 'output' => ob_get_clean() 76 81 ], 500); 77 82 } … … 82 87 ]; 83 88 89 $unwanted_output = ob_get_clean(); 90 if (!empty($unwanted_output)) { 91 error_log("order controller discarded unwanted output : " . $unwanted_output); 92 } 84 93 return new WP_REST_Response($response, 201); 85 94 } -
simpler-checkout/trunk/includes/Http/Controllers/ProductController.php
r3347564 r3351029 48 48 public function handle($request): WP_REST_Response 49 49 { 50 ob_start(); 50 51 do_action('simplerwc_product_controller_request_before'); 51 52 $this->request = $request; … … 56 57 'code' => '400', 57 58 'message' => 'Bad Request', 58 'error' => 'Bad Request' 59 'error' => 'Bad Request', 60 'output' => ob_get_clean() 59 61 ], 60 62 400 … … 62 64 } 63 65 $ids = $params['product_ids']; 64 $GLOBALS['simpler_api_request'] =['type'=>'product','data'=>['product_ids'=>$ids]];66 $GLOBALS['simpler_api_request'] = ['type' => 'product', 'data' => ['product_ids' => $ids]]; 65 67 66 68 if (!is_array($ids) || (sizeof($ids) == 0)) { … … 69 71 'code' => '400', 70 72 'message' => 'Bad Request', 71 'error' => 'Bad Request' 73 'error' => 'Bad Request', 74 'output' => ob_get_clean() 72 75 ], 73 76 400 … … 109 112 $res = $this->products_to_response($products); 110 113 114 $unwanted_output = ob_get_clean(); 115 if (!empty($unwanted_output)) { 116 error_log("products controller discarded unwanted output : " . $unwanted_output); 117 } 111 118 return $res; 112 119 } -
simpler-checkout/trunk/includes/Http/Controllers/QuotationController.php
r3347564 r3351029 44 44 public function handle($request) 45 45 { 46 ob_start(); 46 47 $this->request = $request; 47 48 $validation = \rest_validate_value_from_schema($body = $this->request->get_json_params(), QuotationSchema::SCHEMA); 48 49 if (\is_wp_error($validation)) { 50 ob_end_clean(); 49 51 return new WP_REST_Response(json_encode($validation), 422); 50 52 } 51 $GLOBALS['simpler_api_request'] =['type'=>'quote','data'=>$body];53 $GLOBALS['simpler_api_request'] = ['type' => 'quote', 'data' => $body]; 52 54 try { 53 55 $quotations = $this->quote(); … … 58 60 'message' => 'Failed to quote cart', 59 61 'error' => $e->getMessage(), 62 'output' => ob_get_clean() 60 63 ], 61 64 400 62 65 ); 66 } 67 68 $unwanted_output = ob_get_clean(); 69 if (!empty($unwanted_output)) { 70 error_log("quote controller discarded unwanted output : " . $unwanted_output); 63 71 } 64 72 return new WP_REST_Response((new QuotationResponse($quotations))->to_array()); -
simpler-checkout/trunk/includes/Services/OrderService.php
r3318023 r3351029 45 45 $order->set_currency($currency); 46 46 $order->update_meta_data('_order_currency', $currency); 47 47 48 48 $paymentMethodId = $this->get_payment_method_id($order_request); 49 49 WC()->session->set('chosen_payment_method', $paymentMethodId); -
simpler-checkout/trunk/includes/constants.php
r3348516 r3351029 1 1 <?php 2 2 3 const SIMPLERWC_VERSION = '1.2. 0';3 const SIMPLERWC_VERSION = '1.2.1'; 4 4 5 5 function simplerwc_get_sdk_uri() -
simpler-checkout/trunk/simpler.php
r3348516 r3351029 8 8 * Description: Simpler Checkout lets your customers complete their purchases in seconds, with any payment method they want, in any device or browser and without a password. 9 9 * Tags: woocommerce, checkout, payments, conversion rate 10 * Version: 1.2. 010 * Version: 1.2.1 11 11 * Requires at least: 5.1 12 12 * Tested up to: 6.8.1 -
simpler-checkout/trunk/vendor/autoload.php
r3348516 r3351029 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc::getLoader();7 return ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a::getLoader(); -
simpler-checkout/trunk/vendor/composer/autoload_real.php
r3348516 r3351029 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc5 class ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); 29 spl_autoload_unregister(array('ComposerAutoloaderInit2 20db4d6c76a5c372ff889c6a9169acc', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit20bdea61c52e740c60ef7543c931fd3a', 'loadClassLoader')); 30 30 31 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 33 33 require __DIR__ . '/autoload_static.php'; 34 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::getInitializer($loader));35 call_user_func(\Composer\Autoload\ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::getInitializer($loader)); 36 36 } else { 37 37 $map = require __DIR__ . '/autoload_namespaces.php'; -
simpler-checkout/trunk/vendor/composer/autoload_static.php
r3348516 r3351029 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc7 class ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 89 89 { 90 90 return \Closure::bind(function () use ($loader) { 91 $loader->prefixLengthsPsr4 = ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::$prefixLengthsPsr4;92 $loader->prefixDirsPsr4 = ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::$prefixDirsPsr4;93 $loader->classMap = ComposerStaticInit2 20db4d6c76a5c372ff889c6a9169acc::$classMap;91 $loader->prefixLengthsPsr4 = ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::$prefixLengthsPsr4; 92 $loader->prefixDirsPsr4 = ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::$prefixDirsPsr4; 93 $loader->classMap = ComposerStaticInit20bdea61c52e740c60ef7543c931fd3a::$classMap; 94 94 95 95 }, null, ClassLoader::class); -
simpler-checkout/trunk/vendor/composer/installed.php
r3348516 r3351029 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '1.2. 0',4 'version' => '1.2. 0.0',3 'pretty_version' => '1.2.1', 4 'version' => '1.2.1.0', 5 5 'type' => 'wordpress-plugin', 6 6 'install_path' => __DIR__ . '/../../', 7 7 'aliases' => array(), 8 'reference' => ' bf7a20ac177443046dde61ceaf759b0d93a9a678',8 'reference' => 'eada8cdf290bdf9fefac59715efb1b8f4987828e', 9 9 'name' => 'simpler-checkout/woo', 10 10 'dev' => false, … … 12 12 'versions' => array( 13 13 'simpler-checkout/woo' => array( 14 'pretty_version' => '1.2. 0',15 'version' => '1.2. 0.0',14 'pretty_version' => '1.2.1', 15 'version' => '1.2.1.0', 16 16 'type' => 'wordpress-plugin', 17 17 'install_path' => __DIR__ . '/../../', 18 18 'aliases' => array(), 19 'reference' => ' bf7a20ac177443046dde61ceaf759b0d93a9a678',19 'reference' => 'eada8cdf290bdf9fefac59715efb1b8f4987828e', 20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.