@opengis/pay 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -40,9 +40,13 @@ export default async function PortmoneRedirect(req, reply) {
|
|
|
40
40
|
return { message: 'empty integration payeeId', status: 400 };
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const data = query.id ? await pg.query('select payment_id, account_id, payment_amount from billing.payments where payment_id=$1', [query.id])
|
|
43
|
+
const data = query.id ? await pg.query('select payment_id, account_id, payment_amount, payment_status from billing.payments where payment_id=$1', [query.id])
|
|
44
44
|
.then(el => el.rows?.[0] || {}) : {};
|
|
45
45
|
|
|
46
|
+
if (data.payment_status && data.payment_status === 'success') {
|
|
47
|
+
return { message: 'already processed', status: 400 };
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
const paymentAmount = data.payment_amount || query.price;
|
|
47
51
|
|
|
48
52
|
if (!paymentAmount) {
|