feat: expoe orderId (order MP) em checkout e status
build-image / build-push (push) Successful in 1m35s
build-image / build-push (push) Successful in 1m35s
This commit is contained in:
1 parent
2b454c2bb7
commit
67608421b4
1 file changed
+2
@@ -76,6 +76,7 @@ app.post('/api/checkout', async (req, res) => {
|
||||
|
||||
res.json({
|
||||
paymentId: payment.id,
|
||||
orderId: pix.mpId,
|
||||
qrCodeBase64: pix.qrCodeBase64,
|
||||
copiaCola: pix.copiaCola,
|
||||
price: plan.price,
|
||||
@@ -111,6 +112,7 @@ app.get('/api/status/:id', async (req, res) => {
|
||||
await checkPayment(payment);
|
||||
res.json({
|
||||
status: payment.status,
|
||||
orderId: payment.mpId,
|
||||
voucher: payment.voucher,
|
||||
planName: getDb().plans.find((p) => p.id === payment.planId)?.name,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user