使用此方法确认付款意向时出现以下错误 STPAPIClient.shared().confirmPaymentIntent()
错误Domain = com.stripe.lib代码= 50“没有这样的付款意图:pi_1ElaQpFSNNCQ7y59” UserInfo = {com.stripe.lib:ErrorMessageKey =没有这样的付款意图:pi_1ElaQpFSNNCQ7y59,com.stripe.lib:StripeErrorCodeKey = resource_missing,com。 :StripeErrorTypeKey = invalid_request_error,com.stripe.lib:ErrorParameterKey = intent,NSLocalizedDescription =否这种付款方式:pi_1ElaQpFSNNCQ7y59}
我正在执行的代码:
STPAPIClient.shared().confirmPaymentIntent(with: paymentIntentParams, completion: { (paymentIntent, error) in
if let error = error {
// handle error
} else if let paymentIntent = paymentIntent {
// see below to handle the confirmed PaymentIntent
if paymentIntent.status == .requiresAction {
guard let redirectContext = STPRedirectContext(paymentIntent: paymentIntent, completion: { clientSecret, redirectError in
// Fetch the latest status of the Payment Intent if necessary
STPAPIClient.shared().retrievePaymentIntent(withClientSecret: clientSecret) …Run Code Online (Sandbox Code Playgroud)