I'm having trouble charging a user through Stripe. The paymentResult object I receive in the following delegate method
func paymentContext(_ paymentContext: STPPaymentContext, didCreatePaymentResult paymentResult: STPPaymentResult, completion: @escaping STPErrorBlock) {
}
is a STPCard object, but according the documentation to complete a charge with my backend I need an STPToken. I've tried using
STPAPIClient.shared().createToken(withCard: card) {}
to create a STPToken with the STPCard object I received, but I get an error saying the card parameter doesn't have the required variable 'number'. Does anyone know what may be going on or if there is a way to complete a charge with just the STPCard object? Thank you.