Skip to content

Commit

Permalink
Merge pull request #1853 from Adyen/feature/google-pay
Browse files Browse the repository at this point in the history
Google Pay improvements
  • Loading branch information
OscarSpruit authored Dec 12, 2024
2 parents e925fa4 + c73b4de commit b4473d2
Show file tree
Hide file tree
Showing 175 changed files with 2,016 additions and 566 deletions.
26 changes: 13 additions & 13 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
[//]: # ( - Configurations public constructor are deprecated, please use each Configuration's builder to make a Configuration object)

## New
- Payment method:
- Pay by Bank US. Payment method type: **paybybank_AIS_DD**.
- Launch Google Pay with `submit()` to get rid of the deprecated activity result handling.
- For drop-in, show a toolbar on every intermediary screen, so shoppers can always easily navigate back.

## Fixed
- For cards, the address lookup functionality no longer crashes if the shopper presses back when the postal code field is in focus.
- For Drop-in, fixed an issue where the error dialog showed loading state in some edge cases.

## Improved

## Changed
- Dependency versions:
| Name | Version |
|--------------------------------------------------------------------------------------------------------|-------------------------------|
| [Android Gradle Plugin](https://developer.android.com/build/releases/gradle-plugin#android-gradle-plugin-8.7.1) | **8.7.1** |
| [AndroidX Activity](https://developer.android.com/jetpack/androidx/releases/activity#1.9.3) | **1.9.3** |
| [AndroidX Annotation](https://developer.android.com/jetpack/androidx/releases/annotation#1.9.1) | **1.9.1** |
| [AndroidX Autofill](https://developer.android.com/jetpack/androidx/releases/autofill#1.3.0-beta01) | **1.3.0-beta01** |
| [AndroidX Compose Activity](https://developer.android.com/jetpack/androidx/releases/activity#1.9.3) | **1.9.3** |
| [AndroidX Compose BOM](https://developer.android.com/develop/ui/compose/bom/bom-mapping) | **2024.10.00** |
| [AndroidX Fragment](https://developer.android.com/jetpack/androidx/releases/fragment#1.8.5) | **1.8.5** |
| [AndroidX Lifecycle](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.8.6) | **2.8.6** |
| [AndroidX Lifecycle ViewModel Compose](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.8.6) | **2.8.6** |
| | |

## Deprecated
- The styles and strings for the Cash App Pay loading indicator. Use the new styles and strings instead.
| Previous | Now |
|-----------------------------------------------------------|------------------------------------------------------------------|
| `AdyenCheckout.CashAppPay.ProgressBar` | `AdyenCheckout.ProcessingPaymentView.ProgressBar` |
| `AdyenCheckout.CashAppPay.WaitingDescriptionTextView` | `AdyenCheckout.ProcessingPaymentView.WaitingDescriptionTextView` |
| `cash_app_pay_waiting_text` | `checkout_processing_payment` |
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ package com.adyen.checkout.cashapppay.internal.ui
import android.content.Context
import com.adyen.checkout.cashapppay.internal.ui.view.CashAppPayButtonView
import com.adyen.checkout.cashapppay.internal.ui.view.CashAppPayView
import com.adyen.checkout.cashapppay.internal.ui.view.CashAppPayWaitingView
import com.adyen.checkout.ui.core.internal.ui.ButtonComponentViewType
import com.adyen.checkout.ui.core.internal.ui.ButtonViewProvider
import com.adyen.checkout.ui.core.internal.ui.ComponentView
import com.adyen.checkout.ui.core.internal.ui.ComponentViewType
import com.adyen.checkout.ui.core.internal.ui.ViewProvider
import com.adyen.checkout.ui.core.internal.ui.view.PayButton
import com.adyen.checkout.ui.core.internal.ui.view.ProcessingPaymentView

internal object CashAppPayViewProvider : ViewProvider {

Expand All @@ -26,7 +26,7 @@ internal object CashAppPayViewProvider : ViewProvider {
context: Context,
): ComponentView = when (viewType) {
CashAppPayComponentViewType -> CashAppPayView(context)
PaymentInProgressViewType -> CashAppPayWaitingView(context)
PaymentInProgressViewType -> ProcessingPaymentView(context)
else -> throw IllegalArgumentException("Unsupported view type")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import com.adyen.checkout.cashapppay.databinding.CashAppPayButtonViewBinding
import com.adyen.checkout.ui.core.internal.ui.ButtonDelegate
import com.adyen.checkout.ui.core.internal.ui.view.PayButton
import kotlinx.coroutines.CoroutineScope

internal class CashAppPayButtonView @JvmOverloads constructor(
context: Context,
Expand All @@ -22,6 +24,8 @@ internal class CashAppPayButtonView @JvmOverloads constructor(

private val binding = CashAppPayButtonViewBinding.inflate(LayoutInflater.from(context), this)

override fun initialize(delegate: ButtonDelegate, coroutineScope: CoroutineScope) = Unit

override fun setEnabled(enabled: Boolean) {
binding.payButton.isEnabled = enabled
}
Expand Down
1 change: 0 additions & 1 deletion cashapppay/src/main/res/template/values/strings.xml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">%%storeDetails%%</string>
<string name="cash_app_pay_waiting_text">%%paypal.processingPayment%%</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">حفظ لمدفوعاتي القادمة</string>
<string name="cash_app_pay_waiting_text">جارِ معالجة المدفوعات…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-bg-rBG/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Запазване за следващото ми плащане</string>
<string name="cash_app_pay_waiting_text">Обработка на плащането…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-ca-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Desa\'l per al meu proper pagament</string>
<string name="cash_app_pay_waiting_text">S\'esta processant el pagament…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-cs-rCZ/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Uložit pro příští platby</string>
<string name="cash_app_pay_waiting_text">Zpracování platby…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-da-rDK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Gem til min næste betaling</string>
<string name="cash_app_pay_waiting_text">Behandler betaling…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Für zukünftige Zahlvorgänge speichern</string>
<string name="cash_app_pay_waiting_text">Zahlung wird verarbeitet…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-el-rGR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Αποθήκευση για την επόμενη πληρωμή μου</string>
<string name="cash_app_pay_waiting_text">Επεξεργασία πληρωμής…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-es-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Recordar para mi próximo pago</string>
<string name="cash_app_pay_waiting_text">Procesando pago…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-et-rEE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Salvesta mu järgmise makse jaoks</string>
<string name="cash_app_pay_waiting_text">Makse töötlemine …</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-fi-rFI/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Tallenna seuraavaa maksuani varten</string>
<string name="cash_app_pay_waiting_text">Maksua käsitellään…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-fr-rFR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Sauvegarder pour mon prochain paiement</string>
<string name="cash_app_pay_waiting_text">Traitement du paiement en cours…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-hr-rHR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Pohrani za moje sljedeće plaćanje</string>
<string name="cash_app_pay_waiting_text">Obrada plaćanja u tijeku…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-hu-rHU/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Mentés a következő fizetéshez</string>
<string name="cash_app_pay_waiting_text">Fizetés feldolgozása…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-is-rIS/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Spara fyrir næstu greiðslu</string>
<string name="cash_app_pay_waiting_text">Unnið úr greiðslu…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-it-rIT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Salva per il prossimo pagamento</string>
<string name="cash_app_pay_waiting_text">Elaborazione del pagamento in corso…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-ja-rJP/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">次回のお支払いのため詳細を保存</string>
<string name="cash_app_pay_waiting_text">支払いを処理しています…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">다음 결제를 위해 이 수단 저장</string>
<string name="cash_app_pay_waiting_text">결제 처리 중…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-lt-rLT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Išsaugoti kitam mokėjimui</string>
<string name="cash_app_pay_waiting_text">Mokėjimas apdorojamas…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-lv-rLV/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Saglabāt manam nākamajam maksājumam</string>
<string name="cash_app_pay_waiting_text">Notiek maksājuma apstrāde…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-nb-rNO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Lagre til min neste betaling</string>
<string name="cash_app_pay_waiting_text">Behandler betaling…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-nl-rNL/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Bewaar voor mijn volgende betaling</string>
<string name="cash_app_pay_waiting_text">Betaling wordt verwerkt…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-pl-rPL/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Zapisz na potrzeby następnej płatności</string>
<string name="cash_app_pay_waiting_text">Przetwarzanie płatności…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Salvar para meu próximo pagamento</string>
<string name="cash_app_pay_waiting_text">Processando pagamento…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-pt-rPT/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Guardar para o meu próximo pagamento</string>
<string name="cash_app_pay_waiting_text">A processar pagamento…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-ro-rRO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Salvează pentru următoarea mea plată</string>
<string name="cash_app_pay_waiting_text">Se prelucrează plata…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-ru-rRU/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Сохранить для следующего платежа</string>
<string name="cash_app_pay_waiting_text">Платеж обрабатывается…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-sk-rSK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Uložiť pre moju ďalšiu platbu</string>
<string name="cash_app_pay_waiting_text">Platba sa spracúva.</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-sl-rSI/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Shrani za moje naslednje plačilo</string>
<string name="cash_app_pay_waiting_text">Obdelava plačila…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-sv-rSE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Spara till min nästa betalning</string>
<string name="cash_app_pay_waiting_text">Behandlar betalning…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">保存以便下次支付使用</string>
<string name="cash_app_pay_waiting_text">正在处理付款…</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">儲存以供下次付款使用</string>
<string name="cash_app_pay_waiting_text">正在處理付款……</string>
</resources>
1 change: 0 additions & 1 deletion cashapppay/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@

<resources>
<string name="cash_app_pay_store_payment_method">Save for my next payment</string>
<string name="cash_app_pay_waiting_text">Processing payment…</string>
</resources>
13 changes: 0 additions & 13 deletions cashapppay/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,5 @@
<item name="android:textSize">18sp</item>
</style>

<style name="AdyenCheckout.CashAppPay.ProgressBar">
<item name="android:layout_width">24dp</item>
<item name="android:layout_height">24dp</item>
<item name="android:indeterminateTint">?android:attr/colorPrimary</item>
</style>

<style name="AdyenCheckout.CashAppPay.WaitingDescriptionTextView">
<item name="android:text">@string/cash_app_pay_waiting_text</item>
<item name="android:textIsSelectable">false</item>
<item name="android:layout_marginStart">8dp</item>
<item name="android:layout_marginEnd">8dp</item>
</style>

<style name="AdyenCheckout.CashAppPay.Button" parent="CAPButtonStyle.Light" />
</resources>
5 changes: 5 additions & 0 deletions components-core/api/components-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,11 @@ public final class com/adyen/checkout/components/core/PaymentMethodTypes {
public final fun getUNSUPPORTED_PAYMENT_METHODS ()Ljava/util/List;
}

public class com/adyen/checkout/components/core/PaymentMethodUnavailableException : com/adyen/checkout/core/exception/CheckoutException {
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/adyen/checkout/components/core/PaymentMethodsApiResponse : com/adyen/checkout/core/internal/data/model/ModelObject {
public static final field CREATOR Landroid/os/Parcelable$Creator;
public static final field Companion Lcom/adyen/checkout/components/core/PaymentMethodsApiResponse$Companion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
*/
package com.adyen.checkout.components.core

interface ComponentAvailableCallback {
fun interface ComponentAvailableCallback {
fun onAvailabilityResult(isAvailable: Boolean, paymentMethod: PaymentMethod)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024 Adyen N.V.
*
* This file is open source and available under the MIT license. See the LICENSE file for more info.
*
* Created by oscars on 30/10/2024.
*/

package com.adyen.checkout.components.core

import com.adyen.checkout.core.exception.CheckoutException

open class PaymentMethodUnavailableException(
message: String,
cause: Throwable? = null
) : CheckoutException(message, cause)
Loading

0 comments on commit b4473d2

Please sign in to comment.