Skip to content

Commit

Permalink
Release 1.0.48
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrowanwallee committed Jan 30, 2025
1 parent 1c9304e commit a5f6a50
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
5 changes: 5 additions & 0 deletions Core/Adapter/BasketAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ private function getLineItemFromPrice(\OxidEsales\Eshop\Core\Price $price = null
$lineItem->setUniqueId($id);
$lineItem->setAmountIncludingTax($price->getBruttoPrice());

// Discount is transferred to PostFinanceCheckout as negative value.
if ($type === LineItemType::DISCOUNT) {
$lineItem->setAmountIncludingTax(- $price->getBruttoPrice());
}

$tax = new TaxCreate();
$tax->setRate($price->getVat());
$tax->setTitle(PostFinanceCheckoutModule::instance()->translate('VAT'));
Expand Down
8 changes: 7 additions & 1 deletion Core/Adapter/SessionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ private function applyAbstractTransactionData(AbstractTransactionPending $transa
private function getTotalsDifference(array $lineItems, \OxidEsales\Eshop\Application\Model\Order $order) {
$total = 0;
foreach($lineItems as $lineItem) {
$total += $lineItem->getAmountIncludingtax();

if ($lineItem->getType() === \PostFinanceCheckout\Sdk\Model\LineItemType::DISCOUNT) {
// convert negative values to positive in order to be able to subtract it.
$total -= abs( $lineItem->getAmountIncludingTax() );
} else {
$total += $lineItem->getAmountIncludingTax();
}
}
return \OxidEsales\Eshop\Core\Registry::getUtils()->fRound($total - $order->getTotalOrderSum(), $order->getOrderCurrency());
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# OXID 6.X

v1.0.47, 2023-6
v1.0.48, 2025-1

This repository contains the OXID PostFinance Checkout payment module that enables the shop to process payments with [PostFinance Checkout](https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html).

Expand Down Expand Up @@ -33,8 +33,8 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/

## Documentation

* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/oxid-6.0/1.0.47/docs/en/documentation.html)
* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/oxid-6.0/1.0.48/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/pfpayments/oxid-6.0/blob/1.0.47/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/oxid-6.0/blob/1.0.48/LICENSE) for more information.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"require" : {
"postfinancecheckout/sdk" : "3.2.0",
"postfinancecheckout/sdk" : "4.6.0",
"monolog/monolog" : "^1.0"
},
"require-dev" : {
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# OXID 6.X

v1.0.47, 2023-6
v1.0.48, 2025-1

This repository contains the OXID PostFinance Checkout payment module that enables the shop to process payments with [PostFinance Checkout](https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html).

Expand Down Expand Up @@ -33,8 +33,8 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/

## Documentation

* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/oxid-6.0/1.0.47/docs/en/documentation.html)
* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/oxid-6.0/1.0.48/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/pfpayments/oxid-6.0/blob/1.0.47/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/oxid-6.0/blob/1.0.48/LICENSE) for more information.
7 changes: 4 additions & 3 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" value="PostFinance Checkout, Oxid 6.0. Oxid 6.1, Oxid 6.2, Oxid 6.10, Oxid plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Oxid PostFinance Checkout plugin that enables processing payments with PostFinance Checkout."> <link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/oxid-6.0/master/docs/en/documentation.html" />
<meta name="keywords" value="PostFinance Checkout, Oxid 6.0. Oxid 6.1, Oxid 6.2, Oxid 6.10, Oxid plugin, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the Oxid PostFinance Checkout plugin that enables processing payments with PostFinance Checkout.">
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/oxid-6.0/master/docs/en/documentation.html" />
<title>PostFinance Checkout OXID 6.X</title>
<link href="assets/monokai-sublime.css" rel="stylesheet" />
<link href="assets/base.css" rel="stylesheet" />
Expand All @@ -22,7 +23,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/oxid-6.0/releases/tag/1.0.47/">
<a href="https://github.com/pfpayments/oxid-6.0/releases/tag/1.0.48/">
Source
</a>
</li>
Expand All @@ -49,7 +50,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/pfpayments/oxid-6.0/releases/tag/1.0.47/">Download</a> the extension.</p>
<p><a href="https://github.com/pfpayments/oxid-6.0/releases/tag/1.0.48/">Download</a> the extension.</p>
</li>
<li>
<p>Extract the files and upload them to the root directory of your store using FTP/SSH.</p>
Expand Down
2 changes: 1 addition & 1 deletion metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'en' => 'PFC PostFinanceCheckout Module'
),
'thumbnail' => 'out/pictures/picture.png',
'version' => '1.0.47',
'version' => '1.0.48',
'author' => 'customweb GmbH',
'url' => 'https://www.customweb.com',
'email' => 'info@customweb.com',
Expand Down

0 comments on commit a5f6a50

Please sign in to comment.