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
Git Hub Project : https://github.com/prashanthmadi/Apply-Pay-Sample-App---Swift
Below method would be quick start for using this functionality in iOS8+ devices
/*
Method to make apple pay
| |
*/ | |
func applePaymentProcess(){ | |
if(PKPaymentAuthorizationViewController.canMakePayments()){ | |
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) | |
} | |
}
|
No comments:
Post a Comment