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

Runtime enviroment (skip SSL on localhost) #487

Merged

Conversation

marcelino-borges
Copy link
Contributor

@marcelino-borges marcelino-borges commented Dec 3, 2023

Changes made to the feature:

  • Added the possibility of bypassing SSL verification when the developer is running the app in localhost;
  • Patch on MercadoPagoConfig class, adding the field runtime_enviroment and class constants for LOCAL and SERVER options, as well as getter and setter for the runtime_enviroment;
  • Patch on MPDefaultHttpClient class, adding logic to the function createHttpRequestOptions that will allow the program to check if the dev has configured runtime enviroment to LOCAL, setting to false both CURLOPT_SSL_VERIFYHOST and CURLOPT_SSL_VERIFYPEER in options array in case he's set to LOCAL;
  • Created a InvalidArgumentException class (used in MercadoPagoConfig->setRuntimeEnviroment()).

General changes

  • Added documented flows in README.md about Checkout Pro (Preferences creation)

Issues closed

OBS

  • Unit tests not added considering there were no tests implemented for these existing classes

PR validation checklist:

  • Title and clear description of the PR
  • Tests of my functionality
  • Documentation of my functionality
  • Tests executed and passed
  • Branch Coverage >= 80%

Copy link
Contributor

@rhames07 rhames07 left a comment

Choose a reason for hiding this comment

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

PR Reviewed! Thank you for your contribution @marcelino-borges !

@rhames07 rhames07 merged commit 1b8b206 into mercadopago:master Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants