feat: stream CreditCall payment progress and results
This commit is contained in:
@@ -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 ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user