Skip to content

Commit ff40358

Browse files
author
Andy Pieters
committed
Added bank images to the ideal bank list
1 parent aa375ee commit ff40358

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Paymentmethods.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ private static function reorderOutput($input)
3838
{
3939
$paymentMethods = array();
4040

41+
$basePath = $input['service']['basePath'];
42+
4143
foreach ($input['countryOptionList'] as $country) {
4244
foreach ($country['paymentOptionList'] as $paymentOption) {
4345
if (isset($paymentMethods[$paymentOption['id']])) {
@@ -46,10 +48,15 @@ private static function reorderOutput($input)
4648
$banks = array();
4749
if (!empty($paymentOption['paymentOptionSubList'])) {
4850
foreach ($paymentOption['paymentOptionSubList'] as $optionSub) {
51+
$image = "";
52+
if($paymentOption['id'] == 10){// only add images for ideal, because the rest will not have images
53+
$image = $basePath.$optionSub['path'].$optionSub['img'];
54+
}
4955
$bank = array();
5056
$bank['id'] = $optionSub['id'];
5157
$bank['name'] = $optionSub['name'];
5258
$bank['visibleName'] = $optionSub['visibleName'];
59+
$bank['image'] = $image;
5360
$banks[] = $bank;
5461
}
5562
}

0 commit comments

Comments
 (0)