Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsantosd committed Jun 15, 2023
1 parent 7bdc7e4 commit b2712e2
Show file tree
Hide file tree
Showing 29 changed files with 1,454 additions and 1,194 deletions.
Binary file removed .github/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.2"
php-version: "7.4"
extensions: curl, dom, intl, json, openssl
coverage: xdebug
tools: phpmd
tools: phpmd, composer:2.0

- name: Verify PHP Installation
run: php -v
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
php-version: "7.4"
extensions: curl, dom, intl, json, openssl
coverage: xdebug
tools: composer:2.0
coverage: xdebug2

- name: Verify PHP Installation
run: php -v
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:

- name: Run Unit Test
id: unit-test
run: magento2/vendor/phpunit/phpunit/phpunit --configuration magento2/app/code/MercadoPago/AdbPayment/phpunit.xml --coverage-clover clover.xml --coverage-text magento2/app/code/MercadoPago/AdbPayment/Tests
run: magento2/vendor/phpunit/phpunit/phpunit --coverage-clover clover.xml --coverage-text --whitelist magento2/app/code/MercadoPago/AdbPayment magento2/app/code/MercadoPago/AdbPayment/Tests

- name: Repository Minimum Test Coverage
id: repository-coverage
Expand Down
Binary file removed Block/.DS_Store
Binary file not shown.
Binary file removed Gateway/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Gateway/Http/Client/FetchPaymentClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class FetchPaymentClient implements ClientInterface
*/
protected $json;

protected Notification $mpApiNotification;
protected $mpApiNotification;

/**
* @param Logger $logger
Expand Down
2 changes: 1 addition & 1 deletion Gateway/Http/Client/RefundClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public function placeRequest(TransferInterface $transferObject)
* @return array
*/
public function placeMultipleRefunds (
object $order,
$order,
ZendClient $client,
string $url,
array $request,
Expand Down
2 changes: 1 addition & 1 deletion Gateway/Response/FetchPaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public function updatePaymentByIndex(

$payment->setAdditionalInformation(
$mpStatusDetail,
$mpPayment[self::STATUS_DETAIL],
$mpPayment[self::STATUS_DETAIL]
);

if (isset($mpPayment[self::PAYMENT_METHOD_INFO][self::DATE_OF_EXPIRATION])){
Expand Down
2 changes: 1 addition & 1 deletion Gateway/Response/TxnIdTwoCcHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function handle(array $handlingSubject, array $response)

$payment->setAdditionalInformation(
str_replace('%', $i,'mp_%_status_detail'),
$response[self::TRANSACTION_INFO][$i][self::STATUS_DETAIL],
$response[self::TRANSACTION_INFO][$i][self::STATUS_DETAIL]
);

endfor;
Expand Down
Binary file removed Model/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Model/Adminhtml/Source/PaymentGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function _getHeaderCommentHtml($element)
protected function _isCollapseState($element)
{
$extra = $this->_authSession->getUser()->getExtra();
if (isset($extra['configState'][$element->getId()])) {
if (isset($extra['configState']) && isset($extra['configState'][$element->getId()])) {
return $extra['configState'][$element->getId()];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function add($orderId, $childTransaction)
'Order %1 - Increment Id %2 - state %3',
$orderId,
$order->getIncrementId(),
$order->getState(),
$order->getState()
)
.'</info>'
);
Expand Down
2 changes: 1 addition & 1 deletion Model/Console/Command/Notification/FetchStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function fetch($orderId, $notificationId)
'Order %1 - Increment Id %2 - state %3',
$orderId,
$order->getIncrementId(),
$order->getState(),
$order->getState()
)
.'</info>'
);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ Visite nossa [Wiki][wiki] e veja como configurar e instalar nosso módulo.

[Open Source License](LICENSE)

[wiki]: <https://github.com/mercadopago/adb-payment/wiki>
[wiki]: <https://github.com/mercadopago/adb-payment-23/wiki>
10 changes: 5 additions & 5 deletions bin/install-mg2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

sudo pecl install -f xdebug-2.9.8

echo "Getting Magento 2.4.5..."
curl -LO https://github.com/magento/magento2/archive/refs/tags/2.4.3.zip
unzip -qq 2.4.3.zip
mv magento2-2.4.3 magento2
echo "Getting Magento 2.3.7..."
curl -LO https://github.com/magento/magento2/archive/refs/tags/2.3.7.zip
unzip -qq 2.3.7.zip
mv magento2-2.3.7 magento2

cd magento2

Expand All @@ -20,4 +20,4 @@ bin/magento setup:upgrade
bin/magento module:enable --all --clear-static-content
php -d memory_limit=5G bin/magento setup:di:compile

rm -rf ../2.4.3.zip
rm -rf ../2.3.7.zip
4 changes: 2 additions & 2 deletions bin/pull-request-coverage.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

echo "Getting pull request head branch..."
export PHPUNIT_HEAD_BRANCH=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mercadopago/adb-payment-plugin/pulls/${PR_NUMBER} \
export PHPUNIT_HEAD_BRANCH=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mercadopago/adb-payment-23/pulls/${PR_NUMBER} \
| jq ".head.ref" \
| xargs)

echo "Getting pull request files..."
export PHPUNIT_FILES=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mercadopago/adb-payment-plugin/pulls/${PR_NUMBER}/files \
export PHPUNIT_FILES=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/mercadopago/adb-payment-23/pulls/${PR_NUMBER}/files \
| jq ".[].filename" \
| grep -E 'php"$' \
| xargs)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "mercadopago/adb-payment",
"name": "mercadopago/adb-payment-23",
"description": "MercadoPago - Payment for Adobe Commerce",
"require": {
"php": "~7.2.0||~7.3.0||~7.4.0",
Expand All @@ -15,7 +15,7 @@
"magento/module-ui": ">=101.0.4",
"magento/module-payment": "^100.3",
"magento/module-vault": "101.*",
"magento/zendframework1": "~1.15.1",
"magento/zendframework1": "~1.14.0",
"ext-json": "*",
"ext-gd": "*",
"ext-zip": "*"
Expand Down
Loading

0 comments on commit b2712e2

Please sign in to comment.