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 11, 2024
1 parent be5ce79 commit b3a12eb
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: shippingMethodName,
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 b3a12eb

Please sign in to comment.