From 17705b0dd7b58e602fe37dc19b7e04ebe10b1b6b Mon Sep 17 00:00:00 2001 From: Bruna Rubio Date: Thu, 26 Jun 2025 15:26:48 -0300 Subject: [PATCH] Revert #198 - Update Brazil IOF rate --- src/Models/Configs/Config.php | 2 +- tests/Unit/Services/Gateways/CreditCardTest.php | 4 ++-- tests/Unit/Services/Gateways/PixTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Models/Configs/Config.php b/src/Models/Configs/Config.php index c1b73a50..715be12c 100644 --- a/src/Models/Configs/Config.php +++ b/src/Models/Configs/Config.php @@ -6,7 +6,7 @@ class Config extends BaseModel implements AddableConfig { - const IOF = 0.035; + const IOF = 0.0038; /** * Live integration key. diff --git a/tests/Unit/Services/Gateways/CreditCardTest.php b/tests/Unit/Services/Gateways/CreditCardTest.php index eba5ebee..f7024096 100644 --- a/tests/Unit/Services/Gateways/CreditCardTest.php +++ b/tests/Unit/Services/Gateways/CreditCardTest.php @@ -205,7 +205,7 @@ public function testPaymentTermsForCountryAndValue() $this->assertTrue(is_array($paymentTerms), 'Failed to return array of payment terms'); $this->assertEquals( - 10, + 9, count($paymentTerms), 'Wrong number of payment terms' ); @@ -221,7 +221,7 @@ public function testPaymentTermsForCountryAndValue() } $interest = 0.1; - for ($i = 6; $i < 10; $i++) { + for ($i = 6; $i < 9; $i++) { $this->assertInterestInPaymentTerm($paymentTerms[$i], $value, $interest); } } diff --git a/tests/Unit/Services/Gateways/PixTest.php b/tests/Unit/Services/Gateways/PixTest.php index fc0835a3..5f86e39f 100644 --- a/tests/Unit/Services/Gateways/PixTest.php +++ b/tests/Unit/Services/Gateways/PixTest.php @@ -56,6 +56,6 @@ public function testAvailabilityWithWrongLocalCurrency() public function getPixSuccessfulResponseJson() { - return '{"payment":{"hash":"6006eda8694708f8032b19911e86d4a904cfe8e9b35303bd","pin":"067483265","country":"br","merchant_payment_code":"8FA1240A6C84","order_number":null,"status":"OP","status_date":null,"open_date":"2021-01-19 14:33:11","confirm_date":null,"transfer_date":null,"amount_br":103.50,"amount_ext":100,"amount_iof":3.5,"currency_rate":1,"currency_ext":"BRL","due_date":"2021-01-22","instalments":1,"payment_type_code":"pix","pre_approved":false,"capture_available":null,"customer":null},"redirect_url":"https://checkout.ebanx.com/checkout?hash=6006eda8694708f8032b19911e86d4a904cfe8e9b35303bd","status":"SUCCESS"}'; + return '{"payment":{"hash":"6006eda8694708f8032b19911e86d4a904cfe8e9b35303bd","pin":"067483265","country":"br","merchant_payment_code":"8FA1240A6C84","order_number":null,"status":"OP","status_date":null,"open_date":"2021-01-19 14:33:11","confirm_date":null,"transfer_date":null,"amount_br":100.38,"amount_ext":100,"amount_iof":0.38,"currency_rate":1,"currency_ext":"BRL","due_date":"2021-01-22","instalments":1,"payment_type_code":"pix","pre_approved":false,"capture_available":null,"customer":null},"redirect_url":"https://checkout.ebanx.com/checkout?hash=6006eda8694708f8032b19911e86d4a904cfe8e9b35303bd","status":"SUCCESS"}'; } }