Add Google Play payment

This commit is contained in:
Aleksandras Kostarevas 2024-07-05 20:17:37 +03:00
parent f436fad645
commit 91b1b28e1c
3 changed files with 10 additions and 4 deletions

View File

@ -128,6 +128,7 @@ android {
getIsDefault().set(true)
buildConfigField "String", "PAYMENT_URL", "\"https://pay.futo.org/api/PaymentPortal?product=voiceinput&success=futo-keyboard%3a%2f%2flicense%2factivate\""
buildConfigField "String", "PAYMENT_PRICE", "\"~\$6.99\""
}
playstore {
dimension "buildType"
@ -137,7 +138,8 @@ android {
buildConfigField "boolean", "IS_PLAYSTORE_BUILD", "true"
buildConfigField "boolean", "UPDATE_CHECKING", "false"
buildConfigField "String", "PAYMENT_URL", "\"\""
buildConfigField "String", "PAYMENT_URL", "\"https://play.google.com/store/apps/details?id=org.futo.keyboardpayment\""
buildConfigField "String", "PAYMENT_PRICE", "\"~\$11.99\""
}
}

View File

@ -71,8 +71,8 @@
<string name="payment_pending">Payment Pending</string>
<string name="payment_failed_body">Unfortunately, your payment has failed for one reason or another. Please contact us if you need help. You can reach us at keyboard@futo.org, with the button below, or with Send Feedback in Help</string>
<string name="payment_failed_body_ex">There may have been a problem with your payment. If it did go through, you should receive an email with a license key. Please contact us if you need help. You can reach us at keyboard@futo.org, with the button below, or with Share Feedback at the main screen.</string>
<string name="pay_via_x">Pay via <xliff:g name="paymentMethod" example="Play Store">%s</xliff:g></string>
<string name="pay">Pay (about $4.99 + tax)</string>
<string name="pay_via_google">Pay via Google Play (<xliff:g name="price" example="~$2.99">%s</xliff:g> + tax)</string>
<string name="pay">Pay (<xliff:g name="price" example="~$2.99">%s</xliff:g> + tax)</string>
<string name="i_already_paid">I already paid</string>
<string name="i_already_paid_2">I already paid (tap again to confirm)</string>
<string name="remind_me_in_x">"Remind me in "</string>

View File

@ -484,7 +484,11 @@ fun PaymentScreen(
.fillMaxWidth()
.padding(8.dp)
) {
Text(stringResource(R.string.pay))
if(BuildConfig.IS_PLAYSTORE_BUILD) {
Text(stringResource(R.string.pay_via_google, BuildConfig.PAYMENT_PRICE))
} else {
Text(stringResource(R.string.pay, BuildConfig.PAYMENT_PRICE))
}
}
}