Skip to content

Commit

Permalink
Merge pull request #83 from buckaroo-it/develop
Browse files Browse the repository at this point in the history
v1.5.1
  • Loading branch information
serpentscode committed Oct 31, 2022
2 parents 707d5f6 + c034d7e commit 00ffbd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,6 @@ Add support for Shopware 6 version 6.4.16.0
BP-1471 Remove 'Handelsbanken'
BP-2004 Add payment method AfterPay (old) -> Digiaccept
BP-1869 Rebranding Afterpay
BP-2057 Fix issue with the mailer function when installing the PostNL plugin (Thank you @daniel-memo-ict !)
BP-2057 Fix issue with the mailer function when installing the PostNL plugin (Thank you @daniel-memo-ict !)
# 1.5.1
[#82] Fix Afterpay old transaction only in test mode
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "buckaroo/shopware6",
"description": "Buckaroo payment provider plugin for Shopware 6",
"type": "shopware-platform-plugin",
"version": "1.5.0",
"version": "1.5.1",
"license": "proprietary",
"minimum-stability": "stable",
"require": {
Expand Down
8 changes: 4 additions & 4 deletions src/Handlers/AsyncPaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ public function pay(
$request->setCurrency($salesChannelContext->getCurrency()->getIsoCode());
$request->setAmountDebit($order->getAmountTotal());

$feeKey = $buckarooKey;
$configKey = $buckarooKey;
if ($buckarooKey === 'afterpaydigiaccept') {
$feeKey = 'afterpay';
$configKey = 'afterpay';
}
if($buckarooFee = $this->checkoutHelper->getBuckarooFee($feeKey.'Fee', $salesChannelContext->getSalesChannelId())) {
if($buckarooFee = $this->checkoutHelper->getBuckarooFee($configKey.'Fee', $salesChannelContext->getSalesChannelId())) {
$this->checkoutHelper->updateOrderCustomFields($order->getId(),['buckarooFee' => $buckarooFee]);
$request->setAmountDebit($order->getAmountTotal() + $buckarooFee);
}
Expand Down Expand Up @@ -177,7 +177,7 @@ public function pay(
if ($buckarooKey == 'klarnakp') {
$url = $this->checkoutHelper->getDataRequestUrl($buckarooKey, $salesChannelContext->getSalesChannelId());
} else {
$url = $this->checkoutHelper->getTransactionUrl($buckarooKey, $salesChannelContext->getSalesChannelId());
$url = $this->checkoutHelper->getTransactionUrl($configKey, $salesChannelContext->getSalesChannelId());
}
$locale = $this->checkoutHelper->getSalesChannelLocaleCode($salesChannelContext);
$response = $bkrClient->post($url, $request, 'Buckaroo\Shopware6\Buckaroo\Payload\TransactionResponse',$locale);
Expand Down

0 comments on commit 00ffbd9

Please sign in to comment.