Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #23 from heidelpay/develop
Browse files Browse the repository at this point in the history
Bugfix  for isAvailable()
  • Loading branch information
devheidelpay authored May 9, 2017
2 parents a74f105 + b7bb1f8 commit eb865ee
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release Notes - heidelpay Payment Gateway for Magento 2

## v17.5.9

### Fixed
- Bugfix for isAvailable() method on both B2C payment methods where an exception was thrown (tested on 2.1.1) when loading the checkout and the quote was null for some reason

## v17.5.3

### Changed/Fixed
- Removed the usage of the unsed Class 'ShipmentValidatorInterface', which wasn't present in <=2.0.8 and <=2.1.1

## v17.4.16

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
{
// in B2C payment methods, we don't want companies to be involved.
// so, if the address contains a company, return false.
if ($quote->getBillingAddress()->getCompany() !== null) {
if ($quote !== null && $quote->getBillingAddress()->getCompany() !== null) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion PaymentMethods/HeidelpayInvoiceSecuredPaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null)
{
// in B2C payment methods, we don't want companies to be involved.
// so, if the address contains a company, return false.
if ($quote->getBillingAddress()->getCompany() !== null) {
if ($quote !== null && $quote->getBillingAddress()->getCompany() !== null) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ All versions greater than 16.10.17 are based on the heidelpay php-api. (https://

### Install the heidelpay Magento 2 composer package

```composer require "heidelpay/magento2:17.5.3"```
```composer require "heidelpay/magento2:17.5.9"```

### Enable the extension in Magento 2

Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Heidelpay_Gateway" schema_version="17.4.16" setup_version="17.4.16">
<module name="Heidelpay_Gateway" schema_version="17.5.9" setup_version="17.5.9">
<sequence>
<module name="Magento_Sales" />
<module name="Magento_Payment" />
Expand Down

0 comments on commit eb865ee

Please sign in to comment.