Skip to content
BUYPaymentButton is a vector-based Apple Pay button for all iOS 8 versions
Objective-C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BUYPaymentButton.xcodeproj Share scheme. Jul 21, 2015
BUYPaymentButton
BUYPaymentButtonSample
.gitignore
BUYPaymentButton.png
BUYPaymentButton.podspec
LICENSE Update LICENSE attribution Aug 31, 2015
PKPaymentButton.png Initial commit Jun 23, 2015
README.md Adding Carthage installation to docs Aug 24, 2015

README.md

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.

You can’t perform that action at this time.