I am currently enountering a weird error with Stripe, on my iOS Xcode project.
I am attempting to set a Customer's default payment source (for a future payment), and everything was working, until recently when suddenly it stopped working.
@objc func savePayment() {
print("what the vurky?")
// Collect card details
let cardParams = cardTextField.cardParams
// Fill in any billing details...
let billingDetails = STPPaymentMethodBillingDetails()
// Create SetupIntent confirm parameters with the above
let paymentMethodParams = STPPaymentMethodParams(card: cardParams, billingDetails: billingDetails, metadata: nil)
let setupIntentParams = STPSetupIntentConfirmParams(clientSecret: setupIntentClientSecret!)
setupIntentParams.paymentMethodParams = paymentMethodParams
// ...continued in next step
// Complete the setup
let paymentHandler = STPPaymentHandler.shared()
print(paymentMethodParams, "paymentHandler = STPPaymentHandler?", setupIntentClientSecret, "hcaca face", setupIntentParams)
paymentHandler.confirmSetupIntent(setupIntentParams, with: self) { status, setupIntent, error in
switch (status) {
case .failed:
// Setup failed
print("Setup failed status?")
break
case .canceled:
// Setup canceled
print("Setup canceled status?")
break
case .succeeded:
// Setup succeeded
print("setup sucessex!")
break
@unknown default:
fatalError()
break
}
}
}
I have no idea why it suddenly stopped working, as I had not touched the code in a week essentially. Anyways, I checked if the Firebase Cloud Functions were relevant but they were not. I have tried reverting code to ones that had worked before, and they also have the error:
CredStore - performQuery - Error copying matching creds. Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
ptcl = htps;
"r_Attributes" = 1;
sdmn = Stripe;
srvr = "api.stripe.com";
sync = syna;
}
which appears when I call the function. Note that in the switch status, it comes out as .failed.
I have looked at most of the existing SO questions, yet none of them have solved it, only 1 mentioned Stripe, and it did not fix it. CredStore Perform Query error