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

Removed LinePay implementation #13

Merged
merged 1 commit into from
Sep 25, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -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()
Original file line number Diff line number Diff line change
@@ -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"
@@ -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"
@@ -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"
@@ -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,
Original file line number Diff line number Diff line change
@@ -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,
Original file line number Diff line number Diff line change
@@ -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
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
@@ -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,
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ private val englishTexts = """
{
"credit_card": "Credit Card",
"paypay": "PayPay",
"linepay": "LINE Pay",
"merpay": "Merpay",
"rakutenpay": "Rakuten Pay",
"paidy": "Paidy",
@@ -107,7 +106,6 @@ private val japaneseTexts = """
{
"credit_card": "カード",
"paypay": "PayPay",
"linepay": "LINE Pay",
"merpay": "メルペイ",
"rakutenpay": "楽天ペイ",
"paidy": "ペイディ",
Original file line number Diff line number Diff line change
@@ -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,