feat: stream CreditCall payment progress and results

This commit is contained in:
2026-09-08 13:41:29 +01:00
parent ea578fe03e
commit 93ff67fbb1
12 changed files with 1099 additions and 108 deletions
+5 -4
View File
@@ -33,7 +33,7 @@ import (
)
const (
buildVersion = "v1.3.6"
buildVersion = "v2.0.0"
serviceName = "hardlink"
pollingFrequency = 8 * time.Second
)
@@ -135,7 +135,8 @@ func main() {
switch paymentProvider {
case cmstypes.PaySystemCreditCall:
// CreditCall keeps using the existing /takepayment and /takepreauth endpoints.
// CreditCall streaming shares its proven legacy transaction core.
app.EnableCreditCallStreaming()
startChipDnaClient()
go func() {
@@ -203,7 +204,7 @@ func main() {
))
}
// Only PayBridge and Dojo use POST /api/payment/sale.
// PayBridge and Dojo use the generic payment service.
if provider != nil {
app.SetPaymentService(paymentsvc.NewService(provider))
log.Infof("Payment provider enabled for POST /api/payment/sale: %s", cmstypes.PaySystemNames[paymentProvider])
@@ -325,4 +326,4 @@ func pdqSerialForKiosk(pdqs []cmstypes.PDQRec, kiosk int) string {
}
return ""
}
}