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

Payment Activity Card shows an error for new accounts: Error retrieving payment activity data. #8708

Closed
Tracked by #8484
Jinksi opened this issue Apr 24, 2024 · 2 comments
Assignees
Labels
category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting type: bug The issue is a confirmed bug.

Comments

@Jinksi
Copy link
Member

Jinksi commented Apr 24, 2024

Describe the bug

An error is shown when rendering the Payment Activity Card for new accounts who may not have added a deposit destination or verified identity.

Error retrieving payment activity data

The response from /wp-json/wc/v3/payments/reporting/payment_activity:

{
  "code": "wcpay_invalid_currency",
  "message": "Error: Invalid currency.",
  "data": null
}

Tip

See server endpoint /reporting/payment_activity handler here

To Reproduce

  1. Onboard as a fresh WooPayments account. Don't add a deposit destination (bank account) or very user identity yet.
  2. Purchase a product to bring Payments → Overview total balance > 0.
  3. Enable the feature flag: wp option update _wcpay_feature_payment_overview_widget 1
  4. Visit Payments → Overview.
  5. Notice the error in the bottom-right. Error retrieving payment activity data.
  6. Notice the Payment Activity Card amounts are incorrectly rendered as 0
  7. In browser dev tools, notice the response from /wp-json/wc/v3/payments/reporting/payment_activity matches the error json response above.

Screenshots

image

Expected behavior

For new accounts, the Payment Activity Card amounts should render with the correct amounts and without errors, or not render at all.

@Jinksi Jinksi added type: bug The issue is a confirmed bug. category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting labels Apr 24, 2024
@jessy-p jessy-p self-assigned this Apr 25, 2024
@jessy-p
Copy link
Contributor

jessy-p commented Apr 25, 2024

Able to replicate the issue.

Tested with an account not properly onboarded.
image

When there is no transactions, i.e. `lifetime_total_payment_volume' is 0, seeing the empty screen as expected
image

We can skip adding payout account, but place orders so that the `lifetime_total_payment_volume' is non-zero, the API returns error and the values are 0.

@jessy-p
Copy link
Contributor

jessy-p commented Apr 30, 2024

@jessy-p jessy-p closed this as completed Apr 30, 2024
@nagpai nagpai added this to the Helix WooPayments 7.6 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: projects For any issues which are part of any project, including bugs, enhancements, etc. focus: reporting type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants