【发布时间】:2017-03-21 16:59:42
【问题描述】:
当我创建要发送到贝宝的项目时,我会执行以下操作
let ammountRequest: String = txtAmmount.text!
let item = PayPalItem(name: "shop things", withQuantity: 1, withPrice: NSDecimalNumber(string: ammountRequest), withCurrency: "EUR", withSku: "Create Balance")
let items = [item]
let subtotal = PayPalItem.totalPrice(forItems: items)
例如,如果“ammountRequest”等于 11.12,则在支付页面上将显示 11 而不是 11.12 我可以显示小数位,因为它们被删除了吗?
【问题讨论】: