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

Refund not reflected in charge model #257

Open
mclean25 opened this issue Apr 12, 2016 · 4 comments
Open

Refund not reflected in charge model #257

mclean25 opened this issue Apr 12, 2016 · 4 comments
Assignees
Labels

Comments

@mclean25
Copy link

I'm not sure if this is intended to be like this, but when I create a charge, and then refund it, the refunded attribute still stays at False.

Example:

In [24]: a
Out[24]: <User: alex>
In [25]: c0 = charges.create(customer=a.customer.stripe_id, amount=decimal.Decimal('17.38'))
# invoice prints
In [27]: c0.refunded
Out[27]: False

# says refunded on stripe
In [28]: refunds.create(c0)
In [29]: c0.refunded
Out[29]: False

I know this could be easily resolved by setting the attribute after the refund is made, but wasn't sure if there is something else going on that I am missing.

@ossanna16
Copy link
Contributor

@paltman Could you help with this?

@ossanna16 ossanna16 added the bug label Apr 13, 2016
@jtauber jtauber modified the milestone: post-16.07 Jul 28, 2016
@paltman
Copy link
Contributor

paltman commented Jun 22, 2017

This is happening because we are not handling the webhook right now for refund events.

We should implement the process_webhook method on this handler to sync the charge.

@paltman
Copy link
Contributor

paltman commented Jun 22, 2017

We already have the action, sync_charge_from_stripe_data implemented, we should just call it in the webhook processor.

@gregnewman
Copy link
Contributor

gregnewman commented Jun 29, 2017

I cannot reproduce this. I created a charge and then refunded it and it's showing as refunded.
Furthermore, the webhook for charges is properly calling sync_charge_from_stripe_data in the webhook processor.

refund

@paltman paltman removed this from the post-16.07 milestone Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants