Skip to content

Commit

Permalink
PagBank 😍 Magento
Browse files Browse the repository at this point in the history
  • Loading branch information
elisei committed Jun 28, 2023
1 parent f962f32 commit 10c636e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ESLint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Run ESLint
on: [pull_request]
on: [push, pull_request]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/magento-coding-quality.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Magento Coding Quality
on: [pull_request]
on: [push, pull_request]

jobs:
phpcs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mess-detector.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Magento Mess Detector
on: [pull_request]
on: [push, pull_request]

jobs:
build-test:
Expand Down
5 changes: 4 additions & 1 deletion Gateway/Request/ItemsDataRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@ public function getPurchaseItems(
if ($item->getParentItem()) {
continue;
}

$productName = iconv('UTF-8', 'ASCII//TRANSLIT', $item->getName());
$productName = preg_replace('/[^a-zA-Z0-9\s]/u', '', $productName);

$result[] = [
self::ITEM_REFERENCE_ID => substr($item->getSku(), 0, 60),
self::ITEM_NAME => substr($item->getName(), 0, 50),
self::ITEM_NAME => substr($productName, 0, 60),
self::ITEM_QUANTITY => $item->getQtyOrdered(),
self::ITEM_UNIT_AMOUNT => $this->config->formatPrice($item->getPrice()),
];
Expand Down

0 comments on commit 10c636e

Please sign in to comment.