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
+9 -3
View File
@@ -30,14 +30,20 @@ type SalePaymentRequest struct {
}
type paymentStreamMessage struct {
Type string `json:"type"`
Code string `json:"code,omitempty"`
Response *cmstypes.ResponseRec `json:"response,omitempty"`
Type string `json:"type"`
Code string `json:"code,omitempty"`
Response *cmstypes.ResponseRec `json:"response,omitempty"`
Result *creditCallStreamResult `json:"result,omitempty"`
}
func (app *App) salePayment(w http.ResponseWriter, r *http.Request) {
const op = logging.Op("salePayment")
if app.creditCallStreamEnabled {
app.streamCreditCallSale(w, r)
return
}
response := cmstypes.ResponseRec{
Status: cmstypes.StatusRec{
Code: http.StatusInternalServerError,