stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.11k stars 975 forks source link

[BUG] Fix error mapping when returning from 3DS #3037

Open arkalezard opened 11 months ago

arkalezard commented 11 months ago

Summary

The payment error message in PaymentSheet for "Insufficient funds decline" case is too generic and can lead to confusion for users. Without knowing the specific reason (i.e., insufficient funds), users may repeatedly try the same card, thinking it might be a temporary issue. https://user-images.githubusercontent.com/5547520/277351452-80cb89cf-1542-4a62-bf6c-e0e87749c479.png

Can you fix your mapping as Android side to replace "Card declined" by a more specific message like "insufficient funds"? The reason: https://github.com/stripe/stripe-android/issues/7478#issuecomment-1779221544

Help to reproduce

You can test it with your testing usecase "Insufficient funds decline" (card number: 4000 0000 0000 9995) Use your PaymentSheet when 3DS is mandatory for a transaction

iOS version

Any

Installation method

N/A

SDK version

N/A

Other information

Already solved on Android side https://github.com/stripe/stripe-android/pull/7499

jaynewstrom-stripe commented 11 months ago

Hi @arkalezard thanks for reporting. We'll have someone take a look soon.

wooj-stripe commented 11 months ago

Hi @arkalezard -

I'm having trouble reproducing this error in the latest version of our SDK (23.18.2)

  1. Can you please let me know what version you are running?

My reproduction steps are:

  1. Execute payment sheet
  2. Enter card 4000 0000 0000 9995
  3. Enter date: 04/24
  4. Enter CVC: 456
  5. Billing address: France
  6. Tap "Pay"

Behavior that I observed: Error appears as "Your card has insufficient funds"

arkalezard commented 11 months ago

Hi @arkalezard -

I'm having trouble reproducing this error in the latest version of our SDK (23.18.2)

  1. Can you please let me know what version you are running?

My reproduction steps are:

  1. Execute payment sheet
  2. Enter card 4000 0000 0000 9995
  3. Enter date: 04/24
  4. Enter CVC: 456
  5. Billing address: France
  6. Tap "Pay"

Behavior that I observed: Error appears as "Your card has insufficient funds"

Hi, Today we are using 23.17.2

GIVEN the server forces 3DS validation on every transaction! WHEN

  1. Execute payment sheet
  2. Enter card 4000 0000 0000 9995
  3. Enter date: 04/24
  4. Enter CVC: 456
  5. Billing address: France
  6. Tap "Pay"

THEN Behavior that I observed: Error appears as "Card declined"

wooj-stripe commented 11 months ago

Thanks! I was able to reproduce this on iOS by passing the following on the creation of the payment intent.

    args.payment_method_options = {"card":
       {request_three_d_secure: "any"}
    }

This will go into our queue to be looked at in the future. Thanks!