Skip to content

Commit

Permalink
Merge pull request #559 from FatchipRobert/MAG2-316-Ratepay-Backend-E…
Browse files Browse the repository at this point in the history
…rrors

MAG2-316 - Added errormessage when profile request had an error
  • Loading branch information
janteuber authored Sep 19, 2024
2 parents b5f4c07 + 3e976b8 commit 6ec0bce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Helper/Ratepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 6ec0bce

Please sign in to comment.