Changeset 3131781
- Timestamp:
- 08/06/2024 05:47:00 PM (19 months ago)
- Location:
- payment-integration-wompi
- Files:
-
- 4 edited
- 10 copied
-
tags/4.0.1 (copied) (copied from payment-integration-wompi/trunk)
-
tags/4.0.1/assets/img (copied) (copied from payment-integration-wompi/trunk/assets/img)
-
tags/4.0.1/assets/js/checkout.asset.php (copied) (copied from payment-integration-wompi/trunk/assets/js/checkout.asset.php)
-
tags/4.0.1/assets/js/checkout.js (copied) (copied from payment-integration-wompi/trunk/assets/js/checkout.js)
-
tags/4.0.1/includes/admin/settings.php (copied) (copied from payment-integration-wompi/trunk/includes/admin/settings.php) (3 diffs)
-
tags/4.0.1/includes/class-gateway-wompi-wwp.php (copied) (copied from payment-integration-wompi/trunk/includes/class-gateway-wompi-wwp.php) (3 diffs)
-
tags/4.0.1/includes/class-wompi-blocks-support.php (copied) (copied from payment-integration-wompi/trunk/includes/class-wompi-blocks-support.php)
-
tags/4.0.1/includes/class-woo-wompi-payment-plugin.php (copied) (copied from payment-integration-wompi/trunk/includes/class-woo-wompi-payment-plugin.php)
-
tags/4.0.1/payment-integration-wompi.php (copied) (copied from payment-integration-wompi/trunk/payment-integration-wompi.php) (2 diffs)
-
tags/4.0.1/readme.txt (copied) (copied from payment-integration-wompi/trunk/readme.txt) (3 diffs)
-
trunk/includes/admin/settings.php (modified) (3 diffs)
-
trunk/includes/class-gateway-wompi-wwp.php (modified) (3 diffs)
-
trunk/payment-integration-wompi.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
payment-integration-wompi/tags/4.0.1/includes/admin/settings.php
r3021125 r3131781 4 4 jQuery( function( $ ) { 5 5 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'; 7 7 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'; 9 9 10 10 $( '#woocommerce_wompi_wwp_environment' ).change(function(){ … … 97 97 'desc_tip' => true 98 98 ), 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 ), 99 105 'credentials' => array( 100 106 'title' => __( 'Credenciales de producción' ), … … 112 118 'description' => __( 'La llave de eventos del comercio para fines de producción' ), 113 119 '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 ), 115 127 ) 116 128 -
payment-integration-wompi/tags/4.0.1/includes/class-gateway-wompi-wwp.php
r3130250 r3131781 6 6 public bool $isTest; 7 7 8 p ublicstring $public_key;8 private string $public_key; 9 9 10 public string $events_key; 10 private string $events_key; 11 12 private string $integrity_secret; 11 13 12 14 … … 29 31 $this->public_key = $this->get_option( 'sandbox_public_key' ); 30 32 $this->events_key = $this->get_option( 'sandbox_events_key' ); 33 $this->integrity_secret = $this->get_option( 'sandbox_integrity_secret' ); 31 34 }else{ 32 35 $this->public_key = $this->get_option( 'public_key' ); 33 36 $this->events_key = $this->get_option( 'events_key' ); 37 $this->integrity_secret = $this->get_option( 'integrity_secret' ); 34 38 } 35 39 … … 76 80 $end_point = 'https://checkout.wompi.co/p/'; 77 81 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 78 86 $params = [ 79 87 'public-key' => $this->public_key, 80 88 'currency' => $order->get_currency(), 81 'amount-in-cents' => bcmul($order->get_total(), 100),89 'amount-in-cents' => $amont_in_cents, 82 90 'reference' => $order_id, 83 91 'redirect-url' => $order->get_checkout_order_received_url() 84 92 ]; 93 94 if(!empty($this->integrity_secret)){ 95 $params['signature:integrity'] = $signature_integrity; 96 } 85 97 86 98 if ($this->debug === 'yes'){ -
payment-integration-wompi/tags/4.0.1/payment-integration-wompi.php
r3130250 r3131781 3 3 Plugin Name: Payment Integration Wompi 4 4 Description: Integration of Wompi for Woocommerce 5 Version: 4.0. 05 Version: 4.0.1 6 6 Author: Saul Morales Pacheco 7 7 Author URI: https://saulmoralespa.com … … 18 18 19 19 if(!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'); 21 21 } 22 22 -
payment-integration-wompi/tags/4.0.1/readme.txt
r3130250 r3131781 6 6 Tested up to: 6.6.1 7 7 Requires PHP: 8.0 8 Stable tag: 4.0. 08 Stable tag: 4.0.1 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 59 59 = 4.0.0 = 60 60 * Added compatibility with checkout blocks 61 = 4.0.1 = 62 * Fixed integrity secret required 61 63 62 64 == Additional Info == … … 64 66 65 67 == 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 4 4 jQuery( function( $ ) { 5 5 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'; 7 7 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'; 9 9 10 10 $( '#woocommerce_wompi_wwp_environment' ).change(function(){ … … 97 97 'desc_tip' => true 98 98 ), 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 ), 99 105 'credentials' => array( 100 106 'title' => __( 'Credenciales de producción' ), … … 112 118 'description' => __( 'La llave de eventos del comercio para fines de producción' ), 113 119 '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 ), 115 127 ) 116 128 -
payment-integration-wompi/trunk/includes/class-gateway-wompi-wwp.php
r3130250 r3131781 6 6 public bool $isTest; 7 7 8 p ublicstring $public_key;8 private string $public_key; 9 9 10 public string $events_key; 10 private string $events_key; 11 12 private string $integrity_secret; 11 13 12 14 … … 29 31 $this->public_key = $this->get_option( 'sandbox_public_key' ); 30 32 $this->events_key = $this->get_option( 'sandbox_events_key' ); 33 $this->integrity_secret = $this->get_option( 'sandbox_integrity_secret' ); 31 34 }else{ 32 35 $this->public_key = $this->get_option( 'public_key' ); 33 36 $this->events_key = $this->get_option( 'events_key' ); 37 $this->integrity_secret = $this->get_option( 'integrity_secret' ); 34 38 } 35 39 … … 76 80 $end_point = 'https://checkout.wompi.co/p/'; 77 81 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 78 86 $params = [ 79 87 'public-key' => $this->public_key, 80 88 'currency' => $order->get_currency(), 81 'amount-in-cents' => bcmul($order->get_total(), 100),89 'amount-in-cents' => $amont_in_cents, 82 90 'reference' => $order_id, 83 91 'redirect-url' => $order->get_checkout_order_received_url() 84 92 ]; 93 94 if(!empty($this->integrity_secret)){ 95 $params['signature:integrity'] = $signature_integrity; 96 } 85 97 86 98 if ($this->debug === 'yes'){ -
payment-integration-wompi/trunk/payment-integration-wompi.php
r3130250 r3131781 3 3 Plugin Name: Payment Integration Wompi 4 4 Description: Integration of Wompi for Woocommerce 5 Version: 4.0. 05 Version: 4.0.1 6 6 Author: Saul Morales Pacheco 7 7 Author URI: https://saulmoralespa.com … … 18 18 19 19 if(!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'); 21 21 } 22 22 -
payment-integration-wompi/trunk/readme.txt
r3130250 r3131781 6 6 Tested up to: 6.6.1 7 7 Requires PHP: 8.0 8 Stable tag: 4.0. 08 Stable tag: 4.0.1 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 59 59 = 4.0.0 = 60 60 * Added compatibility with checkout blocks 61 = 4.0.1 = 62 * Fixed integrity secret required 61 63 62 64 == Additional Info == … … 64 66 65 67 == 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.