Easily integrate Credit Card payments module in iOS App. Swift 4.0

Overview

 text

MFCard

Platform iOS

Swift 4 compatible

Swift 5 compatible

License MIT

CocoaPods compatible

Buy me a coffeeBuy me a coffee

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

YOoo, Now MFCard is on Swift 5.

  • Swift 5.0 (Xcode 11.0)*
pod 'MFCard'

Or you can choose version for Swift 4

pod 'MFCard', '1.2.6'

 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.

Comments
  •  month year did not open

    month year did not open

    year month did not open picker

    When click

    waring in debug is :

    animate its opacity. This will cause the effect to appear broken until opacity returns to 1.

    opened by mohayoub 8
  • Month and Year validation

    Month and Year validation

    Hello, First of all, thank you for this awesome library.

    I am creating an app which needs card details. but I need validation for year and month. month and year should not be selected from the past.. how to achieve this please let me know.

    opened by nikhil191090 6
  • 'Card' is ambiguous for type lookup in this context

    'Card' is ambiguous for type lookup in this context

    I have this error: 'Card' is ambiguous for type lookup in this context. In this method:

    func cardDoneButtonClicked(_ card: Card?, error: String?) {
    }
    
    
    opened by FranciscoMkdir 4
  • If user forget to input expiry month, done button will crash the app

    If user forget to input expiry month, done button will crash the app

    First of all, thank you for putting up this awesome library. It looks really good.

    If 'done' button shows up and expiry month is not correctly input, the app crashed on this line:

    card = Card(holderName: txtCardName.text, number: cardNumber, month: Month(rawValue: viewExpiryMonth!.labelValue.text!)!, year: viewExpiryYear!.labelValue.text!, cvc: txtCvc.text!, paymentType: Card.PaymentType.card, cardType:addedCardType!, userId: 1)

    Month takes certain input, and the default string 'MM' is not one of them.

    opened by ywalterh 3
  • Close Button

    Close Button

    How to hide close button? Or how can I add actions if the Close button is clicked?

    I need a function like this "cardDoneButtonClicked" for Close button, i can't find it

    opened by neilmaledev 2
  • update the spinner to not grab the very bottom view of the stack

    update the spinner to not grab the very bottom view of the stack

    i really don't know anything about the spinner class or the consequence of this change. Take or leave it, but it satisfies my needs of placing this component in a modal view that rides high on the view stack

    opened by mcconkiee 0
  • How to add

    How to add "save card?" checkbox blow card view

    Hello , i need to add checkbox for save card details in Authorize.net , but i can't change view of MFcard.xib , how may change view design and get bool value in my viewcontroller. Thanks in advance

    opened by KhussPatel 0
  • Want to show multiple cards in showing card with detail

    Want to show multiple cards in showing card with detail

    Hi, I am creating the app which I need card with detail. According to your demo, I am curious about how to show the multiple card details in card details page base on when you add new card from UIButton of Add MFCard with Storyboard.

    opened by AdamGreem 0
  • Data get again when close the card

    Data get again when close the card

    how can i get written data again when close the card. when i close the card and open it again, the data has vanished, how can i rid out of this trouble. The card fields clear when we go back.

    opened by Syed-Sahab 0
Releases(1.2.7)
Owner
MobileFirst
Mobile development agency | Available for new projects
MobileFirst
A credit card scanner for iOS written in Swift

DGCardScanner A credit card scanner Requirements iOS 13.0+ Swift 5.5+ Xcode 10.0+ Installation SPM File > Add Packages > https://github.com/donggyushi

donggyu 9 Jun 24, 2022
Easy to use iOS library with components for input of Credit Card data.

AnimatedCardInput This library allows you to drop into your project two easily customisable, animated components that will make input of Credit Card i

Netguru 39 Oct 16, 2022
A credit card reader and parser for iOS Using Native Vision/VisionKit

card-reader-ios A credit card reader and parser for iOS Using Native Vision/VisionKit May-14-2021.00-43-17.mp4 Instructions Hold camera up to a card a

Khalid Asad 104 Dec 15, 2022
CreditCardForm is iOS framework that allows developers to create the UI which replicates an actual Credit Card.

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

Orazz 1.4k Dec 15, 2022
Debit/Credit card validation port of the Luhn Algorithm in Swift

SwiftLuhn Warning! This repository is no longer maintained. This is a port of the Luhn Algorithm, generally used for validating debit/credit card deta

Max Kramer 135 Sep 9, 2022
Luhn Credit Card Validation Algorithm

Luhn Algorithm This is a port of the Luhn Algorithm, generally used for validating Credit Card details, to Objective-C (iOS). Swift port can be found

Max Kramer 127 Nov 27, 2022
TextFieldFormatter - Simple Text Formatter (Credit Card Number, Phone Number, Serial Number etc.)

TextFieldFormatter Simple Text Formatter (Credit Card Number, Phone Number, Seri

Anıl ORUÇ 4 Apr 4, 2022
Luhn Credit Card Validation Algorithm

Luhn Algorithm This is a port of the Luhn Algorithm, generally used for validating Credit Card details, to Objective-C (iOS). Swift port can be found

Max Kramer 127 Nov 27, 2022
Make and accept payments in your iOS app via Venmo

Venmo iOS SDK The Venmo iOS SDK lets you make and accept payments in your app using Venmo. Installation If you're using CocoaPods: If you don't have a

Venmo 170 Dec 26, 2022
Square In-App Payments iOS SDK SwiftUI

Square In-App Payments iOS SDK SwiftUI Build remarkable payments experiences in

Ashley Bailey 2 Mar 8, 2022
Ios-card-transition - iOS CocoaPod to create beautiful card transitions

CSCardTransition CSCardTransition is a small library allowing you to create wond

Creastel 12 Oct 31, 2022
Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks

Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks.

Arne Harren 40 Nov 24, 2022
Accept credit cards and PayPal in your iOS app

Important: PayPal Mobile SDKs are Deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themse

PayPal 973 Dec 18, 2022
Demonstrates how to integrate Stripe Subscriptions on iOS

Stripe Subscriptions with iOS This example app demonstrates how to integrate Stripe subscriptions with the prebuilt payment UI Requirements Create an

Conjure 0 Nov 26, 2021
Integrate Ios framework with anther framework

Puppy Paradise This project is a sample usage of my AOModalStatusView framework. When running, this application will show pictures of puppies and prov

null 0 Dec 10, 2021
SwiftUI BusinessCard - Created iOS Business card app to practice SwiftUI

SwiftUI_BusinessCard Created iOS Business card app to practice SwiftUI

null 0 Jan 29, 2022
A Payment Card UI & Validator for iOS

Description Caishen provides an easy-to-use text field to ask users for payment card information and to validate the input. It serves a similar purpos

Prolific Interactive 766 Dec 28, 2022
Bank Card Generator with Swift using SnapKit DSL 💳

iCard BankCard & CreditCard generator with Swift 3 using SnapKit DSL iCard is a simple tool for generate Credit & Bank Card , it represent cards as UI

Emrah Korkmaz 334 Nov 28, 2022
Welcome Busines Card Built With Swift

BusinessCard Welcome Busines Card Main screen Contacts screen More info screen

Konstantin Ryabtsev 0 Dec 28, 2021