Skip to content

Commit

Permalink
Enable Link (#5692)
Browse files Browse the repository at this point in the history
  • Loading branch information
brnunes-stripe authored Oct 11, 2022
1 parent 3f25b44 commit 43e82dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## XX.XX.XX - 2022-XX-XX

## 20.15.0 - 2022-10-11

### PaymentSheet

* [ADDED][5692](https://github.com/stripe/stripe-android/pull/5692) Enable Link as a payment method.

## 20.14.1 - 2022-10-03

This release expands the `payment_method` field on ACH requests and fixes a formatting error in `CardInputWidget`, `CardMultilineWidget`, and `CardFormView`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class LinkPaymentLauncher @Inject internal constructor(

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
companion object {
val LINK_ENABLED = BuildConfig.DEBUG
const val LINK_ENABLED = true
val supportedFundingSources = SupportedPaymentMethod.allTypes
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import com.stripe.android.model.CardBrand
import com.stripe.android.model.ConsumerPaymentDetails
import com.stripe.android.model.PaymentMethod
import com.stripe.android.model.PaymentMethodCreateParams
import com.stripe.android.paymentsheet.paymentdatacollection.ach.TransformToBankIcon
import com.stripe.android.paymentsheet.ui.getCardBrandIcon
import com.stripe.android.paymentsheet.R
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize

Expand Down Expand Up @@ -84,16 +83,14 @@ sealed class PaymentSelection : Parcelable {

@IgnoredOnParcel
@DrawableRes
val iconResource = when (paymentDetails) {
is ConsumerPaymentDetails.Card -> paymentDetails.brand.getCardBrandIcon()
is ConsumerPaymentDetails.BankAccount ->
TransformToBankIcon(paymentDetails.bankName)
}
val iconResource = R.drawable.stripe_ic_paymentsheet_link

@IgnoredOnParcel
val label = when (paymentDetails) {
is ConsumerPaymentDetails.Card -> paymentDetails.last4
is ConsumerPaymentDetails.BankAccount -> paymentDetails.last4
is ConsumerPaymentDetails.Card ->
"····${paymentDetails.last4}"
is ConsumerPaymentDetails.BankAccount ->
"····${paymentDetails.last4}"
}
}

Expand Down

0 comments on commit 43e82dc

Please sign in to comment.