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

[WIP] Mercadopago gateway implementation #768

Merged
merged 17 commits into from
Nov 2, 2021

Conversation

sgobotta
Copy link
Contributor

@sgobotta sgobotta commented Sep 17, 2020

This is a work in progress, do not merge.

Depends on coopcycle-web/pull/1655

Closes #729

Suggestion to repository maintainers:

  • create a mercadopago branch from master
  • edit the target branch of this PR
  • delete this message afterwards

This PR provides:

  • Basic checkout using react-native-mercadopago-px using a new component MercadopagoCheckout
  • MoreInfo component refactor to choose between gateways

Pending tasks:

  • Refactor the getPreferenceId function to an http call to the server. The preferences Mercadopago request should be done server-side
  • Process the returned order from the server after the mercadopagoCheckout finishes
  • Modify react-native-mercadopago-px usage to support split payments the auth/capture payment flow. This PR won't include such functionality

@@ -3,7 +3,7 @@
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
minSdkVersion = 19
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed? Some people have quite old devices, see #745

Copy link
Member

Choose a reason for hiding this comment

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

Ok sorry, I didn't see the comment of 2373df7
I see, it appeared in version 4.29.0

Copy link
Member

@alexsegura alexsegura Sep 19, 2020

Choose a reason for hiding this comment

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

Another possibility would be to override the version, like:

mercadoPagoPxVersion = "4.28.0"

But it doesn't seem like a good idea... @jamesdgrant are there lots of messengers with Android 4.3?

@sgobotta
Copy link
Contributor Author

sgobotta commented Oct 5, 2020

@alexsegura I'm fixing conflicts with master and encountered changes in the android build tools version. Are you probably using a newer gradle version? Here's some of the output:

> Task :app:processDebugManifest FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
711 actionable tasks: 5 executed, 706 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> java.lang.NullPointerException (no error message)

Current build tools versions:

buildToolsVersion = "29.0.2"
minSdkVersion = 19
compileSdkVersion = 29
targetSdkVersion = 29

Current gradle version:

Gradle 6.0.1

Run the restart script in README.md with no success. I'll be trying other versions, please let me know if you used any other specific configuration in the last master build

🎨 Adds a few spanish translations
+ The service now interacts with the server to updated and return an order
+ Adds error handlers on payment cancel or payment error
@sgobotta
Copy link
Contributor Author

sgobotta commented Oct 9, 2020

This PR depends on facttic/coopcycle-web@84d2593

@alexsegura alexsegura merged commit 2976301 into coopcycle:master Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Mercado Pago for Latam
2 participants