summaryrefslogtreecommitdiff
path: root/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt
diff options
context:
space:
mode:
Diffstat (limited to 'merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt')
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt7
1 files changed, 6 insertions, 1 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 bb75362..4053d4b 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
@@ -18,10 +18,12 @@ package net.taler.merchantpos.order
import net.taler.common.Amount
import net.taler.common.ContractTerms
+import net.taler.common.Timestamp
import net.taler.common.now
import net.taler.merchantpos.config.Category
import net.taler.merchantpos.config.ConfigProduct
import java.net.URLEncoder
+import java.util.concurrent.TimeUnit.HOURS
private const val FULFILLMENT_PREFIX = "taler://fulfillment-success/"
@@ -115,12 +117,15 @@ data class Order(val id: Int, val currency: String, val availableCategories: Map
}
fun toContractTerms(): ContractTerms {
+ val deadline = Timestamp(now() + HOURS.toMillis(1))
return ContractTerms(
summary = summary,
summaryI18n = summaryI18n,
amount = total,
fulfillmentUrl = fulfillmentUri,
- products = products.map { it.toContractProduct() }
+ products = products.map { it.toContractProduct() },
+ refundDeadline = deadline,
+ wireTransferDeadline = deadline
)
}