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

Notify via a Salesforce Task of Circle charge failures #69

Merged
merged 7 commits into from
Nov 30, 2018
Merged

Conversation

x110dc
Copy link
Contributor

@x110dc x110dc commented Nov 30, 2018

What's this PR do?

It notifies them immediately when a Circle member's charge fails.

Why are we doing this? How does it help us?

Terry wants to know right away so she can contact the member.

How should this be manually tested?

It's a little work.

  • add this to your env-docker file:
    CIRCLE_FAILURE_RECIPIENT=givalike@texastribune.org.stripeblas
  • start the container
  • create a file, say tmp.py
  • put this code in it:
from npsp import RDO, Contact
from charges import charge

contact = Contact.get(email="abc123@foobar.com")

rdo = RDO(contact=contact)

rdo.stripe_customer = "cus_E3k0SBDJim7sS1"
rdo.amount = 1
rdo.installments = 3
rdo.installment_period = "yearly"
rdo.type = "Giving Circle"
rdo.save()

opportunity = rdo.opportunities()[0]

charge(opportunity)

print(opportunity.stage_name)
print(opportunity.closed_lost_reason)
  • Run that: python tmp.py
  • Ask me to verify that a task got created.

How should this change be communicated to end users?

Let Terry and Jenny know it's complete.

Are there any smells or added technical debt to note?

No.

What are the relevant tickets?

https://3.basecamp.com/3098728/buckets/736178/todos/1376643126

Have you done the following, if applicable:

(optional: add explanation between parentheses)

  • Added automated tests? ( )
  • Tested manually on mobile? (N/A)
  • Checked for performance implications? (negligible)
  • Checked for security implications? ( )
  • Updated the documentation/wiki? (will on merge/deploy)

Copy link
Contributor

@AndrewGibson27 AndrewGibson27 left a comment

Choose a reason for hiding this comment

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

I ran that code. LMK if a task got created.

@x110dc x110dc merged commit 0ce7459 into master Nov 30, 2018
@x110dc x110dc deleted the notify-circle branch November 30, 2018 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants