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

Reason when Checkout fails #38

Open
rivella50 opened this issue Apr 18, 2023 · 6 comments
Open

Reason when Checkout fails #38

rivella50 opened this issue Apr 18, 2023 · 6 comments

Comments

@rivella50
Copy link

Hi there,

i wonder if the SumUp SDK is returning some sort of reason to this plugin when a checkout fails, and if yes, if that reason could be added into SumupPluginCheckoutResponse as a new field (and included in SumupPluginCheckoutResponse.fromMap(...))?
Best would be an enum with types like userAbortedPayment, wrongCurrency, amountTooSmall, etc.
At the moment the plugin only says that success is false which is quite a limited information and doesn't help much when trying to analyze problems around the payment process.

@sstasi95
Copy link
Collaborator

Hi,

Here you can find the SDK checkout response class documentation. Most of the interesting stuff is inside the additionalInfo dictionary, which is mapped in our SumupPluginCheckoutResponse, so all the informations should already be available in the response.

You can debug the example app in Xcode and put a breakpoint at line 80 of SwiftSumupPlugin.swift to see it yourself.

@rivella50
Copy link
Author

I believe you, no problem.
But this means there is no chance to get the reason from a not successful checkout - which is quite weird in my opinion.
Does no one need this information? Either to show to the user as result or as a parameter for any sort of analysis.

@sstasi95
Copy link
Collaborator

Most of the errors are automatically shown to the user by the SDK, for example if you try to perform a checkout with an amount lower than the minimum allowed you will see an error screen, and the same happens for other errors. In this way the user should always have a visual feedback of the error, but I agree that an error code would be handy. The android SDK provides error codes.

@rivella50
Copy link
Author

Ok that makes it a little bit better - at least for the user.
Regarding the error codes in the Android SDK: But your plugin doesn't map them neither...

@sstasi95
Copy link
Collaborator

Correct. See #26

@rivella50
Copy link
Author

I've just filed an issue on the iOS SDK. Let's see what they say.

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

No branches or pull requests

2 participants