verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

Postie failing to provide AusPost Values #18

Closed dwhoban closed 4 years ago

dwhoban commented 4 years ago

Description

Postie generating an internal error on checkout when attempting to calculate shipping.

I think this is caused when only using International shipping from AusPost and the customer is in Australia.

Steps to reproduce

  1. Customer adds to cart
  2. Customer confirms shipping address
  3. Error

Additional info

Error

Error: Call to undefined method yii\base\ErrorException::hasResponse() in /home/vagrant/allinseason.com.au/vendor/verbb/postie/src/providers/AustraliaPost.php:139
Stack trace:
#0 /home/vagrant/allinseason.com.au/vendor/verbb/postie/src/base/Provider.php(240): verbb\postie\providers\AustraliaPost->fetchShippingRates(Object(craft\commerce\elements\Order))
#1 /home/vagrant/allinseason.com.au/vendor/verbb/postie/src/base/Provider.php(223): verbb\postie\base\Provider->prepareFetchShippingRates(Object(craft\commerce\elements\Order))
#2 /home/vagrant/allinseason.com.au/vendor/verbb/postie/src/services/Service.php(32): verbb\postie\base\Provider->getShippingRates(Object(craft\commerce\elements\Order))
#3 [internal function]: verbb\postie\services\Service->registerShippingMethods(Object(craft\commerce\events\RegisterAvailableShippingMethodsEvent))
#4 /home/vagrant/allinseason.com.au/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Array, Object(craft\commerce\events\RegisterAvailableShippingMethodsEvent))
#5 /home/vagrant/allinseason.com.au/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger('craft\\commerce\\...', 'registerAvailab...', Object(craft\commerce\events\RegisterAvailableShippingMethodsEvent))
#6 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/services/ShippingMethods.php(171): yii\base\Component->trigger('registerAvailab...', Object(craft\commerce\events\RegisterAvailableShippingMethodsEvent))
#7 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/elements/Order.php(1513): craft\commerce\services\ShippingMethods->getAvailableShippingMethods(Object(craft\commerce\elements\Order))
#8 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/adjusters/Shipping.php(50): craft\commerce\elements\Order->getShippingMethod()
#9 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/elements/Order.php(841): craft\commerce\adjusters\Shipping->adjust(Object(craft\commerce\elements\Order))
#10 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/elements/Order.php(887): craft\commerce\elements\Order->recalculate()
#11 /home/vagrant/allinseason.com.au/vendor/craftcms/cms/src/services/Elements.php(1975): craft\commerce\elements\Order->afterSave(false)
#12 /home/vagrant/allinseason.com.au/vendor/craftcms/cms/src/services/Elements.php(488): craft\services\Elements->_saveElementInternal(Object(craft\commerce\elements\Order), false, false)
#13 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/controllers/CartController.php(354): craft\services\Elements->saveElement(Object(craft\commerce\elements\Order), false)
#14 /home/vagrant/allinseason.com.au/vendor/craftcms/commerce/src/controllers/CartController.php(337): craft\commerce\controllers\CartController->_returnCart()
#15 [internal function]: craft\commerce\controllers\CartController->actionUpdateCart()
#16 /home/vagrant/allinseason.com.au/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#17 /home/vagrant/allinseason.com.au/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#18 /home/vagrant/allinseason.com.au/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('update-cart', Array)
#19 /home/vagrant/allinseason.com.au/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('update-cart', Array)
#20 /home/vagrant/allinseason.com.au/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('commerce/cart/u...', Array)
#21 /home/vagrant/allinseason.com.au/vendor/craftcms/cms/src/web/Application.php(566): craft\web\Application->runAction('commerce/cart/u...', Array)
#22 /home/vagrant/allinseason.com.au/vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#23 /home/vagrant/allinseason.com.au/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#24 /home/vagrant/allinseason.com.au/web/index.php(21): yii\base\Application->run()
#25 {main}
engram-design commented 4 years ago

Fixed in 2.1.0