Comments (8)
creditCardView.cardHolderString = "Name"
from creditcardform-ios.
i meant it to be in the capturing form, is that possible?
from creditcardform-ios.
@cesarmtz93 What do you mean by capturing?
from creditcardform-ios.
Like this
from creditcardform-ios.
You can use your own textfield and set text manually.
from creditcardform-ios.
How to get cardName from card number ?
from creditcardform-ios.
You can use this code to create the card holder's field:
func createCardHolderTextField() {
let y = paymentTextField.frame.origin.y + 99
let cardHolderTextField = UITextField()
cardHolderTextField.frame = CGRect(x: 15, y: y, width: self.view.frame.size.width - 30, height: 44)
cardHolderTextField.delegate = self
paymentTextField.translatesAutoresizingMaskIntoConstraints = false
paymentTextField.borderWidth = 0
let border = CALayer()
let width = CGFloat(1.0)
border.borderColor = UIColor.darkGray.cgColor
border.frame = CGRect(x: 0, y: paymentTextField.frame.size.height - width, width: paymentTextField.frame.size.width, height: paymentTextField.frame.size.height)
border.borderWidth = width
cardHolderTextField.layer.addSublayer(border)
cardHolderTextField.layer.masksToBounds = true
view.addSubview(cardHolderTextField)
NSLayoutConstraint.activate([
cardHolderTextField.topAnchor.constraint(equalTo: paymentTextField.bottomAnchor, constant: 20),
cardHolderTextField.centerXAnchor.constraint(equalTo: view.centerXAnchor),
cardHolderTextField.widthAnchor.constraint(equalToConstant: self.view.frame.size.width-20),
cardHolderTextField.heightAnchor.constraint(equalToConstant: 44)
])
cardHolderTextField.placeholder = "CARD HOLDER"
}
Dont forget to use the delegate methods in the viewController
class
from creditcardform-ios.
creditCardView.cardHolderString = textField.text
for card Holder Name capture (User can enter Name in textField get Value in cardHolderString
from creditcardform-ios.
Related Issues (20)
- This project doesn't compile under XCode 10 HOT 2
- Card Brand Image not appearing HOT 2
- Error sending STPCardParams to the STP Payment Card TextField HOT 1
- This project doesn't compile under XCode 10.1 and Swift 4.2 HOT 2
- Amex CVC should be on the front HOT 2
- zip code issue HOT 1
- Update POD version HOT 2
- Integrate with Xamarin.ios
- Customize font HOT 1
- How can i change text field font color ? HOT 1
- How to write card name using payment textfield? HOT 2
- Changing card colors manually HOT 1
- give example use with strip HOT 1
- Font Helvetica
- Show Black Arrow in CardView (Issue on Real Device) HOT 1
- add Mada to card brands
- Could not access to paymentCardTextFieldDidChangeWithCardNumber in obj-c project HOT 2
- Crash when using build from TestFlight
- 5388 4105 5057 8191 HOT 1
- I need Cc cash HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from creditcardform-ios.