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

Enable Link #5692

Merged
merged 3 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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