mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
21 lines
649 B
Kotlin
21 lines
649 B
Kotlin
package org.amnezia.vpn
|
|
|
|
import android.app.Activity
|
|
import android.content.Context
|
|
import BillingProvider.Companion.withBillingProvider
|
|
|
|
class BillingPaymentRepository(private val context: Context) : BillingRepository {
|
|
|
|
override suspend fun getCountryCode(): String = withBillingProvider(context) {
|
|
getCustomerCountryCode()
|
|
}
|
|
|
|
override suspend fun getSubscriptionPlans(): String = withBillingProvider(context) {
|
|
getSubscriptionPlans()
|
|
}
|
|
|
|
override suspend fun purchaseSubscription(activity: Activity): String = withBillingProvider(context) {
|
|
purchaseSubscription(activity, "obfuscatedAccountId")
|
|
}
|
|
}
|