Skip to content
Easily integrate Credit Card payments module in iOS App. Swift 4.0
Swift Other
  1. Swift 98.6%
  2. Other 1.4%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MFCard - cardDidClose protocol method added Jun 23, 2018
MFCardDemo.xcodeproj - cardDidClose protocol method added Jun 23, 2018
MFCardDemo - cardDidClose protocol method added Jun 23, 2018
.gitignore Remove DS Store files Dec 27, 2016
.swift-version pod install Nov 23, 2016
LICENSE Initial commit Nov 7, 2016
MFCard.podspec Podspec changes Jun 23, 2018
MFcard poster.jpg MFcard poster.jpg added Dec 10, 2016
README.md Update README.md Dec 14, 2017
_config.yml Set theme jekyll-theme-hacker Nov 12, 2018

README.md

 text

MFCard

Platform iOS

Swift 3 compatible

Swift 4 compatible

License MIT

CocoaPods compatible

MFCard is an awesome looking Credit Card input & validation control. Written in Swift 3.

YOoo, Now MFCard is on Swift 4.

Swift 4.0 (Xcode 9.0)

pod 'MFCard'

Or you can choose version for Swift 3

pod 'MFCard', '1.2.4'

 text

MobileFirst Applications

We are a mobile development agency working on Swift for iOS, Java for Android. We are available for new projects.

Demo

 text

Usage

First Step - @import MFCard to your project

Second Step - Add a delegate MFCardDelegate to your class & add two delegate methods

Third Step - Present a Card

var myCard : MFCardView
myCard  = MFCardView(withViewController: self)
myCard.delegate = self
myCard.autoDismiss = true
myCard.toast = true
myCard.showCard()

Handle Done button(delegate method) clicked

func cardDoneButtonClicked(_ card: Card?, error: String?) {
if error == nil{
print(card!)
}else{
print(error!)
}
}

Show Card with Details

var myCard : MFCardView
myCard  = MFCardView(withViewController: self)
myCard.delegate = self
myCard.autoDismiss = true
myCard.toast = true
let demoCard :Card? = Card(holderName: "Rahul Chandnani", number: "6552552665526625", month: Month.Dec, year: "2019", cvc: "234", paymentType: Card.PaymentType.bank, cardType: CardType.Discover, userId: 0)
myCard.showCardWithCardDetails(card: demoCard!)

CocoaPods Install

Add this to your Podfile.

pod 'MFCard'

Supported Cards

  • MasterCard
  • Visa
  • JCB
  • Diners
  • Discover
  • Amex
  • Maestro
  • UnionPay
  • Electron
  • Dankort
  • RuPay

Customisation Options

  • Card Image
  • Background colour
  • Front Chrome colour (Front Card colour)
  • Back Chrome colour (Back Card colour)
  • Front Chrome Alpha
  • Back Chrome Alpha
  • Back Card Magnetic Tap colour
  • All Label colour
  • TextField Customisation
  • Control Buttons
  • Corner Radius
  • Placeholders
  • Auto Dismiss
  • Flip on Done
  • Animation on CardType Change
  • MFCard show - BlurStyle

Screenshots

 text

 text

 text

Features

  • Card Validation Support
  • Present Card like alert
  • Swipe Gesture To Swipe Card front & back
  • Error Handing
  • Toast Messages for error handling
  • All Properties editable using IBDesignable
  • Animations
  • Easy to use

Collaboration

Feel free to collaborate with ideas, issues and/or pull requests.

Further Plans

  • Provide More Classic card views
  • Mutiple Card Collection Viewer
  • Stripe Integration
  • Language Support (French, Spanish)
  • More Animations :-P

Thanks

Contact

License

MFCard is released under the MIT License.

You can’t perform that action at this time.