-
Notifications
You must be signed in to change notification settings - Fork 203
Prefill form with existing card details #45
Comments
this would be useful in conjunction with https://github.com/card-io/card.io-iOS-SDK |
I just wanted to fill in the card number from the number returned from card-io. Not the CVC or expiry. I could do this separating a card number string into an array of single character NSStrings, and iterating through the array, and pasting the string up to that point into the cardNumberField
|
I solved this by creating a category for PTKView that provides a setCardNumber method and calls the textField:shouldChangeCharactersInRange:replacementString method like so: PTKView+Programmable.h
PTKView+Programmable.m
Since I'm using swift, I also had to add Then I could simply call Since there are obvious use cases for setting the card fields programmatically (such as Card.io), please add this feature natively. |
This issue was migrated from stripe-ios: stripe/stripe-ios#17
The text was updated successfully, but these errors were encountered: