Plugin Directory

Changeset 3131781


Ignore:
Timestamp:
08/06/2024 05:47:00 PM (19 months ago)
Author:
saulmorales
Message:

tagging version 4.0.1

Location:
payment-integration-wompi
Files:
4 edited
10 copied

Legend:

Unmodified
Added
Removed
  • payment-integration-wompi/tags/4.0.1/includes/admin/settings.php

    r3021125 r3131781  
    44    jQuery( function( $ ) {
    55   
    6     let wompi_live_fields = '#woocommerce_wompi_wwp_public_key, #woocommerce_wompi_wwp_events_key';
     6    let wompi_live_fields = '#woocommerce_wompi_wwp_public_key, #woocommerce_wompi_wwp_events_key, #woocommerce_wompi_wwp_integrity_secret';
    77   
    8     let wompi_sandbox_fields = '#woocommerce_wompi_wwp_sandbox_public_key, #woocommerce_wompi_wwp_sandbox_events_key';
     8    let wompi_sandbox_fields = '#woocommerce_wompi_wwp_sandbox_public_key, #woocommerce_wompi_wwp_sandbox_events_key, #woocommerce_wompi_wwp_sandbox_integrity_secret';
    99
    1010    $( '#woocommerce_wompi_wwp_environment' ).change(function(){
     
    9797            'desc_tip' => true
    9898        ),
     99        'sandbox_integrity_secret' => array(
     100            'title' => __( 'Secreto Integridad' ),
     101            'type'  => 'password',
     102            'description' => __( 'El secreto para integridad del comercio para fines de pruebas' ),
     103            'desc_tip' => true
     104        ),
    99105        'credentials' => array(
    100106            'title'       => __( 'Credenciales de producción' ),
     
    112118            'description' => __( 'La llave de eventos del comercio para fines de producción' ),
    113119            'desc_tip' => true
    114         )
     120        ),
     121        'integrity_secret' => array(
     122            'title' => __( 'Secreto Integridad' ),
     123            'type'  => 'password',
     124            'description' => __( 'El secreto para integridad del comercio para fines de producción' ),
     125            'desc_tip' => true
     126        ),
    115127    )
    116128
  • payment-integration-wompi/tags/4.0.1/includes/class-gateway-wompi-wwp.php

    r3130250 r3131781  
    66    public bool $isTest;
    77
    8     public string $public_key;
     8    private string $public_key;
    99
    10     public string $events_key;
     10    private string $events_key;
     11
     12    private string $integrity_secret;
    1113
    1214
     
    2931            $this->public_key = $this->get_option( 'sandbox_public_key' );
    3032            $this->events_key = $this->get_option( 'sandbox_events_key' );
     33            $this->integrity_secret = $this->get_option( 'sandbox_integrity_secret' );
    3134        }else{
    3235            $this->public_key = $this->get_option( 'public_key' );
    3336            $this->events_key = $this->get_option( 'events_key' );
     37            $this->integrity_secret = $this->get_option( 'integrity_secret' );
    3438        }
    3539
     
    7680        $end_point = 'https://checkout.wompi.co/p/';
    7781
     82        $amont_in_cents = bcmul($order->get_total(), 100);
     83        $signature = "{$order_id}{$amont_in_cents}{$order->get_currency()}{$this->integrity_secret}";
     84        $signature_integrity = hash('sha256', $signature);
     85
    7886        $params = [
    7987            'public-key' => $this->public_key,
    8088            'currency' => $order->get_currency(),
    81             'amount-in-cents' => bcmul($order->get_total(), 100),
     89            'amount-in-cents' => $amont_in_cents,
    8290            'reference' => $order_id,
    8391            'redirect-url' => $order->get_checkout_order_received_url()
    8492        ];
     93
     94        if(!empty($this->integrity_secret)){
     95            $params['signature:integrity'] = $signature_integrity;
     96        }
    8597
    8698        if ($this->debug === 'yes'){
  • payment-integration-wompi/tags/4.0.1/payment-integration-wompi.php

    r3130250 r3131781  
    33Plugin Name: Payment Integration Wompi
    44Description: Integration of Wompi for Woocommerce
    5 Version: 4.0.0
     5Version: 4.0.1
    66Author: Saul Morales Pacheco
    77Author URI: https://saulmoralespa.com
     
    1818
    1919if(!defined('WOO_WOMPI_PAYMENT_WWP_VERSION')){
    20     define('WOO_WOMPI_PAYMENT_WWP_VERSION', '3.0.0');
     20    define('WOO_WOMPI_PAYMENT_WWP_VERSION', '4.0.1');
    2121}
    2222
  • payment-integration-wompi/tags/4.0.1/readme.txt

    r3130250 r3131781  
    66Tested up to: 6.6.1
    77Requires PHP: 8.0
    8 Stable tag: 4.0.0
     8Stable tag: 4.0.1
    99License: GNU General Public License v3.0
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5959= 4.0.0 =
    6060* Added compatibility with checkout blocks
     61= 4.0.1 =
     62* Fixed integrity secret required
    6163
    6264== Additional Info ==
     
    6466
    6567== Credits ==
    66 *  [Saul Morales Pacheco](https://saulmoralespa.com)
     68*  [Website](https://saulmoralespa.com) [Linkedin](https://www.linkedin.com/in/saulmoralespa/)
  • payment-integration-wompi/trunk/includes/admin/settings.php

    r3021125 r3131781  
    44    jQuery( function( $ ) {
    55   
    6     let wompi_live_fields = '#woocommerce_wompi_wwp_public_key, #woocommerce_wompi_wwp_events_key';
     6    let wompi_live_fields = '#woocommerce_wompi_wwp_public_key, #woocommerce_wompi_wwp_events_key, #woocommerce_wompi_wwp_integrity_secret';
    77   
    8     let wompi_sandbox_fields = '#woocommerce_wompi_wwp_sandbox_public_key, #woocommerce_wompi_wwp_sandbox_events_key';
     8    let wompi_sandbox_fields = '#woocommerce_wompi_wwp_sandbox_public_key, #woocommerce_wompi_wwp_sandbox_events_key, #woocommerce_wompi_wwp_sandbox_integrity_secret';
    99
    1010    $( '#woocommerce_wompi_wwp_environment' ).change(function(){
     
    9797            'desc_tip' => true
    9898        ),
     99        'sandbox_integrity_secret' => array(
     100            'title' => __( 'Secreto Integridad' ),
     101            'type'  => 'password',
     102            'description' => __( 'El secreto para integridad del comercio para fines de pruebas' ),
     103            'desc_tip' => true
     104        ),
    99105        'credentials' => array(
    100106            'title'       => __( 'Credenciales de producción' ),
     
    112118            'description' => __( 'La llave de eventos del comercio para fines de producción' ),
    113119            'desc_tip' => true
    114         )
     120        ),
     121        'integrity_secret' => array(
     122            'title' => __( 'Secreto Integridad' ),
     123            'type'  => 'password',
     124            'description' => __( 'El secreto para integridad del comercio para fines de producción' ),
     125            'desc_tip' => true
     126        ),
    115127    )
    116128
  • payment-integration-wompi/trunk/includes/class-gateway-wompi-wwp.php

    r3130250 r3131781  
    66    public bool $isTest;
    77
    8     public string $public_key;
     8    private string $public_key;
    99
    10     public string $events_key;
     10    private string $events_key;
     11
     12    private string $integrity_secret;
    1113
    1214
     
    2931            $this->public_key = $this->get_option( 'sandbox_public_key' );
    3032            $this->events_key = $this->get_option( 'sandbox_events_key' );
     33            $this->integrity_secret = $this->get_option( 'sandbox_integrity_secret' );
    3134        }else{
    3235            $this->public_key = $this->get_option( 'public_key' );
    3336            $this->events_key = $this->get_option( 'events_key' );
     37            $this->integrity_secret = $this->get_option( 'integrity_secret' );
    3438        }
    3539
     
    7680        $end_point = 'https://checkout.wompi.co/p/';
    7781
     82        $amont_in_cents = bcmul($order->get_total(), 100);
     83        $signature = "{$order_id}{$amont_in_cents}{$order->get_currency()}{$this->integrity_secret}";
     84        $signature_integrity = hash('sha256', $signature);
     85
    7886        $params = [
    7987            'public-key' => $this->public_key,
    8088            'currency' => $order->get_currency(),
    81             'amount-in-cents' => bcmul($order->get_total(), 100),
     89            'amount-in-cents' => $amont_in_cents,
    8290            'reference' => $order_id,
    8391            'redirect-url' => $order->get_checkout_order_received_url()
    8492        ];
     93
     94        if(!empty($this->integrity_secret)){
     95            $params['signature:integrity'] = $signature_integrity;
     96        }
    8597
    8698        if ($this->debug === 'yes'){
  • payment-integration-wompi/trunk/payment-integration-wompi.php

    r3130250 r3131781  
    33Plugin Name: Payment Integration Wompi
    44Description: Integration of Wompi for Woocommerce
    5 Version: 4.0.0
     5Version: 4.0.1
    66Author: Saul Morales Pacheco
    77Author URI: https://saulmoralespa.com
     
    1818
    1919if(!defined('WOO_WOMPI_PAYMENT_WWP_VERSION')){
    20     define('WOO_WOMPI_PAYMENT_WWP_VERSION', '3.0.0');
     20    define('WOO_WOMPI_PAYMENT_WWP_VERSION', '4.0.1');
    2121}
    2222
  • payment-integration-wompi/trunk/readme.txt

    r3130250 r3131781  
    66Tested up to: 6.6.1
    77Requires PHP: 8.0
    8 Stable tag: 4.0.0
     8Stable tag: 4.0.1
    99License: GNU General Public License v3.0
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5959= 4.0.0 =
    6060* Added compatibility with checkout blocks
     61= 4.0.1 =
     62* Fixed integrity secret required
    6163
    6264== Additional Info ==
     
    6466
    6567== Credits ==
    66 *  [Saul Morales Pacheco](https://saulmoralespa.com)
     68*  [Website](https://saulmoralespa.com) [Linkedin](https://www.linkedin.com/in/saulmoralespa/)
Note: See TracChangeset for help on using the changeset viewer.