Skip to content

Commit

Permalink
actualizacion boton y textos
Browse files Browse the repository at this point in the history
  • Loading branch information
edavism committed May 6, 2015
1 parent 6a43ccc commit 93222f3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
23 changes: 14 additions & 9 deletions class-wc-khipu.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: WooCommerce khipu
* Plugin URI: https://khipu.com
* Description: khipu payment gateway for woocommerce
* Version: 1.6
* Version: 1.7
* Author: khipu
* Author URI: https://khipu.com
*/
Expand Down Expand Up @@ -59,7 +59,7 @@ class WC_Gateway_khipu extends WC_Payment_Gateway
public function __construct()
{
$this->id = 'khipu';
$this->icon = plugins_url('images/buttons/50x25.png', __FILE__);
$this->icon = plugins_url('images/buttons/110x25-transparent.png', __FILE__);
$this->has_fields = false;
$this->method_title = __('khipu - Transferencia simplificada', 'woocommerce');
$this->notify_url = str_replace('https:', 'http:', add_query_arg('wc-api', 'WC_Gateway_' . $this->id, home_url('/')));
Expand Down Expand Up @@ -148,9 +148,14 @@ function init_form_fields()
'title' => __('Description', 'woocommerce'),
'type' => 'textarea',
'description' => __('Payment method description that the customer will see on your checkout.', 'woocommerce'),
'default' => __('khipu incluye una aplicación simple y segura para pagar con tu banco'
. ' Evita errores al escribir datos de la transferencia y brinda protección adicional contra algunos tipos de ataque.'
. ' Si no has instalado la aplicación, la página de pago te ayuda a instalarla. Esta es la opción recomendada.', 'woocommerce')

'default' => __('khipu es una aplicación simple y segura para pagar con'
.'tu banco a través de una transferencia, evita errores'
.'al escribir datos y brinda protección adicional contra'
.'algunos tipos de ataque, como lo son el Phishing y la'
.'clonación de datos. Si no has instalado la aplicación,'
.'la página de pago te ayudará a instalarla. ESTA ES LA'
.'OPCIÓN RECOMENDADA.', 'woocommerce')
),
'receiver_id' => array(
'title' => __('Id de cobrador', 'woocommerce'),
Expand All @@ -177,7 +182,7 @@ function get_available_banks()
{
$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipu-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.7;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('ReceiverBanks');
return $service->consult();
}
Expand Down Expand Up @@ -321,7 +326,7 @@ function generate_khipu_generate_payment($order_id)

$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipu-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.7;;'.site_url().';;'.bloginfo('name'));
$create_page_service = $Khipu->loadService('CreatePaymentURL');

$item_names = array();
Expand Down Expand Up @@ -418,7 +423,7 @@ function get_order_from_ipn()
function get_order_from_ipn_1_2() {
$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipu-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.7;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('VerifyPaymentNotification');
$service->setDataFromPost();
if ($_POST['receiver_id'] != $this->receiver_id) {
Expand All @@ -438,7 +443,7 @@ function get_order_from_ipn_1_2() {
function get_order_from_ipn_1_3() {
$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipu-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.7;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('GetPaymentNotification');
$service->setDataFromPost();
$response = json_decode($service->consult());
Expand Down
17 changes: 11 additions & 6 deletions class-wc-khipubacs.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: WooCommerce khipubacs
* Plugin URI: https://khipu.com
* Description: khipu powered direct transfer payment gateway for woocommerce
* Version: 1.6
* Version: 1.7
* Author: khipu
* Author URI: https://khipu.com
*/
Expand Down Expand Up @@ -60,7 +60,7 @@ public function __construct()
$this->id = 'khipubacs';
//$this->icon = plugins_url('images/buttons/50x25.png', __FILE__);
$this->has_fields = false;
$this->method_title = __('khipu - Trasferencia electrónica (normal)', 'woocommerce');
$this->method_title = __('Trasferencia normal', 'woocommerce');
$this->notify_url = str_replace('https:', 'http:', add_query_arg('wc-api', 'WC_Gateway_' . $this->id, home_url('/')));

// Load the settings and init variables.
Expand Down Expand Up @@ -147,7 +147,12 @@ function init_form_fields()
'title' => __('Description', 'woocommerce'),
'type' => 'textarea',
'description' => __('Payment method description that the customer will see on your checkout.', 'woocommerce'),
'default' => __('Te entregaremos los datos necesarios para realizar una transferencia electrónica normal.')
'default' => __('Debes ingresar el rut de la cuenta corriente o vista con'
.'que pagarás, luego se te entregarán todos los datos'
.'para que puedas realizar la transferencia desde el'
.'portal web o móvil de tu banco. Debes tener cuidado, el'
.'monto a transferir debe ser el que se te ha informado'
.'que realices, así el pago se procesará con éxito.')
),
'receiver_id' => array(
'title' => __('Id de cobrador', 'woocommerce'),
Expand Down Expand Up @@ -184,7 +189,7 @@ function generate_khipubacs_submit_button($order_id)

$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipubacs-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipubacs-1.7;;'.site_url().';;'.bloginfo('name'));
$create_page_service = $Khipu->loadService('CreatePaymentURL');

$item_names = array();
Expand Down Expand Up @@ -268,7 +273,7 @@ function get_order_from_ipn()
function get_order_from_ipn_1_2() {
$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipubacs-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipubacs-1.7;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('VerifyPaymentNotification');
$service->setDataFromPost();
if ($_POST['receiver_id'] != $this->receiver_id) {
Expand All @@ -288,7 +293,7 @@ function get_order_from_ipn_1_2() {
function get_order_from_ipn_1_3() {
$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipubacs-1.6;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipubacs-1.7;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('GetPaymentNotification');
$service->setDataFromPost();
$response = json_decode($service->consult());
Expand Down
Binary file added images/buttons/110x25-transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link:
Tags: payment gateway, khipu, woocommerce, chile
Requires at least: 3.3
Tested up to: 4.1
Stable tag: 1.6
Stable tag: 1.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down

0 comments on commit 93222f3

Please sign in to comment.