Git Product home page Git Product logo

buypaymentbutton's Introduction

BUYPaymentButton

BUYPaymentButton is a vector-based Apple Pay button that provides a custom UIButton for Apple Pay that replicates Apple's PKPaymentButton available in iOS 8.3 and later.

BUYPaymentButton automatically creates and returns a custom vector-based UIButton on older version of iOS 8 that's near identical to Apple's button and a PKPaymentButton on iOS 8.3 and later so you don't have to worry about any version logic or creating your own button with images.

BUYPaymentButtonPKPaymentButton

Installation

Cocoapods

Add the following to your Podfile:

pod 'BUYPaymentButton'

Carthage

Add the following to your Cartfile:

github "Shopify/BUYPaymentButton"

Manually

  • Drag the BUYPaymentButton/BUYPaymentButton folder into your project.
  • Add the PassKit framework to your project.

Usage

BUYPaymentButton includes a sample project that shows how to use the button in your project. It shows all six variations of the Apple Pay button. Run the sample project on iOS 8.3 to see the button created with a PKPaymentButton and on older iOS 8 versions to see the custom BUYPaymentButton in action.

In your own project, create the button like you would any other button:

BUYPaymentButton *paymentButton = [BUYPaymentButton buttonWithType:BUYPaymentButtonTypeBuy style:BUYPaymentButtonStyleBlack];

Button types and styles

There are two enums: BUYPaymentButtonStyle and BUYPaymentButtonType.

These are identical to PKPaymentButtonStyle and PKPaymentButtonType, so if you're currently using PKPaymentButton, they're easy to replace.

Contributing to this project

If you have a feature requests or find a bug, please feel free to submit a pull request or create a ticket.

buypaymentbutton's People

Contributors

cocoahero avatar runmad avatar

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.