Changeset 3041163
- Timestamp:
- 02/26/2024 10:47:54 AM (2 years ago)
- Location:
- aplazame
- Files:
-
- 8 edited
- 1 copied
-
tags/v4.0.0 (copied) (copied from aplazame/trunk)
-
tags/v4.0.0/README.txt (modified) (2 diffs)
-
tags/v4.0.0/aplazame.php (modified) (4 diffs)
-
tags/v4.0.0/classes/sdk/Client.php (modified) (1 diff)
-
tags/v4.0.0/classes/wc-aplazame-gateway.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/aplazame.php (modified) (4 diffs)
-
trunk/classes/sdk/Client.php (modified) (1 diff)
-
trunk/classes/wc-aplazame-gateway.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
aplazame/tags/v4.0.0/README.txt
r3025663 r3041163 3 3 Tags: aplazame,woocommerce,ecommerce,payment,checkout,credit,aplazar,financiar,financiera,financiación,pago aplazado,método de pago 4 4 Requires at least: 4.0.1 5 Tested up to: 6.4. 25 Tested up to: 6.4.3 6 6 Requires PHP: 5.3.0 7 7 Stable tag: 3.9.0 … … 78 78 == Changelog == 79 79 80 #### [v4.0.0](https://github.com/aplazame/woocommerce/tree/v4.0.0) (2024-02-26) 81 82 * [ADD] Checkout v4 as primary version. 83 * [DEL] Developer options for previous checkout versions. 84 80 85 #### [v3.9.0](https://github.com/aplazame/woocommerce/tree/v3.9.0) (2024-01-23) 81 86 -
aplazame/tags/v4.0.0/aplazame.php
r3025663 r3041163 3 3 * Plugin Name: Aplazame 4 4 * Plugin URI: https://github.com/aplazame/woocommerce 5 * Version: 3.9.05 * Version: 4.0.0 6 6 * Description: Aplazame offers a payment method to receive funding for the purchases. 7 7 * Author: Aplazame … … 12 12 * 13 13 * WC requires at least: 3.0.0 14 * WC tested up to: 8. 5.114 * WC tested up to: 8.6.1 15 15 * 16 16 * License: GNU General Public License v3.0 … … 26 26 27 27 class WC_Aplazame { 28 const VERSION = ' 3.9.0';28 const VERSION = '4.0.0'; 29 29 const METHOD_ID = 'aplazame'; 30 30 const METHOD_TITLE = 'Aplazame'; … … 358 358 'product_widget_max_desired' => 'no', 359 359 'cart_widget_max_desired' => 'no', 360 'checkout_v4' => 'no',361 360 ); 362 361 -
aplazame/tags/v4.0.0/classes/sdk/Client.php
r3005715 r3041163 79 79 * @throws Aplazame_Sdk_Api_ApiServerException if request is invalid. 80 80 */ 81 public function create_checkout( $payload, $checkout_v4 ) { 82 return $this->request( 83 'POST', 84 '/checkout', 85 $payload, 86 $checkout_v4 === 'yes' ? 4 : 3 87 ); 81 public function create_checkout( $payload, $apiVersion ) { 82 return $this->request( 'POST', '/checkout', $payload, $apiVersion ); 88 83 } 89 84 -
aplazame/tags/v4.0.0/classes/wc-aplazame-gateway.php
r3005715 r3041163 102 102 $client = $aplazame->get_client(); 103 103 try { 104 $aplazame_payload = $client->create_checkout( $payload, $aplazame->settings['checkout_v4'] ); 104 try { 105 $aplazame_payload = $client->create_checkout( $payload, 4 ); 106 } catch ( Exception $e ) { 107 $aplazame_payload = $client->create_checkout( $payload, 3 ); 108 } 105 109 } catch ( Aplazame_Sdk_Api_AplazameExceptionInterface $e ) { 106 110 $message = $e->getMessage(); … … 465 469 'placeholder' => WC_Aplazame_Install::$defaultSettings['button_image'], 466 470 ), 467 468 // Developer settings469 'dev_section' => array(470 'title' => __( 'Developer Settings (WARNING: DO NOT TOUCH IF NOT NECESSARY)', 'aplazame' ),471 'type' => 'title',472 'description' => '',473 ),474 'checkout_v4' => array(475 'type' => 'checkbox',476 'title' => __( 'Checkout v4', 'aplazame' ),477 'description' => __( 'Use v4 checkout API', 'aplazame' ),478 'label' => __( 'Turn on v4 checkout API', 'aplazame' ),479 ),480 471 ); 481 472 } -
aplazame/trunk/README.txt
r3025663 r3041163 3 3 Tags: aplazame,woocommerce,ecommerce,payment,checkout,credit,aplazar,financiar,financiera,financiación,pago aplazado,método de pago 4 4 Requires at least: 4.0.1 5 Tested up to: 6.4. 25 Tested up to: 6.4.3 6 6 Requires PHP: 5.3.0 7 7 Stable tag: 3.9.0 … … 78 78 == Changelog == 79 79 80 #### [v4.0.0](https://github.com/aplazame/woocommerce/tree/v4.0.0) (2024-02-26) 81 82 * [ADD] Checkout v4 as primary version. 83 * [DEL] Developer options for previous checkout versions. 84 80 85 #### [v3.9.0](https://github.com/aplazame/woocommerce/tree/v3.9.0) (2024-01-23) 81 86 -
aplazame/trunk/aplazame.php
r3025663 r3041163 3 3 * Plugin Name: Aplazame 4 4 * Plugin URI: https://github.com/aplazame/woocommerce 5 * Version: 3.9.05 * Version: 4.0.0 6 6 * Description: Aplazame offers a payment method to receive funding for the purchases. 7 7 * Author: Aplazame … … 12 12 * 13 13 * WC requires at least: 3.0.0 14 * WC tested up to: 8. 5.114 * WC tested up to: 8.6.1 15 15 * 16 16 * License: GNU General Public License v3.0 … … 26 26 27 27 class WC_Aplazame { 28 const VERSION = ' 3.9.0';28 const VERSION = '4.0.0'; 29 29 const METHOD_ID = 'aplazame'; 30 30 const METHOD_TITLE = 'Aplazame'; … … 358 358 'product_widget_max_desired' => 'no', 359 359 'cart_widget_max_desired' => 'no', 360 'checkout_v4' => 'no',361 360 ); 362 361 -
aplazame/trunk/classes/sdk/Client.php
r3005715 r3041163 79 79 * @throws Aplazame_Sdk_Api_ApiServerException if request is invalid. 80 80 */ 81 public function create_checkout( $payload, $checkout_v4 ) { 82 return $this->request( 83 'POST', 84 '/checkout', 85 $payload, 86 $checkout_v4 === 'yes' ? 4 : 3 87 ); 81 public function create_checkout( $payload, $apiVersion ) { 82 return $this->request( 'POST', '/checkout', $payload, $apiVersion ); 88 83 } 89 84 -
aplazame/trunk/classes/wc-aplazame-gateway.php
r3005715 r3041163 102 102 $client = $aplazame->get_client(); 103 103 try { 104 $aplazame_payload = $client->create_checkout( $payload, $aplazame->settings['checkout_v4'] ); 104 try { 105 $aplazame_payload = $client->create_checkout( $payload, 4 ); 106 } catch ( Exception $e ) { 107 $aplazame_payload = $client->create_checkout( $payload, 3 ); 108 } 105 109 } catch ( Aplazame_Sdk_Api_AplazameExceptionInterface $e ) { 106 110 $message = $e->getMessage(); … … 465 469 'placeholder' => WC_Aplazame_Install::$defaultSettings['button_image'], 466 470 ), 467 468 // Developer settings469 'dev_section' => array(470 'title' => __( 'Developer Settings (WARNING: DO NOT TOUCH IF NOT NECESSARY)', 'aplazame' ),471 'type' => 'title',472 'description' => '',473 ),474 'checkout_v4' => array(475 'type' => 'checkbox',476 'title' => __( 'Checkout v4', 'aplazame' ),477 'description' => __( 'Use v4 checkout API', 'aplazame' ),478 'label' => __( 'Turn on v4 checkout API', 'aplazame' ),479 ),480 471 ); 481 472 }
Note: See TracChangeset
for help on using the changeset viewer.