 			guard let newText = currencyFormatter.string(from: newNumber) else {
 				return false
 			}
-			
+
 			priceTextField.text = newText
-			
+
 			if cursorOffset != originalTextLength {
 				let lengthDelta = newText.count - originalTextLength
 				let newCursorOffset = max(0, min(newText.count, cursorOffset + lengthDelta))

			return true
		}

		//FIXME: break into a separate formatter object
		
		guard let currencyFormatter = currencyFormatter,
		let selectedRange = priceTextField.selectedTextRange,
		let originalText = priceTextField.text,
		let swiftRange = originalText.range(from: range) else {
			return false
		}
		
		var replacementString = string
		
		if replacementString.count > 1 {
			replacementString = replacementString.replacingOccurrences(of: currencyFormatter.currencySymbol, with: "")
			replacementString = replacementString.replacingOccurrences(of: currencyFormatter.groupingSeparator, with: "")
			guard let stringFromFormatter = currencyFormatter.string(from: NSDecimalNumber(string: replacementString)) else {
				return false
			}
			
			replacementString = stringFromFormatter
		}
		
		let start = priceTextField.beginningOfDocument
		let cursorOffset = priceTextField.offset(from: start, to: selectedRange.start)
		let originalTextLength = originalText.count
		
		var newText = originalText
		newText = newText.replacingCharacters(in: swiftRange, with: replacementString)
		newText = newText.replacingOccurrences(of: currencyFormatter.currencySymbol, with: "")
		newText = newText.replacingOccurrences(of: currencyFormatter.groupingSeparator, with: "")
		newText = newText.replacingOccurrences(of: currencyFormatter.decimalSeparator, with: "")
		
		let maxDigits = 11
		if newText.count <= maxDigits {
			let numberFromTextField = NSDecimalNumber(string: newText)


	func setupPriceField() {
		priceTextField.keyboardType = .numberPad
		priceTextField.delegate = self
	}

	func setupExpirationDateField() {
