Giter Site home page Giter Site logo

orazz / creditcardform-ios Goto Github PK

View Code? Open in Web Editor NEW
1.5K 40.0 163.0 6.69 MB

CreditCardForm is iOS framework that allows developers to create the UI which replicates an actual Credit Card.

License: MIT License

Swift 97.68% Ruby 1.77% Objective-C 0.54%
creditcardform credit-card stripe ios-swift

creditcardform-ios's Introduction



creditcardform-ios's People

Contributors

damarte avatar itaispector avatar orazz avatar rursache avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

creditcardform-ios's Issues

Got error when implementing UITableVIewController. Using static table

Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to activate constraint with anchors <NSLayoutXAxisAnchor:0x60400067aa40 "STPPaymentCardTextField:0x7fcf9b413d00.centerX"> and <NSLayoutXAxisAnchor:0x60400067a9c0 "UITableView:0x7fcf9b824000.centerX"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.'

Font Helvetica

Hello,

I have an issue, the company Monotype is asking me for money for use of Helvetica Font ????!!!

Is this normal ?

[Crash][0.1.5] Inserting cvc only crashes the form

Steps to reproduce:

  1. Start CreditCardForm UI
  2. Skip card number and expiration date
  3. Edit cvc

Expected:
The text in the cvc text field reflects the insertion

Got:
Apps crashes because of nil optional force unwrapping:
if (cardNumber?.count)! >= 7 || (cardNumber?.count)! < 4 {

Deprecation Warnings

Hi.After the swift 4 update alot of deprecation warnings appeared. Are you still maintaining this library?Thanks for the help beforehand.

screen shot 2017-11-06 at 16 45 14 2

Stripe

It´s possible to use it without Stripe?

Usage

Hey, your library is really interesting.

The only problem I found was the README.md, which lacks an Usage Section
I created this iOS Open source Readme Template so you can take a look on how to easily create an Usage Section
If you want, I can help you to organize the lib.

What are your thoughts? 😄

Credit Card Brand Image not showing

@orazz
I just implemented this following the demo example.

The brand colors change accordingly however the chip and brand images dont show.

Secondary question: How can I display an existing card with the branded card image and not the default black view?
15991670_10158052853890608_1723324319_o

Swift 3 (at least) migration is needed

Now with Xcode 9 I get this message:

The target “CreditCardForm” contains source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets.

Use Xcode 8.x to migrate the code to Swift 3.

Is it possible to update the repo with Swift 3 support?

Big thanks!

add Mada to card brands

How to add mada card to card brands validation with changing to mada image and the background view.

Format weird on AMEX Card

It seems that there is an extra * on AMEX cards. Also, the CVV field only allows for 3 digits for these cards, which on AMEX, is normally 4 digits.

img_82cb903db795-1

Erro on publish app to AppStore

When i try upload app to AppStore display this error. Refer to module CreditCardForm.

ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"

ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldEvent.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldEvent.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldBlock.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldBlock.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldStatus.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldStatus.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldBlockCharacter.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldBlockCharacter.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskField.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskField.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/Utilities.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/Utilities.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/CreditCardFormView.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/CreditCardFormView.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/CreditCardValidationType.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/CreditCardValidationType.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldPatternCharacter.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldPatternCharacter.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/CreditCardValidator.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/CreditCardValidator.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldUtility.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
ERROR ITMS-90171: "Invalid Bundle Structure - The binary file '[my-app].app/Frameworks/CreditCardForm.framework/AKMaskFieldUtility.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

zip code issue

When ever I am trying to add zip code it will allow string with infinity number
I want only 5 numbers not strings like characters.

Changing card colors manually

Let's say I save a saved card that I know is of Visa or Mastercard brand. I can fetch the numeral data and show it in the card form but the card color doesn't change at all. It remains black.

I have tried the following:

creditCardForm.colors[Brands.MasterCard.rawValue] = [hexStr(hexStr: "#ED495A", alpha: 1), hexStr(hexStr: "#8B1A2B", alpha: 1)]

Is there a way to set the brand color and show the brand image (visa, mastercard etc) manually?

Could not access to paymentCardTextFieldDidChangeWithCardNumber in obj-c project

Hello,

I don't know why but your project dinde work properly in obj-c. Was working in 0.1.3 but since i update to 0.2.0 (mandatory by Xcode) the lib stop working

error:

  • No visible @interface for 'CreditCardFormView' declares the selector 'paymentCardTextFieldDidChangeWithCardNumber:expirationYear:expirationMonth:cvc:'
  • No visible @interface for 'CreditCardFormView' declares the selector 'paymentCardTextFieldDidEndEditingExpirationWithExpirationYear:'
  • No visible @interface for 'CreditCardFormView' declares the selector 'paymentCardTextFieldDidBeginEditingCVC'

@Property (weak, nonatomic) IBOutlet CreditCardFormView *creditCardForm;

CardHolder placeholder editable

Hi,

can you please add the possibility to edit de cardholder placeholder text?

Like the expiry text.

@IBInspectable
public var expireDatePlaceholderText = "EXPIRY" {
    didSet {
        expireDateText.text = expireDatePlaceholderText
    }
}

Thanks

Card Brand Image not appearing

Hey I love this credit card form library for swift and I am trying to implement this into my app. Everything works perfectly except the branding image on the card. I followed the instructions on how to install and add the form, but I can not get the brand icons to appear. The icon appears in the text field but not on the card itself. Any suggestions or help?

This project doesn't compile under XCode 10

This project doesn't seem to be compiling under the new XCode 10. I get the following error:

The file “Pods-CreditCardFormTests.debug.xcconfig” couldn’t be opened because there is no such file.

(CreditCardForm-iOS-master/CreditCardForm.xcodeproj The file “Pods-CreditCardForm.debug.xcconfig” couldn’t be opened because there is no such file. (/CreditCardForm-iOS-master/Pods/Target Support Files/Pods-CreditCardForm/Pods-CreditCardForm.debug.xcconfig)

Error sending STPCardParams to the STP Payment Card TextField

I am trying to send values from the cards.pay library when scanning the credit cards but when using the

  ` let params = STPCardParams()
    params.number = "4242424242424242"
    params.cvc = "123"
    params.expYear = 22
    params.expMonth = 06
    self.paymentTextField.cardParams = params`

This error marks me Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional, on line 432 of the CreditCardFormView file.

I am new to swift and I would appreciate it if you can help me

Amex CVC should be on the front

First of all, thank you so much for this library. It is awesome.

The issue I have seen is that when entering Amex card, the card image flips to simulate entering CVC number from the back. However, AMEX cards have their CVC numbers on the front. See the example from Stripe's own demo:

side_by_side_comparison

So the question is since you went through the trouble to make Stripe's lousy UI actually worth something, do you mind taking a look at this enhancement so that when a user enters an AMEX card, we don't actually flip but rather show the entering of CVC on the front of the card instead? Let me know what you think.
Thanks.

Integrate with Xamarin.ios

This isn't an error or issue.

If anybody wish to integrate this code in your Xamarin.ios project contact to me and I will be happy to assist you.

Thanks!!!! very much @orazz 👍 🥇

credircard_xamios

Crash when using build from TestFlight

Hi Team,

I am archiving and uploading the build on TestFlight.
Whenever, I use the uploaded build from TestFlight, I am getting a crash in STPPaymentTextField class.
However, I am not getting a crash when I use a build installed from the diawi link.

I used Crashlytics for recording the crashes on my production build.
The following is the response I received from Crashlytics

Crashed: com.apple.main-thread
0  Stripe                         0xab25c STPPaymentCardTextField.brandImageView.getter + 4356682332 (<compiler-generated>:4356682332)
1  Stripe                         0xac09c STPPaymentCardTextField.commonInit() + 635 (STPPaymentCardTextField.swift:635)
2  Stripe                         0xabdc0 STPPaymentCardTextField.init(frame:) + 616 (STPPaymentCardTextField.swift:616)

Please guide me on this.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.