Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
There is an "Update billing information" link/subtab displayed before the user has signed up or provided billing information.
Upon clicking on it, a Drupal error is displayed:
Unable to retrieve billing information.
Proposed resolution
Only show this "Update billing information" link to users who have previously provided billing info to Recurly.
Comment | File | Size | Author |
---|---|---|---|
#14 | remove_update_billing-2667504-14-2.patch | 1.29 KB | adamzimmermann |
| |||
#14 | remove_update_billing-2667504-14-1.patch | 632 bytes | adamzimmermann |
| |||
#12 | remove_update_billing-2667504-12.patch | 2.38 KB | adamzimmermann |
| |||
#8 | Screenshot 2017-04-22 11.02.01.png | 43.67 KB | markdorison |
recurly4.jpg | 29.2 KB | No Sssweat |
Comments
Comment #2
No Sssweat CreditAttribution: No Sssweat commentedComment #3
No Sssweat CreditAttribution: No Sssweat commentedComment #4
No Sssweat CreditAttribution: No Sssweat commentedComment #5
No Sssweat CreditAttribution: No Sssweat commentedComment #6
No Sssweat CreditAttribution: No Sssweat commentedComment #7
markdorisonComment #8
markdorisonComment #9
markdorisonComment #10
markdorisonComment #11
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedComment #12
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedThis seems like it should fix the issue. However, when I create a new Drupal user and subscribe to some plans, they no longer appear at /user/1/subscription. And when I try to signup for them again, I get "Please correct the following issues: You already have a subscription to this plan..". So I see the "Update Billing" tab for user 1 who previously had some plans, but I don't see it for other users, as evidently a Recurly account isn't being created, so my code denies access to this tab. So we are closer on this issue, but perhaps I'm testing this incorrectly?
I'm also unsure if simply checking for an account is enough to determine that this tab should appear. I added a check for active subscriptions as a potential solution in the access callback.
If I just uncovered a bigger problem I'm happy to file a new issue.
Comment #13
markdorison@adamzimmermann Your changes were made only on the recurly_hosted sub-module, but this is an issue even with recurlyjs.
I don't think the check should be active subscriptions. I think it should just be that they have a Recurly account.
In the main module, we implemented Access services to handle all of this type of checking.
Currently some of them are tied (more or less) to the needs of specific controllers, but some, are more generic and functional like RecurlyAccessLocalAccount. Do you think this might be better as a service like RecurlyAccessHasBillingInfo (or whatever we decide the requirement is)? Maybe just using RecurlyAccessLocalAccount is sufficient here?
Comment #14
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedAh, ok. There is a tab with the exact same title in
recurly_hosted
, so that threw me off.Should we add this access check to it also? I attached a patch that just fixes
recurlyjs
, and one that adds the check in both modules.Comment #16
markdorison@adamzimmermann I've committed your second patch that makes the change in both places.
While testing this patch, I discovered a new minor issue: #2875434: Billing tab is inconsistently named