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

Always return Stripe\Card when calling Stripe\Token->card #402

Closed
ruudk opened this issue Dec 15, 2017 · 2 comments · Fixed by #412
Closed

Always return Stripe\Card when calling Stripe\Token->card #402

ruudk opened this issue Dec 15, 2017 · 2 comments · Fixed by #412

Comments

@ruudk
Copy link
Contributor

ruudk commented Dec 15, 2017

Currently, it returns an AttachedObject, while I think it should return a Card

@ruudk
Copy link
Contributor Author

ruudk commented Dec 15, 2017

I now have to do this:

public function getCard(string $token) : Card {
    $token = Token::retrieve($token);
    return Util::convertToStripeObject($token->card->__toArray(), null);
}

and that looks very ugly :D

@ob-stripe
Copy link
Contributor

Hi @ruudk. This is a known issue described here. We have a fix pending in #396 but it's turning out to be slightly more complex than anticipated.

We're still going to fix this, but OOC, why do you need the card property to be a card object?

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 a pull request may close this issue.

2 participants