Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cvc recollection doesn't work in ios (not android) #1481

Closed
ethan-park-is opened this issue Aug 23, 2023 · 0 comments · Fixed by #1501
Closed

Cvc recollection doesn't work in ios (not android) #1481

ethan-park-is opened this issue Aug 23, 2023 · 0 comments · Fixed by #1501

Comments

@ethan-park-is
Copy link

ethan-park-is commented Aug 23, 2023

Describe the bug
the guide in the docs works in android but not in ios.

payment info : https://dashboard.stripe.com/test/payments/pi_3NhrLQJ3xqlxssaZ0kLLdMUJ
you can see cvc_check: null

I think it's because of this ios swift code.

After I attached parameters.paymentMethodOptions to this condition it works as expected

 
                do {
                    let paymentMethodOptions = try factory.createOptions(paymentMethodType: paymentMethodType)
                    parameters.paymentMethodOptions = paymentMethodOptions
                } catch {
                    err = Errors.createError(ErrorType.Failed, error as NSError?)
                }

                if paymentMethodId != nil {
                    parameters.paymentMethodId = paymentMethodId
                } else {
                    do {
                        
                        let paymentMethodParams = try factory.createParams(paymentMethodType: paymentMethodType)
                        parameters.paymentMethodParams = paymentMethodParams
                    } catch  {
                        err = Errors.createError(ErrorType.Failed, error as NSError?)
                    }
                }

                return parameters

To Reproduce
Steps to reproduce the behavior:
call confirmPayment with cvc data

await _confirmPayment(clientSecret, {
            paymentMethodType: 'Card',
            paymentMethodData: {
              cvc,
              paymentMethodId: foundPaymentMethodId,
            },
          });

Expected behavior
cvc_check must be pass in test environment like this payment
https://dashboard.stripe.com/test/payments/pi_3Ni6HUJ3xqlxssaZ0vFEnDU7
this payments was made with above swift codes

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: n/a
  • Browser n/a
  • Version n/a

Smartphone (please complete the following information):

  • Device: ios simulator
  • OS: ios 16.4
  • Browser n/a
  • Version n/a

Additional context
Add any other context about the problem here.

@ethan-park-is ethan-park-is changed the title cvc recollection doesn't work in ios (not android) Cvc recollection doesn't work in ios (not android) Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant