Component evidence
Converts PassKit PKContact data into StripeContact billing details for Apple Pay payments. Reuse when mapping Apple Pay contact info into Stripe billing fields.
// Source: https://github.com/stripe/stripe-ios | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
// Provided via justclaw.it.com; keep this notice with the code.
//
// BillingDetails+ApplePay.swift
// StripeApplePay
//
// Created by David Estes on 8/9/21.
// Copyright © 2021 Stripe, Inc. All rights reserved.
//
import Foundation
import PassKit
@_spi(STP) import StripeCore
extension StripeContact {
/// Initializes a new Contact with data from an PassKit contact.
/// - Parameter contact: The PassKit contact you want to populate the Contact from.
/// - Returns: A new Contact with data copied from the passed in contact.
init(
pkContact contact: PKContact
) {
let nameComponents = contact.name
if let nameComponents = nameCompone
... (truncated -- full source via MCP)