Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Display banner notification about impending credit card expiration #2211

Closed
1 task
patcon opened this issue Mar 31, 2014 · 20 comments
Closed
1 task

Display banner notification about impending credit card expiration #2211

patcon opened this issue Mar 31, 2014 · 20 comments

Comments

@patcon
Copy link
Contributor

patcon commented Mar 31, 2014

Original issue

Title: Email users about impending credit card expiration

Anonymously suggested via [email protected]:
http://gittip.freshdesk.com/helpdesk/tickets/120

The user only coincidentally noticed that their card was about to expire, and was asking how we could help avoid that situation.

It seems that we could implement this (after we have access to email in #756), but fetching or storing expiration data for each card:
https://docs.balancedpayments.com/1.1/api/cards/#fetch-a-card


Revised issue

As per @rummik's suggestion, let's make this about leveraging the banner notifications implemented in #1643

To Do

  • research best way to add banner notifications
@patcon patcon added the blocked label Mar 31, 2014
@alexykot
Copy link

Sure, I know gittip doesn't collect emails by default, but I would be happy to give my email to help address the problem.

@rummik
Copy link
Contributor

rummik commented Mar 31, 2014

Shouldn't there be a notification after logging in about their card if it's about to expire?

@patcon
Copy link
Contributor Author

patcon commented Mar 31, 2014

You mean like using the feature you added here? #1643

That would be great too. Let's make this issue about that, so it's immediately actionable? (I'll revise OP and add a TODO :)

@patcon patcon added ★★☆ and removed blocked labels Mar 31, 2014
@patcon patcon changed the title Send reminders about impending credit card expiration Display banner notification about impending credit card expiration Mar 31, 2014
@rummik
Copy link
Contributor

rummik commented Mar 31, 2014

@patcon Something like that, yes :)

@domenkozar
Copy link

+1

@mushketyk
Copy link
Contributor

I'll implement this.

@patcon
Copy link
Contributor Author

patcon commented May 10, 2014

Woooo @ivanmushketyk! Need any help? Ask here or drop into #gittip on IRC if you feel like it :)

@Changaco
Copy link
Contributor

@patcon He already is in #gittip.

@mushketyk
Copy link
Contributor

@patcon Thank you, but I think I got how to do it :)

@mushketyk
Copy link
Contributor

@patcon @Changaco I've done some work on this issue and the banner is currently displayed as:
errorbar

The problem is that now it is displayed every time a user visits any page (this should be very annoying).
I see two ways how to fix that:

  1. Show the banner only in the profile page. But in this case the notification can be unnoticed, since a user not often visits his/her profile page?)
  2. To store in the database a flag that shows if a user was notified about credit card expiration. The flag can be set to true when user logs in and set to false after the first notification. Therefore a user will be notified about credit card expiration once per log-in. This flag can be stored in 'participants' table or in a new table 'sessions'.

What do you think?

@mushketyk
Copy link
Contributor

Just noticed that the build is broken in my commit. I'll check what I have broken.

@mushketyk
Copy link
Contributor

I think I don't get it. After my changes I receive the following error:

self = <vcr.cassette.Cassette object at 0x2b333a9c9e10>, request = <Request (GET) https://api.balancedpayments.com/customers/CUPeHuJm0IUdoQhklmHIZCM>

    def play_response(self, request):
        '''
            Get the response corresponding to a request, but only if it
            hasn't been played back before, and mark it as playe.d
            '''
        for index, (stored_request, response) in enumerate(self.data):
            if requests_match(request, stored_request, self._match_on):
                if self.play_counts[index] == 0:
                    self.play_counts[index] += 1
                    return response
        # The cassette doesn't contain the request asked for.
        raise UnhandledHTTPRequestError(
            "The cassette (%r) doesn't contain the request (%r) asked for"
>           % (self._path, request)
        )
E       UnhandledHTTPRequestError: "The cassette (u'/home/proger/Projects/gittip/tests/py/fixtures/TestBalancedCard.yml') doesn't contain the request (<Request (GET) https://api.balancedpayments.com/customers/CUPeHuJm0IUdoQhklmHIZCM>) asked for"

I thought that I broke it with changes to gittip/billing/init.py. But after I commented my changes out on my local machine the tests are still failing with the same error.
I am confused, about how my changes could cause this error. Could you please take a look?

@seanlinsley
Copy link
Contributor

@ivanmushketyk could you please open a pull request for your branch?

@mushketyk
Copy link
Contributor

I've fixed the build.

@mushketyk
Copy link
Contributor

@seanlinsley I can, but the work is not yet finished. Did you proposed to open a pull request to help investigate the issue with build (fixed already) or to move discussion about this issue to the pull request comments?

@Changaco
Copy link
Contributor

@ivanmushketyk Adding except: pass is not a proper fix.

@mushketyk
Copy link
Contributor

@Changaco I am sorry. You are right.

@codebykat
Copy link

Not sure if this needs a new issue or not, but I noticed this banner today and was annoyed that it warned me (on every single page! including the credit card update page!) but didn't have a freaking link in it to update my credit card info. I had to hunt around on the site to figure out where to update that info. :P

@seanlinsley
Copy link
Contributor

@codebykat that definitely deserves its own ticket

@codebykat
Copy link

@seanlinsley #2471 😃

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

No branches or pull requests

8 participants