Skip to content

Commit

Permalink
Removed Linepay implementation as Linepay doesn't exist anymore. (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmniX authored Sep 25, 2024
1 parent d91790d commit 213dbf1
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ internal class KomojuPaymentScreenModel(private val config: KomojuSDK.Configurat
email = state.value.commonDisplayData.email,
)

is PaymentMethod.LinePay -> TODO()
is PaymentMethod.MerPay -> TODO()
is PaymentMethod.NetCash -> TODO()
is PaymentMethod.Other -> TODO()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ internal fun AppPayForm(paymentMethod: PaymentMethod, onPayButtonClicked: () ->
when (paymentMethod) {
is PaymentMethod.AliPay -> "PAYMENT_VIA_ALI_PAY"
is PaymentMethod.AuPay -> "PAYMENT_VIA_AU_PAY"
is PaymentMethod.LinePay -> "PAYMENT_VIA_LINE_PAY"
is PaymentMethod.MerPay -> "PAYMENT_VIA_MER_PAY"
is PaymentMethod.PayPay -> "PAYMENT_VIA_PAY_PAY"
is PaymentMethod.RakutenPay -> "PAYMENT_VIA_RAKUTEN"
Expand All @@ -48,7 +47,6 @@ internal fun AppPayForm(paymentMethod: PaymentMethod, onPayButtonClicked: () ->
when (paymentMethod) {
is PaymentMethod.AliPay -> "ALI_PAY_REDIRECT_MESSAGE"
is PaymentMethod.AuPay -> "AU_PAY_REDIRECT_MESSAGE"
is PaymentMethod.LinePay -> "LINE_PAY_REDIRECT_MESSAGE"
is PaymentMethod.MerPay -> "MER_PAY_REDIRECT_MESSAGE"
is PaymentMethod.PayPay -> "PAY_PAY_REDIRECT_MESSAGE"
is PaymentMethod.RakutenPay -> "RAKUTEN_REDIRECT_MESSAGE"
Expand All @@ -60,7 +58,6 @@ internal fun AppPayForm(paymentMethod: PaymentMethod, onPayButtonClicked: () ->
when (paymentMethod) {
is PaymentMethod.AliPay -> "CONTINUE_TO_ALI_PAY"
is PaymentMethod.AuPay -> "CONTINUE_TO_AU_PAY"
is PaymentMethod.LinePay -> "CONTINUE_TO_LINE_PAY"
is PaymentMethod.MerPay -> "CONTINUE_TO_MER_PAY"
is PaymentMethod.PayPay -> "CONTINUE_TO_PAY_PAY"
is PaymentMethod.RakutenPay -> "CONTINUE_TO_RAKUTEN"
Expand Down Expand Up @@ -99,9 +96,9 @@ internal fun AppPayForm(paymentMethod: PaymentMethod, onPayButtonClicked: () ->
private fun AppPayFormPreview() {
KomojuMobileSdkTheme(Language.ENGLISH) {
AppPayForm(
PaymentMethod.LinePay(
displayName = "LINE Pay",
hashedGateway = "LINE",
PaymentMethod.PayPay(
displayName = "PayPay",
hashedGateway = "paypay",
exchangeRate = 1.0,
currency = "JPY",
amount = 100.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ internal fun PaymentMethodForm(

is PaymentMethod.AliPay,
is PaymentMethod.AuPay,
is PaymentMethod.LinePay,
is PaymentMethod.MerPay,
is PaymentMethod.PayPay,
is PaymentMethod.RakutenPay,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ private val PaymentMethod.displayIcon
is PaymentMethod.BitCash -> R.drawable.komoju_ic_bitcash
is PaymentMethod.CreditCard -> R.drawable.komoju_ic_credit_card
is PaymentMethod.Konbini -> R.drawable.komoju_ic_konbini
is PaymentMethod.LinePay -> R.drawable.komoju_ic_linepay
is PaymentMethod.MerPay -> R.drawable.komoju_ic_merpay
is PaymentMethod.NetCash -> R.drawable.komoju_ic_credit_card
is PaymentMethod.Paidy -> R.drawable.komoju_ic_paidy
Expand Down
15 changes: 0 additions & 15 deletions android/src/main/res/drawable/komoju_ic_linepay.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ sealed interface PaymentMethod {
val isOffsite: Boolean,
) : PaymentMethod

data class LinePay(
override val displayName: String,
override val hashedGateway: String,
override val exchangeRate: Double,
override val currency: String,
override val amount: Double,
override val additionalFields: List<String>,
val isOffsite: Boolean,
) : PaymentMethod

data class MerPay(
override val displayName: String,
override val hashedGateway: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ private val englishTexts = """
{
"credit_card": "Credit Card",
"paypay": "PayPay",
"linepay": "LINE Pay",
"merpay": "Merpay",
"rakutenpay": "Rakuten Pay",
"paidy": "Paidy",
Expand Down Expand Up @@ -107,7 +106,6 @@ private val japaneseTexts = """
{
"credit_card": "カード",
"paypay": "PayPay",
"linepay": "LINE Pay",
"merpay": "メルペイ",
"rakutenpay": "楽天ペイ",
"paidy": "ペイディ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ internal object SessionMapper {
displayName = i18nTexts[paymentMethodType],
)

"linepay" -> PaymentMethod.LinePay(
hashedGateway = paymentMethod.hashedGateway.orEmpty(),
exchangeRate = paymentMethod.exchangeRate ?: 1.0,
currency = paymentMethod.currency.orEmpty(),
amount = paymentMethod.amount ?: 0.0,
additionalFields = paymentMethod.additionalFields?.filterNotNull().orEmpty(),
isOffsite = paymentMethod.offsite ?: false,
displayName = i18nTexts[paymentMethodType],
)

"merpay" -> PaymentMethod.MerPay(
hashedGateway = paymentMethod.hashedGateway.orEmpty(),
exchangeRate = paymentMethod.exchangeRate ?: 1.0,
Expand Down

0 comments on commit 213dbf1

Please sign in to comment.