Skip to content

Commit 62de9df

Browse files
cedrancontardiThiago ContardiGabrielAntalcarolineesteves
authored
Problema de Precisão em Operações com Ponto (#20)
* feat: added new credit card form * feat: added setup for old settings and minor bugfixes * fix: error with 1i18n on setting's page * fix: allow all countris by default * i18n: add new terms for language file * feat: added max installments and minum installment value * feat: added reseller token to transactions * feat: added reseller token to transactions * feat: send tracking code to Vindi * fix: mask also reseller token and token account * fix: when the card number comes with 4 digits, don't add 20 before it * fix: when the card number comes with 4 digits, don't add 20 before it * doc: added pull request template * fix: observer to bankslippix * fix: cancel unapproved orders without config * feat: adjust with phpstan * fix: error monitoring transactions * fix: worng price additional * fix: update terms to ask for a CPF on checkout * feat: don't auto select TaxVat when is not a CPF number * feat: don't auto select TaxVat when is not a CPF number * Payment link functionality created * Vindi payment method verification to send the payment link has been added * The payment link email template changed and made an email configuration to set the template * Template Id changed * Email path and list fixed * feat/VINDI-143: estilo da pagina de link de pagamento com boleto, pix, bolepix e cartao * feat/VINDI-143: estilizacao pagina link de pagamento * Use strict added to js file * ko library added * float cast removed * Applying the requested changes on payment link files * adding the vindi_customer_taxvat to additionalInformation * Fixing the bugs about payment link * VP module version has been updated * payment link email template has been changed * Deleting the payment link when it is expired * Fixing the payment link summary details * Adding a discount verification * Making the discount value positive * fix: change fingerprint loader * VINDI-143: pagina de sucesso * VINDI-143: mensagem de desconto no link de pagamento * Remove linha comentada * The payment link delete has been removed from the payment link page * fix: add fingerprint method in define * fix: customer without taxvat * fix: preventing conflict with the vindi recurrence module * feat: adding security validations and better payment link management * fix: phpstan fix * feat: creating mass sending of payment link * fix: remove await vindi fingerprint * feat: add translate * feat: automatically cancels orders whose payment link has expired more than 30 days ago * feat: custom email template * fix: remove await vindi fingerprint * fix: remove await vindi fingerprint * refactor: adding validation on payment methods and payment link success page * fix: change form with get status * feat: implementing single view system on success page * feat: translate * fix: remove await vindi fingerprint * fix: remove await vindi fingerprint * feat: expire_at field * update * update * update * update * fix: processing payment link when canceling * fix: Adjust payment data displays if the order has already been invoiced * feat: added refund functionality * fix: allow to refund * fix: remove default consumer-key, consumer secret * fix: remove default consumer-key, consumer secret * fix: remove default consumer-key, consumer secret * feat: create authentication button * refactor: add logging in refund flow * fix: address saving repeated * fix: address saving repeated * fix: logger in helper * fix: logger in helper * fix: logger in helper * refactor: add log in RefundRequest * refactor: add log in RefundRequest * refactor: add log in RefundRequest * fix: correcting the way the access_token is taken * fix: generate new access_token * refactor: refactoring duplicate code and creating tests * refactor: refactoring duplicate code and creating tests * refactor: refactoring duplicate code and creating tests * fix: call fingerprint script in all pages * fix: regenerate acces_token * v1.4.1 * fix: refresh token error * fix: it should not be possible to generate payment link via the frontend * feat: added text to return URL * fix: round the discount tag * Update composer.json * fix: floating point error --------- Co-authored-by: Thiago Contardi <thiagocontardi@hotmail.com> Co-authored-by: Thiago Contardi <thiago@bizcommerce.com.br> Co-authored-by: Contardi <contardi@users.noreply.github.com> Co-authored-by: Gabriel Antal <gabrielantalsilva@gmail.com> Co-authored-by: Caroline Esteves <carol@bizcommerce.com.br> Co-authored-by: Antal <gabriel.antal@bizcommerce.com.br> Co-authored-by: Antal <44688111+GabrielAntal@users.noreply.github.com> Co-authored-by: carolineesteves <131886821+carolineesteves@users.noreply.github.com> Co-authored-by: Iago Cedran <iago@bizcommerce.com.br>
1 parent 0fa88e3 commit 62de9df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Gateway/Request/PaymentsRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function getDiscountAmount(Order $order, $orderAmount): float
192192
{
193193
$discountAmount = (float)$order->getDiscountAmount();
194194
$transactionTotal = $order->getBaseSubtotal() + $order->getShippingAmount() + $discountAmount;
195-
if ($transactionTotal > $orderAmount) {
195+
if (round($transactionTotal - $orderAmount, 2) > 0) {
196196
$discountAmount = $transactionTotal - $orderAmount;
197197
}
198198
return round(abs($discountAmount), 2);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vindi/magento2-payments",
33
"description": "Vindi VP Payment Method for Magento 2.3+",
44
"type": "magento2-module",
5-
"version": "1.5.0",
5+
"version": "1.6.2",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"

0 commit comments

Comments
 (0)