30 lines
631 B
SQL
30 lines
631 B
SQL
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 ;
|