Skip to content

Bug: AfterPayWidgetView throwing Unexpected JSON error when passing token through init #270

@SrinivasaRaoMakkena

Description

@SrinivasaRaoMakkena

🌎 Environment

  • OS Version: Andoid 15
  • Version/Commit: 4.7.0

💬 Description

When trying to load AfterPayWidgetView using init(token = $token, {},{},{}), we experience below error. This could be due to totalCost being null. We might need to provide access to pass totalCost as well through init() instead of separate init() for passing both. And if we use init() with totalCost, checksum returning as null.

Unexpected JSON token at offset 9: Expected start of the object '{', but had '"' instead at path: $.error
JSON input: {"error":"An error occurred","isValid":false,"renderType":"PAYMENT_SCHEDULE","type":"error"}

🦶 Reproduction Steps


Steps to reproduce the behavior:

# 🤔 Expected Results


PaymentSchedule should display without any errors


# 😲 Actual Results
Showing error

## Screenshots

![Image](https://github.com/user-attachments/assets/8962ecde-3de1-4a02-a573-4a1d4a421ffe)


## 📄 Stack Traces


# 🤝 Related Issues

<!--
Please provide references to any thing you think is related to this issue. Include other PRs, Issues or links to things such as Stack Overflow posts, etc.
-->

Related PRs, Issues, Links:
- #xxx, #yyy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions