Skip to content

Commit b72ac71

Browse files
authored
Fixed bug where mobile transactions where failing due to a hash misma… (#1)
Fixed bug where mobile transactions where failing due to a hash misma…
2 parents 5976982 + b35e782 commit b72ac71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Payments/Paynow.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,12 @@ private function formatInitMobile(FluentBuilder $builder, $phone, $method)
261261
$items['method'] = $method;
262262
$items['authemail'] = $builder->auth_email;
263263

264+
foreach ($items as $key => $item) {
265+
$items[$key] = trim(utf8_encode($item));
266+
}
267+
264268
$items['hash'] = Hash::make($items, strtolower($this->integrationKey));
265269

266-
foreach ($items as $key => $item) {
267-
$items[$key] = trim($item);
268-
}
269270

270271
return RequestInfo::create(Constants::URL_INITIATE_MOBILE_TRANSACTION, 'POST', $items);
271272
}

0 commit comments

Comments
 (0)