Note that last4 and card_type aren't in there, although we do have card.last4 and type.
Is this due to a breaking change in the Stripe API?
If I'm going to fix this, should subscription[credit_card_token]' be set to response.id or response.card.id? And what should subscription[card_type] be set to? response.type? response.card.brand?
I've now control of RubyGems as well. So if you want to deliver a fix, I can get it into the gem properly.
Are you interested in fixing this for sources ?
In
app/views/koudoku/subscriptions/_card.html.erb
we have the JS functionstripeResponseHandler
which contains the following lines:Note that it's looking for keys called
id
,last4
, andcard_type
in the response object.Problem is, the response object I'm getting back from the Stripe server looks like this:
Note that
last4
andcard_type
aren't in there, although we do havecard.last4
andtype
.Is this due to a breaking change in the Stripe API?
If I'm going to fix this, should
subscription[credit_card_token]'
be set toresponse.id
orresponse.card.id
? And what shouldsubscription[card_type]
be set to?response.type
?response.card.brand
?