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

Monri SDK throws an exception when payment is rejected #13

Open
abdurahmanadilovic opened this issue Jul 5, 2023 · 1 comment
Open

Comments

@abdurahmanadilovic
Copy link

abdurahmanadilovic commented Jul 5, 2023

In the test environment price of a 100 will cause the test card to be rejected, but it's not handled by the SDK, here is the stack trace

flutter: {data: declined, status: declined}
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map<dynamic, dynamic>'
#0      new PaymentResponse.fromJson (package:MonriPayments/src/payment_response.dart:17:66)
#1      _MonriPaymentsImpl.confirmPayment (package:MonriPayments/src/monri_payments.dart:131:28)
<asynchronous suspension>

data exists but the value is a String "declined" and it's not a Map. The SDK tries to cast the string as a Map

@jasminsuljic
Copy link
Contributor

Thanks for reported issue, we will take a look in next few days. @harunk-monri - just a ping :)

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