Open blueyed opened 7 years ago
@paltman Any input on this? You've added the tests/fixtures in 7c8fbae4 (where I still fail to see where this would match, i.e. "bitcoin_receiver"
sync_payment_source_from_stripe_data
itself was added in 3aca8ae.
The iOS SDK has some fixtures, e.g. for card sources (https://github.com/stripe/stripe-ios/blob/master/Tests/Tests/CardSource.json).
The actual card object seems to be something different (from the cards endpoint, not what cu["sources"]
would give you (https://github.com/stripe/stripe-ios/blob/master/Tests/Tests/Card.json).
And this would be the actual bitcoin source: https://github.com/stripe/stripe-ios/blob/master/Tests/Tests/BitcoinSource.json.
@paltman @lukeburden Don't you see a problem with this in your webhooks? I've created https://github.com/pinax/pinax-stripe/pull/407 for now.
While it is better by now I would not consider this to be fixed.
There are remaining questions, and it is likely still broken with "bitcoin_receiver"
, and maybe missing other use cases even.
Issue Summary
I am seeing KeyErrors for
'active'
viaThis is because
sync_payment_source_from_stripe_data
considers this to be a bitcoin source (via https://github.com/pinax/pinax-stripe/blob/787ea7e17ff32a4b87152655fa6dfea85de755ec/pinax/stripe/actions/sources.py#L117), but the check forid starts with "card"
should probably rather look at thetype
:As far as I know this is an example testing card provided by Stripe itself:
I think
sync_bitcoin
should only be used if thetype
is"bitcoin"
. This is not included in the list of values for"type"
however (https://stripe.com/docs/api/python#source_object-type), but used in the example.The event (for reference), the customer's sources are being fetched during processing:
That might be related to the API version being used then maybe, since I've not found other issues regarding this. We're using the latest/current API version (2017-08-15).