ApplePayOrderData

public struct ApplePayOrderData

A data structure representing the order details required for an Apple Pay transaction.

This struct encapsulates the essential information needed to construct a PKPaymentRequest internally within the SDK, such as the country code, currency, total amount, and a label describing the payment.

Usage Example:

    let orderData = ApplePayOrderData(
    merchantId: "merchant.com.example.mystore",
    countryCode: "US",
    currency: "USD",
    total: 120.50, // Represents $120.50 directly
    label: "My Merchant Store"
)
  • Initializes a new ApplePayOrderData instance with the specified order details.

    Declaration

    Swift

    public init(merchantId: String, countryCode: String, currency: String, total: Decimal, label: String)

    Parameters

    merchantId

    Apple Pay Merchant ID

    countryCode

    The two-letter ISO 3166 country code (e.g., “US”).

    currency

    The three-letter ISO 4217 currency code (e.g., “USD”).

    total

    The total transaction amount in major units (e.g., 50.25).

    label

    A label representing the merchant or the total charge description.