Skip to content

Commit

Permalink
menos warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edavism committed May 14, 2015
1 parent 93222f3 commit f1dce65
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
18 changes: 10 additions & 8 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.7
* Version: 1.8
* Author: khipu
* Author URI: https://khipu.com
*/
Expand Down Expand Up @@ -182,7 +182,7 @@ function get_available_banks()
{
$Khipu = new Khipu();
$Khipu->authenticate($this->receiver_id, $this->secret);
$Khipu->setAgent('woocommerce-khipu-1.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.8;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('ReceiverBanks');
return $service->consult();
}
Expand Down Expand Up @@ -326,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.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.8;;'.site_url().';;'.bloginfo('name'));
$create_page_service = $Khipu->loadService('CreatePaymentURL');

$item_names = array();
Expand Down Expand Up @@ -380,17 +380,19 @@ function process_payment($order_id)
return array(
'result' => 'success',
'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))

);
}

/**
* Output for the order received page.
*/
function receipt_page($order)
function receipt_page($order_id)
{
if ($_REQUEST['payment-data']) {
$order = new WC_Order( $order_id );
if (isset($_REQUEST['payment-data'])) {
echo $this->generate_khipu_terminal_page();
} else if ($_REQUEST['bank-id']) {
} else if (isset($_REQUEST['bank-id'])) {
echo $this->generate_khipu_generate_payment($order);
} else {
echo $this->generate_khipu_bankselect();
Expand Down Expand Up @@ -423,7 +425,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.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.8;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('VerifyPaymentNotification');
$service->setDataFromPost();
if ($_POST['receiver_id'] != $this->receiver_id) {
Expand All @@ -443,7 +445,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.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipu-1.8;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('GetPaymentNotification');
$service->setDataFromPost();
$response = json_decode($service->consult());
Expand Down
8 changes: 4 additions & 4 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.7
* Version: 1.8
* Author: khipu
* Author URI: https://khipu.com
*/
Expand Down Expand Up @@ -189,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.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipubacs-1.8;;'.site_url().';;'.bloginfo('name'));
$create_page_service = $Khipu->loadService('CreatePaymentURL');

$item_names = array();
Expand Down Expand Up @@ -273,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.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipubacs-1.8;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('VerifyPaymentNotification');
$service->setDataFromPost();
if ($_POST['receiver_id'] != $this->receiver_id) {
Expand All @@ -293,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.7;;'.site_url().';;'.bloginfo('name'));
$Khipu->setAgent('woocommerce-khipubacs-1.8;;'.site_url().';;'.bloginfo('name'));
$service = $Khipu->loadService('GetPaymentNotification');
$service->setDataFromPost();
$response = json_decode($service->consult());
Expand Down
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.7
Stable tag: 1.8
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down

0 comments on commit f1dce65

Please sign in to comment.