salix/db/routines/hedera/procedures/tpvTransaction_confirmById.sql

30 lines
631 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`tpvTransaction_confirmById`(vOrder INT)
BEGIN
/**
* Confirma manualmente una transacción espedificando su identificador.
*
* @param vOrder Identificador de la transacción
*/
DECLARE vAmount INT;
DECLARE vMerchant INT;
DECLARE vCurrency INT;
SELECT amount, merchantFk, currency
INTO vAmount, vMerchant, vCurrency
FROM tpvTransaction t
JOIN tpvMerchant m ON m.id = t.merchantFk
JOIN tpvConfig c
WHERE t.id = vOrder;
CALL tpvTransaction_confirm(
vAmount
,vOrder
,vMerchant
,vCurrency
,0
,NULL
);
END$$
DELIMITER ;