0
この正方形の例は、READMEが機能しないのはなぜですか?'(_)'型の引数リストで 'perform'を呼び出せません
let callbackURL = URL(string: "OdinMobile://")!
do {
let amount = try SCCMoney(amountCents: money, currencyCode: "USD")
let request : SCCAPIRequest =
try SCCAPIRequest(
callbackURL: callbackURL,
amount: amount,
userInfoString: userInfoString,
merchantID: nil,
notes: notes,
customerID: nil,
supportedTenderTypes: supportedTenderTypes,
clearsDefaultFees: clearsDefaultFees,
returnAutomaticallyAfterPayment: true
)
} catch let error as NSError {
print(error.localizedDescription)
}
do {
try SCCAPIConnection.perform(request)
} catch let error as NSError {
print(error.localizedDescription)
}
私はOverloads for 'perform' exist with these partially matching parameter lists: (SCCAPIRequest), (Selector!)
の追加メッセージをCannot invoke 'perform' with an argument list of type '(_)'
を取得します。私はrequest
をSCCAPIRequestにしたいのですが、なぜそれが1つではないのですか?それはdo
ブロックにあるのでですか?
私は考えましたが、私はそれを自分で試してみました。 –
@NilsGuillerminあなたはチャンスを得るときにこの答えを受け入れるようにしてください...ありがとう! –