Skip to content

Commit

Permalink
Merge pull request #38 from pagantis/IS-2860
Browse files Browse the repository at this point in the history
Is 2860
  • Loading branch information
pgarcess authored Dec 5, 2019
2 parents 59cd194 + 67fc0b5 commit da3f716
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand Down
2 changes: 1 addition & 1 deletion WC_Pagantis.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
13 changes: 7 additions & 6 deletions controllers/paymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;
Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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'];
}
}

Expand Down

0 comments on commit da3f716

Please sign in to comment.