Plugin Directory

Changeset 3041163


Ignore:
Timestamp:
02/26/2024 10:47:54 AM (2 years ago)
Author:
aplazame
Message:

tagging version v4.0.0

Location:
aplazame
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • aplazame/tags/v4.0.0/README.txt

    r3025663 r3041163  
    33Tags: aplazame,woocommerce,ecommerce,payment,checkout,credit,aplazar,financiar,financiera,financiación,pago aplazado,método de pago
    44Requires at least: 4.0.1
    5 Tested up to: 6.4.2
     5Tested up to: 6.4.3
    66Requires PHP: 5.3.0
    77Stable tag: 3.9.0
     
    7878== Changelog ==
    7979
     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
    8085#### [v3.9.0](https://github.com/aplazame/woocommerce/tree/v3.9.0) (2024-01-23)
    8186
  • aplazame/tags/v4.0.0/aplazame.php

    r3025663 r3041163  
    33 * Plugin Name: Aplazame
    44 * Plugin URI: https://github.com/aplazame/woocommerce
    5  * Version: 3.9.0
     5 * Version: 4.0.0
    66 * Description: Aplazame offers a payment method to receive funding for the purchases.
    77 * Author: Aplazame
     
    1212 *
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 8.5.1
     14 * WC tested up to: 8.6.1
    1515 *
    1616 * License: GNU General Public License v3.0
     
    2626
    2727class WC_Aplazame {
    28     const VERSION      = '3.9.0';
     28    const VERSION      = '4.0.0';
    2929    const METHOD_ID    = 'aplazame';
    3030    const METHOD_TITLE = 'Aplazame';
     
    358358        'product_widget_max_desired'      => 'no',
    359359        'cart_widget_max_desired'         => 'no',
    360         'checkout_v4'                     => 'no',
    361360    );
    362361
  • aplazame/tags/v4.0.0/classes/sdk/Client.php

    r3005715 r3041163  
    7979     * @throws Aplazame_Sdk_Api_ApiServerException if request is invalid.
    8080     */
    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 );
    8883    }
    8984
  • aplazame/tags/v4.0.0/classes/wc-aplazame-gateway.php

    r3005715 r3041163  
    102102        $client = $aplazame->get_client();
    103103        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            }
    105109        } catch ( Aplazame_Sdk_Api_AplazameExceptionInterface $e ) {
    106110            $message = $e->getMessage();
     
    465469                'placeholder' => WC_Aplazame_Install::$defaultSettings['button_image'],
    466470            ),
    467 
    468             // Developer settings
    469             '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             ),
    480471        );
    481472    }
  • aplazame/trunk/README.txt

    r3025663 r3041163  
    33Tags: aplazame,woocommerce,ecommerce,payment,checkout,credit,aplazar,financiar,financiera,financiación,pago aplazado,método de pago
    44Requires at least: 4.0.1
    5 Tested up to: 6.4.2
     5Tested up to: 6.4.3
    66Requires PHP: 5.3.0
    77Stable tag: 3.9.0
     
    7878== Changelog ==
    7979
     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
    8085#### [v3.9.0](https://github.com/aplazame/woocommerce/tree/v3.9.0) (2024-01-23)
    8186
  • aplazame/trunk/aplazame.php

    r3025663 r3041163  
    33 * Plugin Name: Aplazame
    44 * Plugin URI: https://github.com/aplazame/woocommerce
    5  * Version: 3.9.0
     5 * Version: 4.0.0
    66 * Description: Aplazame offers a payment method to receive funding for the purchases.
    77 * Author: Aplazame
     
    1212 *
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 8.5.1
     14 * WC tested up to: 8.6.1
    1515 *
    1616 * License: GNU General Public License v3.0
     
    2626
    2727class WC_Aplazame {
    28     const VERSION      = '3.9.0';
     28    const VERSION      = '4.0.0';
    2929    const METHOD_ID    = 'aplazame';
    3030    const METHOD_TITLE = 'Aplazame';
     
    358358        'product_widget_max_desired'      => 'no',
    359359        'cart_widget_max_desired'         => 'no',
    360         'checkout_v4'                     => 'no',
    361360    );
    362361
  • aplazame/trunk/classes/sdk/Client.php

    r3005715 r3041163  
    7979     * @throws Aplazame_Sdk_Api_ApiServerException if request is invalid.
    8080     */
    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 );
    8883    }
    8984
  • aplazame/trunk/classes/wc-aplazame-gateway.php

    r3005715 r3041163  
    102102        $client = $aplazame->get_client();
    103103        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            }
    105109        } catch ( Aplazame_Sdk_Api_AplazameExceptionInterface $e ) {
    106110            $message = $e->getMessage();
     
    465469                'placeholder' => WC_Aplazame_Install::$defaultSettings['button_image'],
    466470            ),
    467 
    468             // Developer settings
    469             '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             ),
    480471        );
    481472    }
Note: See TracChangeset for help on using the changeset viewer.