diff --git a/Dockerfile b/Dockerfile index 154144d..0c7616f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,11 +28,11 @@ RUN buildDeps="libxml2-dev" \ patch \ --no-install-recommends && rm -rf /var/lib/apt/lists/* -ADD "https://git.archlinux.org/svntogit/packages.git/plain/trunk/freetype.patch?h=packages/php" /tmp/freetype.patch -RUN docker-php-source extract; \ - cd /usr/src/php; \ - patch -p1 -i /tmp/freetype.patch; \ - rm /tmp/freetype.patch +#ADD "https://git.archlinux.org/svntogit/packages.git/plain/trunk/freetype.patch?h=packages/php" /tmp/freetype.patch +#RUN docker-php-source extract; \ + # cd /usr/src/php; \ + # patch -p1 -i /tmp/freetype.patch; \ + # rm /tmp/freetype.patch RUN docker-php-ext-install -j$(nproc) pdo_mysql soap mysqli pdo mbstring zip \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ diff --git a/WC_Pagantis.php b/WC_Pagantis.php index 2915430..bfc9488 100644 --- a/WC_Pagantis.php +++ b/WC_Pagantis.php @@ -3,7 +3,7 @@ * Plugin Name: Pagantis * Plugin URI: http://www.pagantis.com/ * Description: Financiar con Pagantis - * Version: 8.2.7 + * Version: 8.2.8 * Author: Pagantis */ diff --git a/controllers/paymentController.php b/controllers/paymentController.php index 3ec819e..1387acd 100755 --- a/controllers/paymentController.php +++ b/controllers/paymentController.php @@ -272,7 +272,7 @@ public function pagantisReceiptPage($order_id) $productDescription = substr($productDescription, 0, 9999); $product - ->setAmount(intval(100 * $item->get_total())) + ->setAmount(intval(100 * ($item->get_total() + $item->get_total_tax()))) ->setQuantity($item->get_quantity()) ->setDescription($productDescription) ; @@ -281,10 +281,11 @@ public function pagantisReceiptPage($order_id) $promotedProduct = $this->isPromoted($item->get_product_id()); if ($promotedProduct == 'true') { $promotedAmount+=$product->getAmount(); - $promotedMessage = 'Promoted Item: ' . $product->getDescription() . - ' Price: ' . $item->get_total() . - ' Qty: ' . $product->getQuantity() . - ' Item ID: ' . $item['id_product']; + $promotedMessage = 'Promoted Item: ' . $wcProduct->get_name() . + ' - Price: ' . $item->get_total() . + ' - Qty: ' . $product->getQuantity() . + ' - Item ID: ' . $item['id_product']; + $promotedMessage = substr($promotedMessage, 0, 999); $metadataOrder->addMetadata('promotedProduct', $promotedMessage); } } @@ -859,7 +860,7 @@ private function getPromotedAmount() foreach ($items as $key => $item) { $promotedProduct = $this->isPromoted($item['product_id']); if ($promotedProduct == 'true') { - $promotedAmount+=$item['line_total']; + $promotedAmount+=$item['line_total'] + $item['line_tax']; } }