Skip to content

Commit

Permalink
Incluye detalle de compra en Comprobante de Pago
Browse files Browse the repository at this point in the history
  • Loading branch information
JKacicM committed Dec 27, 2022
1 parent 69b568e commit 6d8e043
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions includes/abstract-wc-gateway-khipu.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,20 @@ function create_payment($order_id)
$configuration = new Khipu\Configuration();
$configuration->setSecret($this->secret);
$configuration->setReceiverId($this->receiver_id);
$configuration->setPlatform('woocommerce-khipu', '3.4');
$configuration->setPlatform('woocommerce-khipu', '3.5');
// $configuration->setDebug(true);

$client = new Khipu\ApiClient($configuration);
$payments = new Khipu\Client\PaymentsApi($client);

foreach ($item_names as $product) {
$cartProductsKhipu .= "\n".$product;
}

$options = array(
'transaction_id' => ltrim($order->get_order_number(), '#')
, 'custom' => serialize(array($order_id, $order->get_order_key()))
, 'body' => implode(', ', $item_names)
, 'body' => 'Productos incluidos en la compra:'.$cartProductsKhipu
, 'return_url' => $this->get_return_url($order)
, 'cancel_url' => $order->get_checkout_payment_url()
, 'notify_url' => $this->notify_url
Expand Down
3 changes: 2 additions & 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: 6.0.1
Stable tag: 3.4
Stable tag: 3.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -31,6 +31,7 @@ No hay preguntas aún.
3. https://s3.amazonaws.com/static.khipu.com/id-cobrador.png

== Changelog ==
3.5 Incluye detalle de compra en el comprobante de pago
3.4 Habilitado para operar en Chile, Argentina y España
3.2 Compatible con Wordpress 6.0
3.1 Permite elegir estado luego del apgo recibido.
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-gateway-khipu.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: WooCommerce khipu Gateway
* Plugin URI: https://khipu.com/page/woocommerce
* Description: Acepte pagos con transferencia procesadas por khipu
* Version: 3.4
* Version: 3.5
* Author: khipu
* Author URI: https://khipu.com
*/
Expand Down

0 comments on commit 6d8e043

Please sign in to comment.