/ Apple Pay

Apple Pay in Swift

Apple Pay lets you use iPhone 6 and Apple Watch to pay in stores and apps in an easy, secure, and private way."

Below method would be quick start for using this functionality in iOS8+ devices

/*   Method to make apple pay
func applePaymentProcess(){
let pkRequest = PKPaymentRequest();
pkRequest.countryCode = "US"
pkRequest.currencyCode = "USD"
pkRequest.supportedNetworks = [PKPaymentNetworkAmex,PKPaymentNetworkMasterCard,PKPaymentNetworkVisa]
pkRequest.merchantCapabilities = PKMerchantCapability.CapabilityEMV
// pkRequest.merchantIdentifier =
let item1 = PKPaymentSummaryItem.init(label:"motoX", amount:34.5)
let item2 = PKPaymentSummaryItem.init(label:"motoG", amount:30.5)
pkRequest.paymentSummaryItems = [item1,item2]
var paymentPane = PKPaymentAuthorizationViewController.init(paymentRequest:pkRequest)

Git Hub Project : https://github.com/prashanthmadi/Apply-Pay-Sample-App---Swift

Prashanth Madi

Prashanth Madi

I'm a programmer & Tech enthusiast. I work for OpenSource Support Team at Microsoft, but this blog, its content & opinions are my own. I blog about tech, gadgets, code, where we're going & we've been.

Read More