[dbo].[GetPlasticProviderHostedPaymentPageOptions]
CREATE procedure [dbo].[GetPlasticProviderHostedPaymentPageOptions]
@inProviderId int
as
set nocount on
declare @theAcceptedCardList varchar(2000) = substring(
(
select '|' + PlasticProviderTypeAllowedTokenType.ExternalCode as 'data()'
from PlasticProviderHppAllowedTokenType
inner join PlasticProviderTypeAllowedTokenType on PlasticProviderTypeAllowedTokenType.ProviderTypeAllowedTokenTypeID =
PlasticProviderHppAllowedTokenType.ProviderTypeAllowedTokenTypeFID
where PlasticProviderHppAllowedTokenType.ProviderFID = @inProviderId
for xml path('')
), 2, 2001 )
select
LandscapeOrientation = PlasticProviderHppOptions.LandscapeOrientation,
PageFontName = PlasticProviderHppOptions.PageFontName,
PageFontSize = convert( varchar(12), PlasticProviderHppOptions.PageFontSize ),
PageTextColorName = PageTextColor.CssName,
PageBackColorName = PageBackColor.CssName,
TitleText = PlasticProviderHppOptions.TitleText,
TitleColorName = TitleColor.CssName,
ButtonTextColorName = ButtonTextColor.CssName,
ButtonBackColorName = ButtonBackColor.CssName,
AcceptSalesButtonText = PlasticProviderHppOptions.AcceptSalesButtonText,
AcceptTokenButtonText = PlasticProviderHppOptions.AcceptTokenButtonText,
CancelSalesButtonText = PlasticProviderHppOptions.CancelSalesButtonText,
CancelTokenButtonText = PlasticProviderHppOptions.CancelTokenButtonText,
ShowBillingAddressBlock = PlasticProviderHppOptions.ShowBillingAddressBlock,
ShowCountry = PlasticProviderHppOptions.ShowCountry,
HaveRoundedCorners = PlasticProviderHppOptions.HaveRoundedCorners,
HaveZipPrompt = PlasticProviderHppOptions.HaveZipPrompt,
WebPageHtml = PlasticProviderHppOptions.WebPageHtml,
WebPageVersion = PlasticProviderHppOptions.WebPageVersion,
AcceptedCardList = replace( @theAcceptedCardList, ' |', '|' )
from PlasticProviderHppOptions
left outer join CssColor as PageTextColor on PageTextColor.CssColorID = PlasticProviderHppOptions.PageTextColorFID
left outer join CssColor as PageBackColor on PageBackColor.CssColorID = PlasticProviderHppOptions.PageBackColorFID
left outer join CssColor as TitleColor on TitleColor.CssColorID = PlasticProviderHppOptions.TitleColorFID
left outer join CssColor as ButtonTextColor on ButtonTextColor.CssColorID = PlasticProviderHppOptions.ButtonTextColorFID
left outer join CssColor as ButtonBackColor on ButtonBackColor.CssColorID = PlasticProviderHppOptions.ButtonBackColorFID
where PlasticProviderHppOptions.ProviderFID = @inProviderId
GO
GRANT EXECUTE ON [dbo].[GetPlasticProviderHostedPaymentPageOptions] TO [MssExec]
GO