iOS – Integrating credit card payments

Depending on what users are purchasing*, you should be just fine accepting payments in your app. Instead of trying to incorporate some type of payment library into the app I would recommend using a payment API that offloads the work. Take a look at http://stripe.com/ for an example of an excellent payment system designed for … Read more

Formatting a UITextField for credit card input like (xxxx xxxx xxxx xxxx)

If you’re using Swift, go read my port of this answer for Swift 4 and use that instead. If you’re in Objective-C… Firstly, to your UITextFieldDelegate, add these instance variables… NSString *previousTextFieldContent; UITextRange *previousSelection; … and these methods: // Version 1.3 // Source and explanation: http://stackoverflow.com/a/19161529/1709587 -(void)reformatAsCardNumber:(UITextField *)textField { // In order to make the … Read more