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

Fix JSON error in transaction initiation #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dahromy
Copy link

@dahromy dahromy commented Jan 3, 2025

Modify src/Agents/RequestAgent.php to handle JSON response parsing more robustly.

  • Store the raw response in the rawResponse property before decoding it.
  • Update the handleResponse method to use the rawResponse property for decoding.

Modify src/ApiCall.php to ensure the response is correctly set and retrieved.

  • Update the execute method to set the response from the RequestAgent.

Add a test case in test/IpnValidationTest.php to verify JSON response handling.

  • Add a new test method testJsonResponseHandling to check the JSON response parsing.

Modify `src/Agents/RequestAgent.php` to handle JSON response parsing more robustly.

* Store the raw response in the `rawResponse` property before decoding it.
* Update the `handleResponse` method to use the `rawResponse` property for decoding.

Modify `src/ApiCall.php` to ensure the response is correctly set and retrieved.

* Update the `execute` method to set the response from the `RequestAgent`.

Add a test case in `test/IpnValidationTest.php` to verify JSON response handling.

* Add a new test method `testJsonResponseHandling` to check the JSON response parsing.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dahromy/coinpayments?shareId=XXXX-XXXX-XXXX-XXXX).
Fix JSON error in transaction initiation
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.

1 participant