From 1452be9dc3d292d0875a58eaf34addf88d9d7b3f Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 6 Mar 2024 15:38:04 +0700 Subject: [PATCH 01/11] add string copy for kredivo --- ui/src/main/res/values-in/string.xml | 19 +++++++++++-------- ui/src/main/res/values/string.xml | 18 +++++++++++------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ui/src/main/res/values-in/string.xml b/ui/src/main/res/values-in/string.xml index 9bb4f700..55230611 100644 --- a/ui/src/main/res/values-in/string.xml +++ b/ui/src/main/res/values-in/string.xml @@ -26,6 +26,7 @@ Danamon Online Banking UOB EZ Pay Akulaku PayLater + Kredivo ShopeePay/e-Wallet Lainnya Alfa Group Indomaret @@ -356,14 +357,16 @@ Bayar sekarang - - Mohon untuk menyelesaikan pembayaran melalui aplikasi/website Krevido. - - Cara bayar - 1. Klik Bayar sekarang dan Anda akan diarahkan ke halaman Kredivo. 2. Login ke akun Kredivo Anda. 3. Pilih jangka waktu cicilan yang diinginkan. 4. Masukkan kode OTP yang telah dikirimkan ke nomor HP-mu. 4. Klik Bayar. 5. Anda akan mendapatkan konfirmasi pada layar jika transaksi berhasil. - - Bayar sekarang - + Kredivo + Akulaku PayLater memungkinkan Anda untuk berbelanja dengan angsuran tanpa menggunakan kartu kredit. + + Pay Now, then you will be directed to Kredivo page.]]> + + + + Pay.]]> + + Mengalihkan ke Kredivo… Buka sekarang diff --git a/ui/src/main/res/values/string.xml b/ui/src/main/res/values/string.xml index 2f6efb73..522512ed 100644 --- a/ui/src/main/res/values/string.xml +++ b/ui/src/main/res/values/string.xml @@ -26,6 +26,7 @@ Danamon Online Banking UOB EZ Pay Akulaku PayLater + Kredivo ShopeePay/other e-Wallets Alfa Group Indomaret @@ -361,13 +362,16 @@ Pay now - Please complete the payment through Kredivo app/website. - - How to pay - 1. Tap Pay now and you will be redirected to Kredivo page. 2. Login to your Kredivo account. 3. Choose the installment term. 4. Enter the OTP code that has been sent to your mobile number. 5. Tap Pay. 6. You\'ll get confirmation message on the screen once transaction is successful. - - Pay now - + Kredivo + Akulaku PayLater memungkinkan Anda untuk berbelanja dengan angsuran tanpa menggunakan kartu kredit. + + Pay Now, then you will be directed to Kredivo page.]]> + + + + Pay.]]> + + Redirecting to Kredivo… Open now From da80be8cd02b3e93238dc399ae01a76d7580a3ee Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 6 Mar 2024 15:39:25 +0700 Subject: [PATCH 02/11] implement new kredivo payment method --- .../java/com/midtrans/sdk/corekit/core/PaymentMethod.java | 3 ++- .../com/midtrans/sdk/corekit/api/model/PaymentType.kt | 2 ++ .../requestbuilder/payment/PayLaterPaymentRequestBuilder.kt | 3 ++- .../com/midtrans/sdk/corekit/internal/analytics/PageName.kt | 2 ++ .../kotlin/com/midtrans/sdk/uikit/api/model/PaymentType.kt | 2 ++ .../main/kotlin/com/midtrans/sdk/uikit/external/UiKitApi.kt | 1 + .../internal/presentation/paylater/PayLaterActivity.kt | 2 ++ .../presentation/paymentoption/PaymentOptionActivity.kt | 3 ++- .../presentation/paymentoption/PaymentOptionViewModel.kt | 5 ++++- .../sdk/uikit/internal/view/SnapInstructionButton.kt | 1 + .../com/midtrans/sdk/uikit/internal/view/SnapWebView.kt | 6 ++++++ 11 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ui/src/main/java/com/midtrans/sdk/corekit/core/PaymentMethod.java b/ui/src/main/java/com/midtrans/sdk/corekit/core/PaymentMethod.java index c7452980..5862feda 100644 --- a/ui/src/main/java/com/midtrans/sdk/corekit/core/PaymentMethod.java +++ b/ui/src/main/java/com/midtrans/sdk/corekit/core/PaymentMethod.java @@ -26,5 +26,6 @@ public enum PaymentMethod { UOB_EZPAY_APP, INDOMARET, AKULAKU, - ALFAMART + ALFAMART, + KREDIVO } diff --git a/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/model/PaymentType.kt b/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/model/PaymentType.kt index 4fce78dc..eac2aaa4 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/model/PaymentType.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/model/PaymentType.kt @@ -23,6 +23,7 @@ class PaymentType { QRIS, DANAMON_ONLINE, AKULAKU, + KREDIVO, CSTORE, ALFAMART, UOB_EZPAY_WEB, @@ -67,6 +68,7 @@ class PaymentType { //PAY LATER const val AKULAKU = "akulaku" + const val KREDIVO = "kredivo" //CONVENIENCE STORE const val CSTORE = "cstore" diff --git a/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/requestbuilder/payment/PayLaterPaymentRequestBuilder.kt b/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/requestbuilder/payment/PayLaterPaymentRequestBuilder.kt index 6ac54d66..971b591c 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/requestbuilder/payment/PayLaterPaymentRequestBuilder.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/corekit/api/requestbuilder/payment/PayLaterPaymentRequestBuilder.kt @@ -13,7 +13,8 @@ class PayLaterPaymentRequestBuilder : PaymentRequestBuilder() { override fun build(): PaymentRequest { return when (paymentType) { - PaymentType.AKULAKU -> PaymentRequest(paymentType = paymentType) + PaymentType.AKULAKU, + PaymentType.KREDIVO -> PaymentRequest(paymentType = paymentType) else -> throw InvalidPaymentTypeException() } } diff --git a/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt b/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt index bed8caf3..08d9b8f1 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt @@ -13,6 +13,7 @@ class PageName { INDOMARET_PAGE, ALFAMART_PAGE, AKULAKU_PAGE, + KREDIVO_PAGE, KLIK_BCA_PAGE, BCA_KLIK_PAY_PAGE, OCTO_CLICKS_PAGE, @@ -45,6 +46,7 @@ class PageName { const val INDOMARET_PAGE = "Indomaret Page" const val ALFAMART_PAGE = "Alfamart Page" const val AKULAKU_PAGE = "Akulaku Instruction" + const val KREDIVO_PAGE = "Kredivo Instruction" const val KLIK_BCA_PAGE = "KlikBCA Instruction" const val BCA_KLIK_PAY_PAGE = "BCAKlikPay Instruction" const val OCTO_CLICKS_PAGE = "OCTOClicks Instruction" diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/api/model/PaymentType.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/api/model/PaymentType.kt index 50bacd73..09d17ff3 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/api/model/PaymentType.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/api/model/PaymentType.kt @@ -22,6 +22,7 @@ class PaymentType { SHOPEEPAY, DANAMON_ONLINE, AKULAKU, + KREDIVO, CSTORE, ALFAMART, UOB_EZPAY_WEB, @@ -61,6 +62,7 @@ class PaymentType { //PAY LATER const val AKULAKU = "akulaku" + const val KREDIVO = "kredivo" //CONVENIENCE STORE const val CSTORE = "cstore" diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/external/UiKitApi.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/external/UiKitApi.kt index aa771875..c7f340c3 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/external/UiKitApi.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/external/UiKitApi.kt @@ -93,6 +93,7 @@ class UiKitApi private constructor(val builder: Builder) { PaymentMethod.DANAMON_ONLINE -> PaymentTypeItem(PaymentType.DANAMON_ONLINE, null) PaymentMethod.INDOMARET -> PaymentTypeItem(PaymentType.INDOMARET, null) PaymentMethod.AKULAKU -> PaymentTypeItem(PaymentType.AKULAKU, null) + PaymentMethod.KREDIVO -> PaymentTypeItem(PaymentType.KREDIVO, null) PaymentMethod.ALFAMART -> PaymentTypeItem(PaymentType.ALFAMART, null) PaymentMethod.UOB_EZPAY -> PaymentTypeItem(PaymentType.UOB_EZPAY, null) PaymentMethod.UOB_EZPAY_APP -> PaymentTypeItem( diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt index 135671d6..e18cffd4 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt @@ -288,12 +288,14 @@ class PayLaterActivity : BaseActivity() { private fun getTitleId(paymentType: String): Int { return when (paymentType) { PaymentType.AKULAKU -> R.string.akulaku_title + PaymentType.KREDIVO -> R.string.kredivo_title else -> 0 } } private fun getCta(paymentType: String): Int { return when (paymentType) { + PaymentType.KREDIVO, PaymentType.AKULAKU -> R.string.akulaku_cta else -> 0 } diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionActivity.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionActivity.kt index 5bc07b0f..89d1cc11 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionActivity.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionActivity.kt @@ -661,7 +661,8 @@ class PaymentOptionActivity : BaseActivity() { Pair(PaymentType.GOPAY_QRIS, eWalletPaymentLauncher), Pair(PaymentType.ALFAMART, cStorePaymentLauncher), Pair(PaymentType.INDOMARET, cStorePaymentLauncher), - Pair(PaymentType.AKULAKU, payLaterPaymentLauncher) + Pair(PaymentType.AKULAKU, payLaterPaymentLauncher), + Pair(PaymentType.KREDIVO, payLaterPaymentLauncher) ) } diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt index aaad0d8b..6cebeed2 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt @@ -22,6 +22,7 @@ import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.GOPAY import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.GOPAY_QRIS import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.INDOMARET import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.KLIK_BCA +import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.KREDIVO import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.OTHER_VA import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.PERMATA_VA import com.midtrans.sdk.corekit.api.model.PaymentType.Companion.SHOPEEPAY @@ -76,7 +77,7 @@ internal class PaymentOptionViewModel @Inject constructor( || type == DANAMON_ONLINE || type == UOB_EZPAY || type == CREDIT_CARD - || type == AKULAKU + || type == AKULAKU || type == KREDIVO || (type == GOPAY && !isTabletDevice) || (type == GOPAY_QRIS && isTabletDevice) || (type == SHOPEEPAY && !isTabletDevice) @@ -99,6 +100,7 @@ internal class PaymentOptionViewModel @Inject constructor( R.drawable.ic_outline_amex_40 ) AKULAKU -> listOf(R.drawable.ic_outline_akulaku_40) + KREDIVO -> listOf(R.drawable.ic_outline_kredivo_40) GOPAY -> listOf(R.drawable.ic_outline_gopaylogo_40) GOPAY_QRIS -> { listOf( @@ -136,6 +138,7 @@ internal class PaymentOptionViewModel @Inject constructor( UOB_EZPAY -> R.string.payment_summary_uobezpay CREDIT_CARD -> R.string.payment_summary_cc_dc AKULAKU -> R.string.payment_summary_akulaku + KREDIVO -> R.string.payment_summary_kredivo INDOMARET -> R.string.payment_summary_indomaret ALFAMART -> R.string.payment_summary_alfamart SHOPEEPAY -> R.string.payment_title_shopeepay diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt index dda9e88c..1ebae68b 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt @@ -121,6 +121,7 @@ fun SnapInstructionButton( private fun getHowToPayId(paymentType: String): Int? { return when (paymentType) { PaymentType.AKULAKU -> R.array.akulaku_how_to_pay + PaymentType.KREDIVO -> R.array.kredivo_how_to_pay else -> null } } diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapWebView.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapWebView.kt index 5807846d..6260b7b8 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapWebView.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapWebView.kt @@ -231,6 +231,11 @@ private inline fun finishWebView( onFinishWebView.invoke() } } + PaymentType.KREDIVO -> { + if (url.contains(SnapWebViewClient.CALLBACK_KREDIVO, true)) { + onFinishWebView.invoke() + } + } PaymentType.GOPAY, PaymentType.SHOPEEPAY, PaymentType.UOB_EZPAY_APP-> { @@ -256,5 +261,6 @@ private class SnapWebViewClient( const val CALLBACK_AKULAKU = "?refNo=" const val CALLBACK_OLD_THREE_DS = "callback" const val CALLBACK_NEW_THREE_DS = "result-completion" + const val CALLBACK_KREDIVO = "order_id" } } From a13b60c850a9af047b00b950b01df9fc3d9b0f55 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 6 Mar 2024 15:39:57 +0700 Subject: [PATCH 03/11] update string resource for payment title --- .../sdk/sample/presentation/shop/OrderReviewRevampActivity.kt | 2 +- .../presentation/banktransfer/BankTransferDetailActivity.kt | 2 +- .../presentation/conveniencestore/ConvenienceStoreActivity.kt | 2 +- .../sdk/uikit/internal/presentation/ewallet/WalletActivity.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/shop/OrderReviewRevampActivity.kt b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/shop/OrderReviewRevampActivity.kt index e9fbd274..639cc90f 100644 --- a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/shop/OrderReviewRevampActivity.kt +++ b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/shop/OrderReviewRevampActivity.kt @@ -58,7 +58,7 @@ class OrderReviewRevampActivity : ComponentActivity() { ) Toast.makeText( this@OrderReviewRevampActivity, - "Coba trxid ${transactionResult?.transactionId.orEmpty()}", + "Coba trxid ${transactionResult?.transactionId.orEmpty()} trx status ${transactionResult?.status.orEmpty()}", Toast.LENGTH_LONG ).show() } diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/banktransfer/BankTransferDetailActivity.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/banktransfer/BankTransferDetailActivity.kt index 80216af4..50ee20ac 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/banktransfer/BankTransferDetailActivity.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/banktransfer/BankTransferDetailActivity.kt @@ -302,7 +302,7 @@ internal class BankTransferDetailActivity : BaseActivity() { SnapInstructionButton( isExpanded = isExpanded, iconResId = R.drawable.ic_help, - title = stringResource(id = R.string.kredivo_how_to_pay_title), + title = stringResource(id = R.string.payment_instruction_how_to_pay_title), onExpandClick = { viewModel?.trackHowToPayClicked(paymentType) isExpanded = !isExpanded diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/conveniencestore/ConvenienceStoreActivity.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/conveniencestore/ConvenienceStoreActivity.kt index 08981957..cf5b1db3 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/conveniencestore/ConvenienceStoreActivity.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/conveniencestore/ConvenienceStoreActivity.kt @@ -331,7 +331,7 @@ internal class ConvenienceStoreActivity : BaseActivity() { modifier = Modifier.padding(top = 16.dp, bottom = 16.dp), isExpanded = isExpanded, iconResId = R.drawable.ic_help, - title = stringResource(id = R.string.kredivo_how_to_pay_title), + title = stringResource(id = R.string.payment_instruction_how_to_pay_title), onExpandClick = { viewModel?.trackHowToPayClicked(paymentType) isExpanded = !isExpanded diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/ewallet/WalletActivity.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/ewallet/WalletActivity.kt index ec39ef9d..cad95530 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/ewallet/WalletActivity.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/ewallet/WalletActivity.kt @@ -376,7 +376,7 @@ internal class WalletActivity : BaseActivity() { modifier = Modifier.padding(top = 16.dp, bottom = 16.dp), isExpanded = isExpanded, iconResId = R.drawable.ic_help, - title = stringResource(id = R.string.kredivo_how_to_pay_title), + title = stringResource(id = R.string.payment_instruction_how_to_pay_title), onExpandClick = { viewModel.trackHowToPayClicked(paymentType) isExpanded = !isExpanded From 8b82dcb68b98bdb17aa03101e1fe3d33c7a90fb3 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 6 Mar 2024 15:40:17 +0700 Subject: [PATCH 04/11] update demo app config for kredivo --- .../sdk/sample/presentation/config/DemoConfigurationActivity.kt | 2 +- .../sdk/sample/presentation/config/component/DropdownMenu.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/DemoConfigurationActivity.kt b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/DemoConfigurationActivity.kt index 441ed8dc..1a030d51 100644 --- a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/DemoConfigurationActivity.kt +++ b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/DemoConfigurationActivity.kt @@ -86,7 +86,7 @@ class DemoConfigurationActivity : AppCompatActivity() { PaymentMethod.GO_PAY, PaymentMethod.SHOPEEPAY, PaymentMethod.KLIKBCA, PaymentMethod.BCA_KLIKPAY, PaymentMethod.CIMB_CLICKS, PaymentMethod.EPAY_BRI, PaymentMethod.DANAMON_ONLINE, PaymentMethod.UOB_EZPAY, PaymentMethod.UOB_EZPAY_APP, PaymentMethod.UOB_EZPAY_WEB, - PaymentMethod.INDOMARET, PaymentMethod.ALFAMART, PaymentMethod.AKULAKU + PaymentMethod.INDOMARET, PaymentMethod.ALFAMART, PaymentMethod.AKULAKU, PaymentMethod.KREDIVO ).map { it.toString() } diff --git a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt index 41932956..b142e9d6 100644 --- a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt +++ b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt @@ -148,6 +148,7 @@ fun AlertDialogDropdownMenu( ListItem("Alfamart", PaymentType.ALFAMART, isSelected = false), ListItem("Akulaku", PaymentType.AKULAKU, isSelected = false), + ListItem("KREDIVO", PaymentType.KREDIVO, isSelected = false), ListItem("UOB", PaymentType.UOB_EZPAY, isSelected = false), ) ) From fc1bd3a3eabb34d40aa836e25ea90211b02888ad Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Thu, 7 Mar 2024 10:48:59 +0700 Subject: [PATCH 05/11] fix instruction wording for indonesian --- ui/src/main/res/values-in/string.xml | 16 ++++++---------- ui/src/main/res/values/string.xml | 6 +----- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/ui/src/main/res/values-in/string.xml b/ui/src/main/res/values-in/string.xml index 55230611..4c17f6eb 100644 --- a/ui/src/main/res/values-in/string.xml +++ b/ui/src/main/res/values-in/string.xml @@ -358,19 +358,15 @@ Bayar sekarang Kredivo - Akulaku PayLater memungkinkan Anda untuk berbelanja dengan angsuran tanpa menggunakan kartu kredit. - Pay Now, then you will be directed to Kredivo page.]]> - - - - Pay.]]> - + Bayar sekarang dan Anda akan diarahkan ke halaman Kredivo.]]> + + + + Bayar.]]> + - Mengalihkan ke Kredivo… - Buka sekarang - UOB EZ Pay UOB EZ Pay via web Pastikan Anda sudah memiliki ID terdaftar dan silakan selesaikan pembayaran melalui UOB EZ Pay. diff --git a/ui/src/main/res/values/string.xml b/ui/src/main/res/values/string.xml index 522512ed..87af3b2e 100644 --- a/ui/src/main/res/values/string.xml +++ b/ui/src/main/res/values/string.xml @@ -363,7 +363,6 @@ Kredivo - Akulaku PayLater memungkinkan Anda untuk berbelanja dengan angsuran tanpa menggunakan kartu kredit. Pay Now, then you will be directed to Kredivo page.]]> @@ -372,10 +371,7 @@ Pay.]]> - - Redirecting to Kredivo… - Open now - + UOB EZ Pay UOB EZ Pay via web Please make sure that you have registered ID and complete your payment via UOB EZ Pay. From 80f94a9e65e825b295a4dbb4c653f99ce08b2119 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 13 Mar 2024 18:45:47 +0700 Subject: [PATCH 06/11] adjust logic specifically handle kredivo cta --- .../uikit/internal/presentation/paylater/PayLaterActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt index e18cffd4..0cf79fa2 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paylater/PayLaterActivity.kt @@ -295,7 +295,7 @@ class PayLaterActivity : BaseActivity() { private fun getCta(paymentType: String): Int { return when (paymentType) { - PaymentType.KREDIVO, + PaymentType.KREDIVO -> R.string.kredivo_cta PaymentType.AKULAKU -> R.string.akulaku_cta else -> 0 } From 206c7cafb97ffe382c74331a99eb146c53159b87 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 13 Mar 2024 18:46:04 +0700 Subject: [PATCH 07/11] remove double spacing --- .../sdk/corekit/internal/analytics/PageName.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt b/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt index 08d9b8f1..508ceba5 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/corekit/internal/analytics/PageName.kt @@ -45,14 +45,14 @@ class PageName { const val SHOPEEPAY_DEEPLINK_PAGE = "Shopeepay Deeplink Instruction" const val INDOMARET_PAGE = "Indomaret Page" const val ALFAMART_PAGE = "Alfamart Page" - const val AKULAKU_PAGE = "Akulaku Instruction" - const val KREDIVO_PAGE = "Kredivo Instruction" - const val KLIK_BCA_PAGE = "KlikBCA Instruction" - const val BCA_KLIK_PAY_PAGE = "BCAKlikPay Instruction" + const val AKULAKU_PAGE = "Akulaku Instruction" + const val KREDIVO_PAGE = "Kredivo Instruction" + const val KLIK_BCA_PAGE = "KlikBCA Instruction" + const val BCA_KLIK_PAY_PAGE = "BCAKlikPay Instruction" const val OCTO_CLICKS_PAGE = "OCTOClicks Instruction" const val DANAMON_ONLINE_PAGE = "Danamon Online Banking Instruction" const val BRIMO_PAGE = "BRImo Instruction" - const val UOB_PAGE = "UOB EZpay Instruction" + const val UOB_PAGE = "UOB EZpay Instruction" const val UOB_SELECTION_PAGE = "UOB EZpay Selection" const val REDIRECTION_PAGE = "Redirection Page" const val SUCCESS_PAGE = "Success Page" From a1c864296c97965050b2ce0a471cf098784f1dbc Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 13 Mar 2024 18:46:35 +0700 Subject: [PATCH 08/11] add string for kredivo cta --- ui/src/main/res/values-in/string.xml | 1 + ui/src/main/res/values/string.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/ui/src/main/res/values-in/string.xml b/ui/src/main/res/values-in/string.xml index 4c17f6eb..ce690c48 100644 --- a/ui/src/main/res/values-in/string.xml +++ b/ui/src/main/res/values-in/string.xml @@ -366,6 +366,7 @@ Bayar.]]> + Bayar sekarang UOB EZ Pay UOB EZ Pay via web diff --git a/ui/src/main/res/values/string.xml b/ui/src/main/res/values/string.xml index 87af3b2e..09a75723 100644 --- a/ui/src/main/res/values/string.xml +++ b/ui/src/main/res/values/string.xml @@ -371,6 +371,7 @@ Pay.]]> + Pay now UOB EZ Pay UOB EZ Pay via web From 5583208a692def9594ac3ebc6073c49bcf2dd8e4 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 13 Mar 2024 18:47:04 +0700 Subject: [PATCH 09/11] reformat code indentation --- .../paymentoption/PaymentOptionViewModel.kt | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt index 6cebeed2..5bbc92ec 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/presentation/paymentoption/PaymentOptionViewModel.kt @@ -68,20 +68,21 @@ internal class PaymentOptionViewModel @Inject constructor( private fun isValidMethod(type: String, isTabletDevice: Boolean): Boolean { return type == INDOMARET - || type == ALFAMART - || type == BANK_TRANSFER - || type == KLIK_BCA - || type == BCA_KLIKPAY - || type == CIMB_CLICKS - || type == BRI_EPAY - || type == DANAMON_ONLINE - || type == UOB_EZPAY - || type == CREDIT_CARD - || type == AKULAKU || type == KREDIVO - || (type == GOPAY && !isTabletDevice) - || (type == GOPAY_QRIS && isTabletDevice) - || (type == SHOPEEPAY && !isTabletDevice) - || (type == SHOPEEPAY_QRIS && isTabletDevice) + || type == ALFAMART + || type == BANK_TRANSFER + || type == KLIK_BCA + || type == BCA_KLIKPAY + || type == CIMB_CLICKS + || type == BRI_EPAY + || type == DANAMON_ONLINE + || type == UOB_EZPAY + || type == CREDIT_CARD + || type == AKULAKU + || type == KREDIVO + || (type == GOPAY && !isTabletDevice) + || (type == GOPAY_QRIS && isTabletDevice) + || (type == SHOPEEPAY && !isTabletDevice) + || (type == SHOPEEPAY_QRIS && isTabletDevice) } private fun getIcons(type: String, channels: List, isTabletDevice: Boolean): List { From 794e0d30c12d5a0533289955b2a646eec39386d6 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Wed, 13 Mar 2024 18:47:25 +0700 Subject: [PATCH 10/11] fix kredivo naming on demo app --- .../sdk/sample/presentation/config/component/DropdownMenu.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt index b142e9d6..19e5c773 100644 --- a/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt +++ b/app/src/main/kotlin/com/midtrans/sdk/sample/presentation/config/component/DropdownMenu.kt @@ -148,7 +148,7 @@ fun AlertDialogDropdownMenu( ListItem("Alfamart", PaymentType.ALFAMART, isSelected = false), ListItem("Akulaku", PaymentType.AKULAKU, isSelected = false), - ListItem("KREDIVO", PaymentType.KREDIVO, isSelected = false), + ListItem("Kredivo", PaymentType.KREDIVO, isSelected = false), ListItem("UOB", PaymentType.UOB_EZPAY, isSelected = false), ) ) From e26212deff011d1948fd5b2b040449e30a4fcfe2 Mon Sep 17 00:00:00 2001 From: muhammad fauzi masykur Date: Thu, 28 Mar 2024 05:07:20 +0700 Subject: [PATCH 11/11] add instructions for kredivo --- .../midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt | 1 + ui/src/main/res/values-in/string.xml | 1 + ui/src/main/res/values/string.xml | 1 + 3 files changed, 3 insertions(+) diff --git a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt index 1ebae68b..4d967a43 100644 --- a/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt +++ b/ui/src/main/kotlin/com/midtrans/sdk/uikit/internal/view/SnapInstructionButton.kt @@ -129,6 +129,7 @@ private fun getHowToPayId(paymentType: String): Int? { private fun getInstructionId(paymentType: String): Int? { return when (paymentType) { PaymentType.AKULAKU -> R.string.akulaku_instruction + PaymentType.KREDIVO -> R.string.kredivo_instruction else -> null } } diff --git a/ui/src/main/res/values-in/string.xml b/ui/src/main/res/values-in/string.xml index ce690c48..283e2dc1 100644 --- a/ui/src/main/res/values-in/string.xml +++ b/ui/src/main/res/values-in/string.xml @@ -358,6 +358,7 @@ Bayar sekarang Kredivo + Mohon untuk menyelesaikan pembayaran melalui aplikasi/website kredivo. Bayar sekarang dan Anda akan diarahkan ke halaman Kredivo.]]> diff --git a/ui/src/main/res/values/string.xml b/ui/src/main/res/values/string.xml index 09a75723..b6d6b2d9 100644 --- a/ui/src/main/res/values/string.xml +++ b/ui/src/main/res/values/string.xml @@ -363,6 +363,7 @@ Kredivo + Please complete the payment through Kredivo app/website. Pay Now, then you will be directed to Kredivo page.]]>