diff --git a/src/Paymentmethods.php b/src/Paymentmethods.php index bf75588e..d8315f4d 100644 --- a/src/Paymentmethods.php +++ b/src/Paymentmethods.php @@ -38,6 +38,8 @@ private static function reorderOutput($input) { $paymentMethods = array(); + $basePath = $input['service']['basePath']; + foreach ($input['countryOptionList'] as $country) { foreach ($country['paymentOptionList'] as $paymentOption) { if (isset($paymentMethods[$paymentOption['id']])) { @@ -46,10 +48,15 @@ private static function reorderOutput($input) $banks = array(); if (!empty($paymentOption['paymentOptionSubList'])) { foreach ($paymentOption['paymentOptionSubList'] as $optionSub) { + $image = ""; + if($paymentOption['id'] == 10){// only add images for ideal, because the rest will not have images + $image = $basePath.$optionSub['path'].$optionSub['img']; + } $bank = array(); $bank['id'] = $optionSub['id']; $bank['name'] = $optionSub['name']; $bank['visibleName'] = $optionSub['visibleName']; + $bank['image'] = $image; $banks[] = $bank; } }