Add the PaymentId and Receipt fields to the Transaction under the Order.#324
Add the PaymentId and Receipt fields to the Transaction under the Order.#324oliver006 merged 2 commits intobold-commerce:masterfrom
Conversation
oliver006
left a comment
There was a problem hiding this comment.
Thanks for the PR!
Got one question about the receipt field.
| Test bool `json:"test,omitempty"` | ||
| Authorization string `json:"authorization,omitempty"` | ||
| PaymentId string `json:"payment_id,omitempty"` | ||
| Receipt map[string]interface{} `json:"receipt,omitempty"` |
There was a problem hiding this comment.
Can we do better than map[string]interface{} and be more specific?
What do the docs say about receipt?
There was a problem hiding this comment.
Can we do better than
map[string]interface{}and be more specific? What do the docs say aboutreceipt?

This is the screenshoot from REST Admin API. REST Admin API
The display of the receiptJson type after clicking is shown in the screenshot below.

This is the screenshoot from GraphQL Admin API. GraphQL Admin API


These are the transactions of my different test orders.
Considering this document and test results, map[string]interface{} seems to be the better option.
There was a problem hiding this comment.
Ahhhh, interesting, thanks for explaining, this makes sense.
Add the PaymentId and Receipt fields to the Transaction under the Order.