diff --git a/Helper/Ratepay.php b/Helper/Ratepay.php index edaf2146..843a7009 100644 --- a/Helper/Ratepay.php +++ b/Helper/Ratepay.php @@ -215,6 +215,10 @@ public function refreshProfiles($sMethodCode) $aShopIds = $this->getRatepayShopConfigByPaymentMethod($sMethodCode); foreach ($aShopIds as $aConfig) { $aResult = $this->profile->sendRequest($aConfig['shop_id'], $aConfig['currency'], $sMode); + if (!isset($aResult['status']) || $aResult['status'] != 'OK') { + throw new \Exception("An error occured".(!empty($aResult['errormessage']) ? ": ".$aResult['errormessage'] : "")); + } + $this->profileResource->updateProfileConfig($aConfig['shop_id'], $aResult); } }