Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: automatic payments (MercadoPago and PagSeguro) #8

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

brenozd
Copy link

@brenozd brenozd commented May 5, 2023

This PR fixes the automatic delivery of coins (lucasgiovannibr/canaryaac#6) that were paid via MercadoPago or PagSeguro.
Besides that, it handles the automatic Refunded and ChargedBack payments.

Things that are included in this PR that is not related to automatic delivery:

Net and gross amount of payments available at admin donation dashboard
Places where 12h format was used changed to 24h hour format
Inserting coin received event into store_history table, so the player can see when the coins were received
Setting PagSeguro payment methods to CreditCard, Boleto, and Wallet Balance
Excluding the Ticket payment methods from MercadoPago
Commented PagSeguro lightbox from paymentsummary.html.twig since it's not in use not
Updating PagSeguro and MercadoPago SDK to the latest versions (6.0 and 2.4.2 respectively)
Setting MercadoPago sandbox and MercadoPago max Installments trough ENV
Columns house_id and town_id from table house now have a default value of 0 (it was giving some errors on canary shutdown)
Did not change anything on the PayPal side because its SDK is deprecated, besides that MercadoPago allows to pay with PayPal wallet.

Tested with PHP 8.1 at Debian 11 using MercadoPago and PagSeguro sandbox environments.

@dudantas dudantas changed the title Fix Automatic Payments (MercadoPago and PagSeguro) fix: automatic payments (MercadoPago and PagSeguro) May 8, 2023
Copy link
Member

@dudantas dudantas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider changing the places where there is a mixture of English/Portuguese, I noticed two cases and already suggested changing, maybe there are more. Thanks for the attention.

app/Payment/PagSeguro/ApiPagSeguro.php Outdated Show resolved Hide resolved
.env Outdated Show resolved Hide resolved
app/Payment/PagSeguro/ApiPagSeguro.php Outdated Show resolved Hide resolved
app/Payment/MercadoPago/ApiMercadoPago.php Outdated Show resolved Hide resolved
brenozd and others added 4 commits May 8, 2023 13:32
Co-authored-by: Eduardo Dantas <eduardo.dantas@hotmail.com.br>
Co-authored-by: Eduardo Dantas <eduardo.dantas@hotmail.com.br>
Co-authored-by: Eduardo Dantas <eduardo.dantas@hotmail.com.br>
Co-authored-by: Eduardo Dantas <eduardo.dantas@hotmail.com.br>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 4, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 5 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 86 Code Smells

No Coverage information No Coverage information
4.0% 4.0% Duplication

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants