From 1c3684c8c7da29d98f797dd1241d1bef139ea4dd Mon Sep 17 00:00:00 2001 From: taro Date: Tue, 18 Mar 2025 22:01:06 -0300 Subject: [PATCH 1/2] fix: use salix for myTpvTransaction_end --- src/stores/tpv.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/stores/tpv.js b/src/stores/tpv.js index 53f146c2..bcb1fe7b 100644 --- a/src/stores/tpv.js +++ b/src/stores/tpv.js @@ -1,5 +1,8 @@ import { defineStore } from 'pinia'; import { jApi } from 'boot/axios'; +import { inject } from 'vue'; + +const api = inject('api'); export const tpvStore = defineStore('tpv', { actions: { @@ -8,10 +11,11 @@ export const tpvStore = defineStore('tpv', { const status = route.query.tpvStatus; if (!(order && status)) return null; - await jApi.execQuery('CALL myTpvTransaction_end(#order, #status)', { - order, - status - }); + + await api.post('applications/myTpvTransaction_end/execute-proc', new URLSearchParams({ + schema: 'hedera', + params: `[${order}, ${status}]`, + }).toString()); if (status === 'ko') { const retry = confirm('retryPayQuestion'); -- 2.40.1 From 2733b1395354a43e86107f8810390e19d99b8b81 Mon Sep 17 00:00:00 2001 From: taro Date: Fri, 21 Mar 2025 00:03:36 -0300 Subject: [PATCH 2/2] refactor: URLSearchParams -> JSON --- src/stores/tpv.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/tpv.js b/src/stores/tpv.js index bcb1fe7b..7cefe96e 100644 --- a/src/stores/tpv.js +++ b/src/stores/tpv.js @@ -12,10 +12,10 @@ export const tpvStore = defineStore('tpv', { if (!(order && status)) return null; - await api.post('applications/myTpvTransaction_end/execute-proc', new URLSearchParams({ + await api.post('applications/myTpvTransaction_end/execute-proc', { schema: 'hedera', - params: `[${order}, ${status}]`, - }).toString()); + params: [order, status], + }); if (status === 'ko') { const retry = confirm('retryPayQuestion'); -- 2.40.1