Skip to content

Commit

Permalink
virtual order fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mareknaujas committed May 8, 2023
1 parent e890171 commit 7bd3824
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Model/Adapter/QuickPayAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ public function CreatePaymentLink($order, $area = 'frontend')

if($order->getPayment()->getMethod() != \QuickPay\Gateway\Model\Ui\ConfigProvider::CODE_PAYPAL) {
$shippingAddress = $order->getShippingAddress();
$shippingCountry = $this->countryFactory->create()->loadByCode($shippingAddress->getCountryId());
$taxItems = $this->taxItem->getTaxItemsByOrderId($order->getId());
$shippingVatRate = 0;
if (is_array($taxItems)) {
Expand All @@ -201,6 +200,8 @@ public function CreatePaymentLink($order, $area = 'frontend')
}

if ($shippingAddress) {
$shippingCountry = $this->countryFactory->create()->loadByCode($shippingAddress->getCountryId());

$form['shipping_address'] = [];
$form['shipping_address']['name'] = $shippingAddress->getFirstName() . " " . $shippingAddress->getLastName();
$form['shipping_address']['street'] = $shippingAddress->getStreetLine(1);
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="QuickPay_Gateway" setup_version="2.3.6">
<module name="QuickPay_Gateway" setup_version="2.3.7">
<sequence>
<module name="Magento_Payment"/>
<module name="Magento_Checkout"/>
Expand Down

0 comments on commit 7bd3824

Please sign in to comment.