Skip to content

Conversation

andesol
Copy link
Contributor

@andesol andesol commented Jan 22, 2025

Done

  • Update "payment methods" page to allow removing the payment method
  • If removed, show warning notification on Pro dashboard and disable renewal and resize features
  • Use singular: "Payment method", as there's only one

QA

  • Open demo or run site locally
  • Go to /account/payment-methods
  • Remove the credit card
    • The card goes away and it shows an empty state type of page
  • Go to /pro/dashboard
    • There's a warning notification stating there's no payment method
    • You can't change renewal settings
    • You can't edit/resize any subscription
  • Compare with design

Issue

https://warthogs.atlassian.net/browse/WD-18327

@webteam-app
Copy link

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 63.14%. Comparing base (c66b90d) to head (ce71415).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
webapp/shop/views.py 37.50% 5 Missing ⚠️
static/js/src/advantage/api/contracts.js 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14670      +/-   ##
==========================================
+ Coverage   58.19%   63.14%   +4.94%     
==========================================
  Files          49      169     +120     
  Lines        6617    10079    +3462     
  Branches        0     1192    +1192     
==========================================
+ Hits         3851     6364    +2513     
- Misses       2766     3686     +920     
- Partials        0       29      +29     
Files with missing lines Coverage Δ
...ents/Subscriptions/Notifications/Notifications.tsx 87.87% <100.00%> (ø)
...ubscriptions/SubscriptionEdit/SubscriptionEdit.tsx 83.21% <100.00%> (ø)
...bscriptionList/RenewalSettings/RenewalSettings.tsx 96.10% <100.00%> (ø)
...s/src/advantage/react/hooks/useHasPaymentMethod.ts 100.00% <100.00%> (ø)
.../subscribe/checkout/components/Summary/Summary.tsx 81.25% <ø> (ø)
.../checkout/components/UserInfoForm/UserInfoForm.tsx 70.22% <ø> (ø)
tests/shop/advantage/test_api.py 100.00% <100.00%> (ø)
webapp/app.py 89.96% <100.00%> (+0.03%) ⬆️
webapp/shop/api/ua_contracts/api.py 76.33% <100.00%> (+0.28%) ⬆️
webapp/shop/schemas.py 100.00% <100.00%> (ø)
... and 2 more

... and 113 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andesol andesol force-pushed the credit-card-mgmt branch 5 times, most recently from cb9ec35 to 4ef9df2 Compare January 30, 2025 16:05
@andesol andesol force-pushed the credit-card-mgmt branch 3 times, most recently from 36dfd12 to d54aff8 Compare February 3, 2025 08:35
@andesol andesol marked this pull request as ready for review February 3, 2025 09:27
@andesol andesol force-pushed the credit-card-mgmt branch 3 times, most recently from 8a3e0e1 to e6672de Compare February 6, 2025 14:55
@andesol andesol requested a review from minkyngkm February 6, 2025 15:22
@minkyngkm
Copy link
Contributor

If no card presented, all auto renewal should be switched off on the dashboard, right?
but it seems it's not switched off
image
image

@minkyngkm
Copy link
Contributor

Looking good @andesol I've just made some comments for what I found 👍

Copy link
Contributor Author

@andesol andesol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @minkyngkm! I addressed some of your comments. As discussed before, we want to keep the autorenewal independent from this change.

Seems like we have something to clarify before this can land, plus a back-end issue. So let's keep it on hold for now.

<div>
{% if not is_in_maintenance %}<a class="p-button--positive" href="/pro/subscribe">Buy new subscription</a>{% endif %}
<a class="p-button" href="/account/invoices">Invoices</a>
<a class="p-button" href="/account/payment-methods">Payment method</a>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only real change. Rest is formatting

@andesol andesol force-pushed the credit-card-mgmt branch from eb79b76 to 81db827 Compare June 18, 2025 17:39
@andesol
Copy link
Contributor Author

andesol commented Jun 18, 2025

@abhigyanghosh30 Branch updated, please have a look

@abhigyanghosh30
Copy link
Contributor

Approved but waiting on the final decision about disabling cancel subscription button if payment method is unavailable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants