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

Get transaction API not working #5961

Closed
jessy-p opened this issue Apr 4, 2023 · 2 comments · Fixed by #10131
Closed

Get transaction API not working #5961

jessy-p opened this issue Apr 4, 2023 · 2 comments · Fixed by #10131
Assignees
Labels
category: core WC Payments core related issues, where it’s obvious. component: transactions Issues related to Transactions focus: payments acceptance & processing type: bug The issue is a confirmed bug.

Comments

@jessy-p
Copy link
Contributor

jessy-p commented Apr 4, 2023

Describe the bug

The Get Transaction API /payments/transactions/<transaction_id> does not work.

To Reproduce

  1. Set up a test site, enable REST API keys to use the WC REST APIs.
  2. Place a few orders.
  3. Replace test_site, customer_key, customer_secret in below URL, and see that the transactions are retrieved.
curl -X GET "https://<test_site.com>/wp-json/wc/v3/payments/transactions?page=1&pagesize=25&sort=date&direction=desc" \
  -u <customer_key>:<customer_secret> \
  -H "Content-Type: application/json"
  1. Similarly replace the values below, and use a transaction_id retrieved from previous API. Observe no result retrieved.
curl -X GET "https://<test_site.com>/wp-json/wc/v3/payments/transactions/<transaction_id>" \
  -u <customer_key>:<customer_secret> \
  -H "Content-Type: application/json"

Actual behavior

No result retrieved when trying to fetch a transaction detail using the get transaction API

Screenshots

N/A

Expected behavior

Transaction detail should be retrieved.

Additional context

Might be related
PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'WC_Payments_API_Client' does not have a method 'get_transactions' in /Users/jessyp/code/woocommerce-payments/includes/admin/class-wc-payments-rest-controller.php on line 50

@jessy-p jessy-p added type: bug The issue is a confirmed bug. category: core WC Payments core related issues, where it’s obvious. needs prioritisation Triage finished and issues are ready for the following processing. labels Apr 4, 2023
@jessy-p
Copy link
Contributor Author

jessy-p commented Apr 20, 2023

  • Not required as part of WCPay Extensibility APIs anymore.
  • The code is present to expose a GET transaction endpoint, but it does not work, so we may remove the redundant code as the front-end does not need this API.

@jessy-p jessy-p removed the needs prioritisation Triage finished and issues are ready for the following processing. label Apr 20, 2023
@haszari haszari added the focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). label Mar 11, 2024
@vbelolapotkov vbelolapotkov added component: transactions Issues related to Transactions focus: payments acceptance & processing and removed focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). labels Mar 13, 2024
@zmaglica zmaglica self-assigned this Jan 10, 2025
@zmaglica
Copy link
Contributor

Addressed in #10131

@mgascam mgascam added this to the WooPayments 8.9.0 milestone Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: core WC Payments core related issues, where it’s obvious. component: transactions Issues related to Transactions focus: payments acceptance & processing type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants