aboutsummaryrefslogtreecommitdiff
path: root/merchant-terminal
diff options
context:
space:
mode:
Diffstat (limited to 'merchant-terminal')
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt2
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt4
2 files changed, 3 insertions, 3 deletions
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt
index 9860dbd..2d4d32c 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt
@@ -117,7 +117,7 @@ data class Order(val id: Int, val currency: String, val availableCategories: Map
}
fun toContractTerms(): ContractTerms {
- val deadline = Timestamp(now() + HOURS.toMillis(1))
+ val deadline = Timestamp.fromMillis(now() + HOURS.toMillis(1))
return ContractTerms(
summary = summary,
summaryI18n = summaryI18n,
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt
index d703a31..02f66fa 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt
@@ -26,7 +26,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
-import net.taler.common.Duration
+import net.taler.common.RelativeTime
import net.taler.common.assertUiThread
import net.taler.merchantlib.CheckPaymentResponse
import net.taler.merchantlib.MerchantApi
@@ -74,7 +74,7 @@ class PaymentManager(
mPayment.value = Payment(order, order.summary, configManager.currency!!)
val request = PostOrderRequest(
contractTerms = order.toContractTerms(),
- refundDelay = Duration(HOURS.toMillis(1))
+ refundDelay = RelativeTime.fromMillis(HOURS.toMillis(1))
)
api.postOrder(merchantConfig, request).handle(::onNetworkError) { orderResponse ->
assertUiThread()