feat(gateway): wire the wallet.order edge call for the direct rail
Add the WalletOrderRequest / WalletOrderResponse FlatBuffers messages and the wallet.order Connect op: the gateway decodes the order request, forwards it to the backend POST /wallet/order and returns the created order id plus the provider launch URL the client opens. Regenerate the committed Go and TS FlatBuffers code.
This commit is contained in:
@@ -37,6 +37,19 @@ func encodeAck(ok bool) []byte {
|
||||
return b.FinishedBytes()
|
||||
}
|
||||
|
||||
// encodeWalletOrder builds a WalletOrderResponse payload: the created order id and the provider
|
||||
// launch URL the client opens.
|
||||
func encodeWalletOrder(o backendclient.WalletOrderResp) []byte {
|
||||
b := flatbuffers.NewBuilder(128)
|
||||
oid := b.CreateString(o.OrderID)
|
||||
url := b.CreateString(o.RedirectURL)
|
||||
fb.WalletOrderResponseStart(b)
|
||||
fb.WalletOrderResponseAddOrderId(b, oid)
|
||||
fb.WalletOrderResponseAddRedirectUrl(b, url)
|
||||
b.Finish(fb.WalletOrderResponseEnd(b))
|
||||
return b.FinishedBytes()
|
||||
}
|
||||
|
||||
// encodeDeleteRequestResult builds an AccountDeleteRequestResult payload reporting which
|
||||
// deletion step-up the account uses ("email" | "phrase").
|
||||
func encodeDeleteRequestResult(method string) []byte {
|
||||
|
||||
Reference in New Issue
Block a user