Skip to content

Commit

Permalink
feat: add selectedShippingMethodOrderItem
Browse files Browse the repository at this point in the history
  • Loading branch information
huextrat committed Oct 10, 2024
1 parent be5ce79 commit 9fc614c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,16 @@ class ApplePayTokenizationViewModel: PaymentMethodTokenizationViewModel {
)
pkShippingMethod.detail = shippingMethod.methodDescription
pkShippingMethod.identifier = shippingMethod.methodId

let selectedShippingMethod = try? ApplePayOrderItem(
name: "Shipping",
unitAmount: shippingMethod.amount,
quantity: 1,
discountAmount: nil,
taxAmount: nil
)

return .init(shippingMethods: [pkShippingMethod], selectedShippingMethodOrderItem: nil)
return .init(shippingMethods: [pkShippingMethod], selectedShippingMethodOrderItem: selectedShippingMethod)
}

// Convert to PKShippingMethods
Expand Down

0 comments on commit 9fc614c

Please sign in to comment.