You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my understanding:
It defines base = 'paymentData.transactions[0].payments[0]', and it does not iterate along the transactions nor payments array, considering solely the first payment from the first transaction, each time this function is called.
Moreover, at order-placed/react/Notices.tsx, the way the const bankInvoice is declared, it gathers all the orders, and for each order, it calls the getPaymentInfoFromOrder function (which assumes the Bank Invoice payment is in the position transactions[0].payments[0]), then it calls a find to find one of these orders in which the first payment method from the payments array is a Bank Invoice. https://github.com/vtex-apps/order-placed/blob/master/react/Notices.tsx#L26
What if the Bank Invoice payment is in the second position of the payments array?
What if the Bank Invoice payment is in the second transaction of an order?
What have you tried so far?
I have not tried anything, I'm just wondering.
Additional info
Example of a test order in which the bank invoice is at the second position of the payments array, in the first transaction: https://fastshopbrqa2.vtexcommercestable.com.br/api/oms/pvt/orders/1483250737638-01 https://fastshopbrqa2.myvtex.com/checkout/orderPlaced/?og=1483250737638
In this case, the Bank Invoice information wasn't displayed at the Order Placed page, since the getPaymentInfoFromOrder didn't consider it.
Account
Workspace
fastshopbrqa2
master
The text was updated successfully, but these errors were encountered:
What are you trying to accomplish? Please describe.
I have a question/enhancement regarding the getPaymentInfoFromOrder declared at order-placed/react/utils/index.ts:
https://github.com/vtex-apps/order-placed/blob/3eb63c87564c1e33447c3e60348c5baeb4435f5f/react/utils/index.ts#L61
From my understanding:
It defines
base = 'paymentData.transactions[0].payments[0]'
, and it does not iterate along thetransactions
norpayments
array, considering solely the first payment from the first transaction, each time this function is called.Moreover, at order-placed/react/Notices.tsx, the way the const
bankInvoice
is declared, it gathers all the orders, and for each order, it calls the getPaymentInfoFromOrder function (which assumes the Bank Invoice payment is in the position transactions[0].payments[0]), then it calls afind
to find one of these orders in which the first payment method from the payments array is a Bank Invoice.https://github.com/vtex-apps/order-placed/blob/master/react/Notices.tsx#L26
What if the Bank Invoice payment is in the second position of the payments array?
What if the Bank Invoice payment is in the second transaction of an order?
What have you tried so far?
I have not tried anything, I'm just wondering.
Additional info
Example of a test order in which the bank invoice is at the second position of the payments array, in the first transaction:
https://fastshopbrqa2.vtexcommercestable.com.br/api/oms/pvt/orders/1483250737638-01
https://fastshopbrqa2.myvtex.com/checkout/orderPlaced/?og=1483250737638
In this case, the Bank Invoice information wasn't displayed at the Order Placed page, since the getPaymentInfoFromOrder didn't consider it.
fastshopbrqa2
master
The text was updated successfully, but these errors were encountered: