Apple Pay
Apple Pay is enabled via the Braintree Drop-In UI.
It is advised that you use CocoaPods, Carthage, or Swift Package Manager to download the latest Braintree iOS SDK, as described in the Quick Start Guide.
Apple Pay Merchant Identifier and Payment Processing Certificate
To enable Apple Pay, you must first inquire with VenueNext to provide a Certificate Signing Request which can be used to generate an Apple Pay Payment Processing Certificate. Use the provided CSR and follow these steps to generate an Apple Pay Merchant Identifier and Payment Processing Certificate: Apple Pay Programming Guide: Configuring Your Environment.
Once this is completed, provide the Merchant Identifier and Payment Processing Certificate back to VenueNext for registration.
Xcode
Enable Apple Pay in your Project Settings under Signing & Capabilities. You will need to enter the Apple Pay Merchant ID that was created above, and your provisioning profile will need to support Apple Pay entitlements as well.
The VNBraintree.swift file enables the bulk of the Apple Pay functionality and should be used exactly as provided.
Once your environment has been configured, enabling Apple Pay via the SDK is as follows:
import UIKit
import VNWebSDK
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
public func applicationDidFinishLaunching(_ application: UIApplication) {
...
VenueNextWeb.shared.configureBrainTree(
VNBraintree(merchantId: "your.apple.merchant.id")
) { error in
if let error {
print("Braintree configuration failed: \(error.localizedDescription)")
}
}
}
}
This method should be called right after your VenueNextWeb.shared.initialize(...) call, and will need to have been called before presenting any VenueNext views or an error in the console will be printed.