From 07426d022117033993596345fc9e5e344430a6ed Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Tue, 6 Feb 2018 03:10:39 +0600 Subject: [PATCH] 1.5.1: https://github.com/mage2pro/ipay88/issues/8 --- Block/Info.php | 28 ++++++++++++++++++---------- composer.json | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Block/Info.php b/Block/Info.php index e75784e..29e83a8 100644 --- a/Block/Info.php +++ b/Block/Info.php @@ -14,16 +14,24 @@ class Info extends \Df\Payment\Block\Info { * @used-by \Df\Payment\Block\Info::prepareToRendering() */ final protected function prepare() { - $e = $this->e(); /** @var Event $e */ - $this->siEx('iPay88 ID', $e->idE()); - $this->si('Payment Option', $this->choiceT()); - if ($e->isBankCard()) { - $this->si(['Card Number' => $e->r('CCNo'), 'Cardholder' => $e->r('CCName')]); - $this->siEx([ - 'Bank ID' => $e->r('BankMID') - ,'Bank Name' => $e->r('S_bankname') - ,'Bank Country' => df_country_ctn($e->r('S_country')) - ]); + /** + * 2018-02-06 + * "Clicking the «Invoice» backend button for an order in the «Pending» state + * leads to the «Call to a member function idE() on null + * in vendor/mage2pro/ipay88/Block/Info.php:18» error": + * https://github.com/mage2pro/ipay88/issues/8 + */ + if ($e = $this->e() /** @var Event $e */) { + $this->siEx('iPay88 ID', $e->idE()); + $this->si('Payment Option', $this->choiceT()); + if ($e->isBankCard()) { + $this->si(['Card Number' => $e->r('CCNo'), 'Cardholder' => $e->r('CCName')]); + $this->siEx([ + 'Bank ID' => $e->r('BankMID') + ,'Bank Name' => $e->r('S_bankname') + ,'Bank Country' => df_country_ctn($e->r('S_country')) + ]); + } } } } \ No newline at end of file diff --git a/composer.json b/composer.json index a4d043d..427bcf7 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/ipay88" - ,"version": "1.5.0" + ,"version": "1.5.1" ,"description": "iPay88 integration with Magento 2" ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/ipay88"