Skip to content

Commit

Permalink
update requirements for EPS, P24, Giropay (#4490)
Browse files Browse the repository at this point in the history
* update requirements for newly enabled payment methods

* fix unit tests
  • Loading branch information
skyler-stripe authored Jan 5, 2022
1 parent c6f8c60 commit d4046b5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,28 +187,13 @@ internal val SepaDebitRequirement = PaymentMethodRequirements(
)

internal val EpsRequirement = PaymentMethodRequirements(

/**
* Disabling this support so that it doesn't negatively impact our ability
* to save cards when the user selects SFU set and the PI has PM that don't support
* SFU to be set.
*
* When supported there are no known pi requirements and can be set to an empty set.
*/
piRequirements = null,
piRequirements = emptySet(),
siRequirements = null, // this is not supported by this payment method
confirmPMFromCustomer = null
)

internal val P24Requirement = PaymentMethodRequirements(
/**
* Disabling this support so that it doesn't negatively impact our ability
* to save cards when the user selects SFU set and the PI has PM that don't support
* SFU to be set.
*
* When supported there are no known PI requirements and can be set to an empty set.
*/
piRequirements = null,
piRequirements = emptySet(),
siRequirements = null, // this is not supported by this payment method

/**
Expand All @@ -218,14 +203,7 @@ internal val P24Requirement = PaymentMethodRequirements(
)

internal val GiropayRequirement = PaymentMethodRequirements(
/**
* Disabling this support so that it doesn't negatively impact our ability
* to save cards when the user selects SFU set and the PI has PM that don't support
* SFU to be set.
*
* When supported there are no known PI requirements and can be set to an empty set.
*/
piRequirements = null,
piRequirements = emptySet(),
siRequirements = null, // this is not supported by this payment method
confirmPMFromCustomer = null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,6 @@ internal class PaymentSheetViewModelTest {
PaymentMethod.Type.Card.code,
PaymentMethod.Type.Ideal.code,
PaymentMethod.Type.SepaDebit.code,
PaymentMethod.Type.Eps.code,
PaymentMethod.Type.Sofort.code
)
)
Expand Down Expand Up @@ -934,7 +933,6 @@ internal class PaymentSheetViewModelTest {
PaymentMethod.Type.Card.code,
PaymentMethod.Type.Ideal.code,
PaymentMethod.Type.SepaDebit.code,
PaymentMethod.Type.Eps.code,
PaymentMethod.Type.Sofort.code
)
)
Expand Down
16 changes: 8 additions & 8 deletions paymentsheet/src/test/resources/eps-support.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ eps, true, true, on_session, false, card/eps, false, false, not available, false
eps, true, true, on_session, false, card/eps, false, false, not available, false
eps, true, false, on_session, false, card/eps, false, false, not available, false
eps, true, false, on_session, false, card/eps, false, false, not available, false
eps, true, true, null, false, card/eps, false, false, not available, false
eps, true, true, null, false, card/eps, false, false, not available, false
eps, true, false, null, false, card/eps, false, false, not available, false
eps, true, false, null, false, card/eps, false, false, not available, false
eps, true, true, null, false, card/eps, false, true, oneTime, true
eps, true, true, null, false, card/eps, false, true, oneTime, true
eps, true, false, null, false, card/eps, false, true, oneTime, true
eps, true, false, null, false, card/eps, false, true, oneTime, true
eps, false, true, off_session, false, card/eps, false, false, not available, false
eps, false, true, off_session, false, card/eps, false, false, not available, false
eps, false, false, off_session, false, card/eps, false, false, not available, false
Expand All @@ -19,7 +19,7 @@ eps, false, true, on_session, false, card/eps, false, false, not available, fals
eps, false, true, on_session, false, card/eps, false, false, not available, false
eps, false, false, on_session, false, card/eps, false, false, not available, false
eps, false, false, on_session, false, card/eps, false, false, not available, false
eps, false, true, null, false, card/eps, false, false, not available, false
eps, false, true, null, false, card/eps, false, false, not available, false
eps, false, false, null, false, card/eps, false, false, not available, false
eps, false, false, null, false, card/eps, false, false, not available, false
eps, false, true, null, false, card/eps, false, true, oneTime, true
eps, false, true, null, false, card/eps, false, true, oneTime, true
eps, false, false, null, false, card/eps, false, true, oneTime, true
eps, false, false, null, false, card/eps, false, true, oneTime, true
16 changes: 8 additions & 8 deletions paymentsheet/src/test/resources/giropay-support.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ giropay, true, true, on_session, false, card/giropay, false, false, not availabl
giropay, true, true, on_session, false, card/eps/giropay, false, false, not available, false
giropay, true, false, on_session, false, card/giropay, false, false, not available, false
giropay, true, false, on_session, false, card/eps/giropay, false, false, not available, false
giropay, true, true, null, false, card/giropay, false, false, not available, false
giropay, true, true, null, false, card/eps/giropay, false, false, not available, false
giropay, true, false, null, false, card/giropay, false, false, not available, false
giropay, true, false, null, false, card/eps/giropay, false, false, not available, false
giropay, true, true, null, false, card/giropay, false, true, oneTime, true
giropay, true, true, null, false, card/eps/giropay, false, true, oneTime, true
giropay, true, false, null, false, card/giropay, false, true, oneTime, true
giropay, true, false, null, false, card/eps/giropay, false, true, oneTime, true
giropay, false, true, off_session, false, card/giropay, false, false, not available, false
giropay, false, true, off_session, false, card/eps/giropay, false, false, not available, false
giropay, false, false, off_session, false, card/giropay, false, false, not available, false
Expand All @@ -19,7 +19,7 @@ giropay, false, true, on_session, false, card/giropay, false, false, not availab
giropay, false, true, on_session, false, card/eps/giropay, false, false, not available, false
giropay, false, false, on_session, false, card/giropay, false, false, not available, false
giropay, false, false, on_session, false, card/eps/giropay, false, false, not available, false
giropay, false, true, null, false, card/giropay, false, false, not available, false
giropay, false, true, null, false, card/eps/giropay, false, false, not available, false
giropay, false, false, null, false, card/giropay, false, false, not available, false
giropay, false, false, null, false, card/eps/giropay, false, false, not available, false
giropay, false, true, null, false, card/giropay, false, true, oneTime, true
giropay, false, true, null, false, card/eps/giropay, false, true, oneTime, true
giropay, false, false, null, false, card/giropay, false, true, oneTime, true
giropay, false, false, null, false, card/eps/giropay, false, true, oneTime, true
16 changes: 8 additions & 8 deletions paymentsheet/src/test/resources/p24-support.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ p24, true, true, on_session, false, card/p24, false, false, not available, false
p24, true, true, on_session, false, card/eps/p24, false, false, not available, false
p24, true, false, on_session, false, card/p24, false, false, not available, false
p24, true, false, on_session, false, card/eps/p24, false, false, not available, false
p24, true, true, null, false, card/p24, false, false, not available, false
p24, true, true, null, false, card/eps/p24, false, false, not available, false
p24, true, false, null, false, card/p24, false, false, not available, false
p24, true, false, null, false, card/eps/p24, false, false, not available, false
p24, true, true, null, false, card/p24, false, true, oneTime, true
p24, true, true, null, false, card/eps/p24, false, true, oneTime, true
p24, true, false, null, false, card/p24, false, true, oneTime, true
p24, true, false, null, false, card/eps/p24, false, true, oneTime, true
p24, false, true, off_session, false, card/p24, false, false, not available, false
p24, false, true, off_session, false, card/eps/p24, false, false, not available, false
p24, false, false, off_session, false, card/p24, false, false, not available, false
Expand All @@ -19,7 +19,7 @@ p24, false, true, on_session, false, card/p24, false, false, not available, fals
p24, false, true, on_session, false, card/eps/p24, false, false, not available, false
p24, false, false, on_session, false, card/p24, false, false, not available, false
p24, false, false, on_session, false, card/eps/p24, false, false, not available, false
p24, false, true, null, false, card/p24, false, false, not available, false
p24, false, true, null, false, card/eps/p24, false, false, not available, false
p24, false, false, null, false, card/p24, false, false, not available, false
p24, false, false, null, false, card/eps/p24, false, false, not available, false
p24, false, true, null, false, card/p24, false, true, oneTime, true
p24, false, true, null, false, card/eps/p24, false, true, oneTime, true
p24, false, false, null, false, card/p24, false, true, oneTime, true
p24, false, false, null, false, card/eps/p24, false, true, oneTime, true

0 comments on commit d4046b5

Please sign in to comment.