USP_CREDITCARDTOKEN_ISINUSE
Determines if a credit card token is in use.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CREDITCARDTOKEN | uniqueidentifier | IN | |
@RECORDTOEXCLUDE | nvarchar(max) | IN |
Definition
Copy
CREATE procedure dbo.USP_CREDITCARDTOKEN_ISINUSE
(
@CREDITCARDTOKEN uniqueidentifier,
@RECORDTOEXCLUDE nvarchar(max)
)
with execute as owner
as
set nocount on
declare @ISINUSE bit
set @ISINUSE = 0
declare @CREDITCARDID uniqueidentifier
set @CREDITCARDID = null
if @CREDITCARDTOKEN is not null
select top 1 @CREDITCARDID = ID
from dbo.CREDITCARD
where CREDITCARDTOKEN = @CREDITCARDTOKEN
if @CREDITCARDID is not null
exec dbo.USP_CREDITCARDID_ISINUSE @CREDITCARDID, @RECORDTOEXCLUDE, @ISINUSE output
select @ISINUSE as ISINUSE