Skip to content

Commit

Permalink
Use the decimal separator instead of Double to make the parsing more …
Browse files Browse the repository at this point in the history
…explicit
  • Loading branch information
JlUgia committed Jan 16, 2022
1 parent f8b4e43 commit 4fa27d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pay_ios/ios/Classes/PaymentHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class PaymentHandler: NSObject {
paymentRequest.paymentSummaryItems = paymentItems.map { item in
return PKPaymentSummaryItem(
label: item["label"] as! String,
amount: NSDecimalNumber(value: Double(item["amount"] as! String)!),
amount: NSDecimalNumber(string: (item["amount"] as! String), locale:["NSLocaleDecimalSeparator": "."]),
type: (PKPaymentSummaryItemType.fromString(item["status"] as? String ?? "final_price"))
)
}
Expand Down

0 comments on commit 4fa27d4

Please sign in to comment.