bitpay / bitpay-checkout-magento2

BitPay Integration for Magento 2
14 stars 20 forks source link

Undefined property: stdClass::$data in Bitpay/BPCheckout/Observer/BPRedirect.php on line 308 #30

Closed jtalel closed 4 years ago

jtalel commented 4 years ago

Magento 2.2.8, Installed v3.12.1911 with merge from #28.

Following issue appears in Test mode, during checkout when "redirect" is supposed to happen:

1 exception(s):
Exception #0 (Exception): Notice: Undefined property: stdClass::$data in /var/www/html/magento2/app/code/Bitpay/BPCheckout/Observer/BPRedirect.php on line 308

Exception #0 (Exception): Notice: Undefined property: stdClass::$data in /var/www/html/magento2/app/code/Bitpay/BPCheckout/Observer/BPRedirect.php on line 308
<pre>#1 Bitpay\BPCheckout\Observer\BPRedirect->execute(&Magento\Framework\Event\Observer#00000000209e51b5000000000aff4e24#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:72]
#2 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(&Bitpay\BPCheckout\Observer\BPRedirect#00000000209e5355000000000aff4e24#, &Magento\Framework\Event\Observer#00000000209e51b5000000000aff4e24#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:60]
#3 Magento\Framework\Event\Invoker\InvokerDefault->dispatch(array('instance' => 'Bitpay\BPCheckou...', 'name' => 'bpcheckout_contr...'), &Magento\Framework\Event\Observer#00000000209e51b5000000000aff4e24#) called at [vendor/magento/framework/Event/Manager.php:66]
#4 Magento\Framework\Event\Manager->dispatch('checkout_onepage...', array('order_ids' => array(41959))) called at [generated/code/Magento/Framework/Event/Manager/Proxy.php:95]
#5 Magento\Framework\Event\Manager\Proxy->dispatch('checkout_onepage...', array('order_ids' => array(41959))) called at [vendor/magento/module-checkout/Controller/Onepage/Success.php:27]
#6 Magento\Checkout\Controller\Onepage\Success->execute() called at [vendor/magento/framework/App/Action/Action.php:107]
#7 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/module-checkout/Controller/Onepage.php:161]
#8 Magento\Checkout\Controller\Onepage->dispatch(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#9 Magento\Checkout\Controller\Onepage\Success\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#10 Magento\Checkout\Controller\Onepage\Success\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#11 Magento\Checkout\Controller\Onepage\Success\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#), array(array('designLoader', 'customerNotifica...', 'catalog_app_acti...', 'tax-app-action-d...', 'weee-app-action-...', 'storeCheck', 'contextPlugin', 'customer-app-act...', 'Webkul_SellerSub...'))) called at [generated/code/Magento/Checkout/Controller/Onepage/Success/Interceptor.php:26]
#12 Magento\Checkout\Controller\Onepage\Success\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/App/FrontController.php:55]
#13 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#14 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#15 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94]
#16 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#00000000209e7798000000000aff4e24#, &Closure#00000000209e7799000000000aff4e24#, &Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#17 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73]
#18 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#00000000209e7798000000000aff4e24#, &Closure#00000000209e7799000000000aff4e24#, &Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#19 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/amasty/aminvisiblecaptcha/Plugin/Predispatch.php:112]
#20 Amasty\InvisibleCaptcha\Plugin\Predispatch->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#00000000209e7798000000000aff4e24#, &Closure#00000000209e7799000000000aff4e24#, &Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#21 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#22 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#), NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#23 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000209e76c3000000000aff4e24#) called at [vendor/magento/framework/App/Http.php:136]
#24 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:257]
#25 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000209e762c000000000aff4e24#) called at [index.php:48]
</pre>

Note: this also happens in "modal" mode.

jtalel commented 4 years ago

Issue was happening because no settlements were provided by me in BitPay testnet.

An invoice could not be created because you have not yet provided settlement settings for your BitPay account.

Your customer was not able to make a payment and was shown an error message indicating that the transaction could not be initiated at this time. We have instructed the customer to email your team with details on the attempted payment.