Apple Pay Button

There’s no predefined Apple Pay Component, however you can use the following example using PassKit in order to create and use the Apple Pay Button to initiate a payment.

Example

import SwiftUI
import PassKit
import mobilesdk

struct ApplePayExample: View {

    ...

    var body: some View {
        ScrollView {
            VStack(
                alignment: .leading
            ) {
                ...
                PayWithApplePayButton(action: {
                    do { 
                        try processor?.processApplePayPayment(
                            appleMerchantId: applePayMerchantId, // Your apple pay merchant id (from developers console)
                            billingAddress: billingAddress
                        )
                    } catch {}
                }).frame(height: 50)
            }
        }
    }
}